Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.hpp

    r23f99e1 rf3cc5b6  
    1818#include <cassert>
    1919#include <map>
     20#include <string>
    2021#include <utility>        // for move
    2122#include <vector>
    2223
    2324#include "Fwd.hpp"        // for UniqueId
     25#include "Label.hpp"
    2426#include "ParseNode.hpp"
    25 #include "Type.hpp"       // for ptr<Type>
     27#include "Visitor.hpp"
     28
     29// Must be included in *all* AST classes; should be #undef'd at the end of the file
     30#define MUTATE_FRIEND template<typename node_t> friend auto mutate(const node_t * node);
    2631
    2732namespace ast {
     
    117122        bool extension = false;
    118123
    119         Expr(const CodeLocation& loc ) : ParseNode( loc ), result(), env(), inferred() {}
    120 
    121         Expr* set_extension( bool ex ) { extension = ex; return this; }
    122 
    123         const Expr * accept( Visitor& v ) const override = 0;
     124        Expr( const CodeLocation & loc, const Type * res = nullptr )
     125        : ParseNode( loc ), result( res ), env(), inferred() {}
     126
     127        Expr * set_extension( bool ex ) { extension = ex; return this; }
     128
     129        virtual const Expr * accept( Visitor & v ) const override = 0;
    124130private:
    125131        Expr * clone() const override = 0;
    126 };
    127 
     132        MUTATE_FRIEND
     133};
     134
     135/// The application of a function to a set of parameters.
     136/// Post-resolver form of `UntypedExpr`
     137class ApplicationExpr final : public Expr {
     138public:
     139        ptr<Expr> func;
     140        std::vector<ptr<Expr>> args;
     141
     142        ApplicationExpr( const CodeLocation & loc, const Expr * f, std::vector<ptr<Expr>> && as = {} );
     143
     144        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     145private:
     146        ApplicationExpr * clone() const override { return new ApplicationExpr{ *this }; }
     147        MUTATE_FRIEND
     148};
     149
     150/// The application of a function to a set of parameters, pre-overload resolution.
     151class UntypedExpr final : public Expr {
     152public:
     153        ptr<Expr> func;
     154        std::vector<ptr<Expr>> args;
     155
     156        UntypedExpr( const CodeLocation & loc, const Expr * f, std::vector<ptr<Expr>> && as = {} )
     157        : Expr( loc ), func( f ), args( std::move(as) ) {}
     158
     159        /// Creates a new dereference expression
     160        static UntypedExpr * createDeref( const CodeLocation & loc, Expr * arg );
     161        /// Creates a new assignment expression
     162        static UntypedExpr * createAssign( const CodeLocation & loc, Expr * lhs, Expr * rhs );
     163
     164        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     165private:
     166        UntypedExpr * clone() const override { return new UntypedExpr{ *this }; }
     167        MUTATE_FRIEND
     168};
     169
     170/// A name whose name is as-yet undetermined.
     171/// May also be used to avoid name mangling in codegen phase.
     172class NameExpr final : public Expr {
     173public:
     174        std::string name;
     175
     176        NameExpr( const CodeLocation & loc, const std::string & n ) : Expr( loc ), name( n ) {}
     177
     178        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     179private:
     180        NameExpr * clone() const override { return new NameExpr{ *this }; }
     181        MUTATE_FRIEND
     182};
     183
     184/// Address-of expression `&e`
     185class AddressExpr final : public Expr {
     186public:
     187        ptr<Expr> arg;
     188
     189        AddressExpr( const CodeLocation & loc, const Expr * a );
     190
     191        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     192private:
     193        AddressExpr * clone() const override { return new AddressExpr{ *this }; }
     194        MUTATE_FRIEND
     195};
     196
     197/// GCC &&label
     198/// https://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/Labels-as-Values.html
     199class LabelAddressExpr final : public Expr {
     200public:
     201        Label arg;
     202
     203        LabelAddressExpr( const CodeLocation & loc, Label && a );
     204
     205        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     206private:
     207        LabelAddressExpr * clone() const override { return new LabelAddressExpr{ *this }; }
     208        MUTATE_FRIEND
     209};
     210
     211/// Whether a cast existed in the program source or not
     212enum GeneratedFlag { ExplicitCast, GeneratedCast };
     213
     214/// A type cast, e.g. `(int)e`
     215class CastExpr final : public Expr {
     216public:
     217        ptr<Expr> arg;
     218        GeneratedFlag isGenerated;
     219
     220        CastExpr( const CodeLocation & loc, const Expr * a, const Type * to,
     221                GeneratedFlag g = GeneratedCast ) : Expr( loc, to ), arg( a ), isGenerated( g ) {}
     222        /// Cast-to-void
     223        CastExpr( const CodeLocation & loc, const Expr * a, GeneratedFlag g = GeneratedCast );
     224
     225        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     226private:
     227        CastExpr * clone() const override { return new CastExpr{ *this }; }
     228        MUTATE_FRIEND
     229};
     230
     231/// A cast to "keyword types", e.g. `(thread &)t`
     232class KeywordCastExpr final : public Expr {
     233public:
     234        ptr<Expr> arg;
     235        enum Target { Coroutine, Thread, Monitor, NUMBER_OF_TARGETS } target;
     236
     237        KeywordCastExpr( const CodeLocation & loc, const Expr * a, Target t )
     238        : Expr( loc ), arg( a ), target( t ) {}
     239
     240        /// Get a name for the target type
     241        const std::string& targetString() const;
     242
     243        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     244private:
     245        KeywordCastExpr * clone() const override { return new KeywordCastExpr{ *this }; }
     246        MUTATE_FRIEND
     247};
     248
     249/// A virtual dynamic cast, e.g. `(virtual exception)e`
     250class VirtualCastExpr final : public Expr {
     251public:
     252        ptr<Expr> arg;
     253
     254        VirtualCastExpr( const CodeLocation & loc, const Expr * a, const Type * to )
     255        : Expr( loc, to ), arg( a ) {}
     256
     257        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     258private:
     259        VirtualCastExpr * clone() const override { return new VirtualCastExpr{ *this }; }
     260        MUTATE_FRIEND
     261};
     262
     263/// A member selection operation before expression resolution, e.g. `q.p`
     264class UntypedMemberExpr final : public Expr {
     265public:
     266        ptr<Expr> member;
     267        ptr<Expr> aggregate;
     268
     269        UntypedMemberExpr( const CodeLocation & loc, const Expr * mem, const Expr * agg )
     270        : Expr( loc ), member( mem ), aggregate( agg ) { assert( aggregate ); }
     271
     272        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     273private:
     274        UntypedMemberExpr * clone() const override { return new UntypedMemberExpr{ *this }; }
     275        MUTATE_FRIEND
     276};
     277
     278/// A member selection operation after expression resolution, e.g. `q.p`
     279class MemberExpr final : public Expr {
     280public:
     281        readonly<DeclWithType> member;
     282        ptr<Expr> aggregate;
     283
     284        MemberExpr( const CodeLocation & loc, const DeclWithType * mem, const Expr * agg );
     285
     286        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     287private:
     288        MemberExpr * clone() const override { return new MemberExpr{ *this }; }
     289        MUTATE_FRIEND
     290};
     291
     292/// A reference to a named variable.
     293class VariableExpr final : public Expr {
     294public:
     295        readonly<DeclWithType> var;
     296
     297        VariableExpr( const CodeLocation & loc, const DeclWithType * v );
     298
     299        /// generates a function pointer for a given function
     300        static VariableExpr * functionPointer( const CodeLocation & loc, const FunctionDecl * decl );
     301
     302        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     303private:
     304        VariableExpr * clone() const override { return new VariableExpr{ *this }; }
     305        MUTATE_FRIEND
     306};
     307
     308/// A compile-time constant
     309class ConstantExpr final : public Expr {
     310        union Val {
     311                unsigned long long ival;
     312                double dval;
     313               
     314                Val( unsigned long long i ) : ival( i ) {}
     315                Val( double d ) : dval( d ) {}
     316        } val;
     317public:
     318        std::string rep;
     319
     320        ConstantExpr(
     321                const CodeLocation & loc, const Type * ty, const std::string & r, unsigned long long v )
     322        : Expr( loc, ty ), val( v ), rep( r ) {}
     323        ConstantExpr( const CodeLocation & loc, const Type * ty, const std::string & r, double v )
     324        : Expr( loc, ty ), val( v ), rep( r ) {}
     325       
     326        /// Gets the value of this constant as an integer
     327        long long int intValue() const;
     328        /// Gets the value of this constant as floating point
     329        double floatValue() const;
     330
     331        /// generates a boolean constant of the given bool
     332        static ConstantExpr * from_bool( const CodeLocation & loc, bool b );
     333        /// generates a char constant of the given char
     334        static ConstantExpr * from_char( const CodeLocation & loc, char c );
     335        /// generates an integer constant of the given int
     336        static ConstantExpr * from_int( const CodeLocation & loc, int i );
     337        /// generates an integer constant of the given unsigned long int
     338        static ConstantExpr * from_ulong( const CodeLocation & loc, unsigned long i );
     339        /// generates a floating point constant of the given double
     340        static ConstantExpr * from_double( const CodeLocation & loc, double d );
     341        /// generates an array of chars constant of the given string
     342        static ConstantExpr * from_string( const CodeLocation & loc, const std::string & s );
     343        /// generates a null pointer value for the given type. void * if omitted.
     344        static ConstantExpr * null( const CodeLocation & loc, const Type * ptrType = nullptr );
     345
     346        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     347private:
     348        ConstantExpr * clone() const override { return new ConstantExpr{ *this }; }
     349        MUTATE_FRIEND
     350};
     351
     352/// sizeof expression, e.g. `sizeof(int)`, `sizeof 3+4`
     353class SizeofExpr final : public Expr {
     354public:
     355        ptr<Expr> expr;
     356        ptr<Type> type;
     357
     358        SizeofExpr( const CodeLocation & loc, const Expr * e );
     359        SizeofExpr( const CodeLocation & loc, const Type * t );
     360        // deliberately no disambiguating overload for nullptr_t
     361
     362        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     363private:
     364        SizeofExpr * clone() const override { return new SizeofExpr{ *this }; }
     365        MUTATE_FRIEND
     366};
     367
     368/// alignof expression, e.g. `alignof(int)`, `alignof 3+4`
     369class AlignofExpr final : public Expr {
     370public:
     371        ptr<Expr> expr;
     372        ptr<Type> type;
     373
     374        AlignofExpr( const CodeLocation & loc, const Expr * e );
     375        AlignofExpr( const CodeLocation & loc, const Type * t );
     376        // deliberately no disambiguating overload for nullptr_t
     377
     378        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     379private:
     380        AlignofExpr * clone() const override { return new AlignofExpr{ *this }; }
     381        MUTATE_FRIEND
     382};
     383
     384/// offsetof expression before resolver determines field, e.g. `offsetof(MyStruct, myfield)`
     385class UntypedOffsetofExpr final : public Expr {
     386public:
     387        ptr<Type> type;
     388        std::string member;
     389
     390        UntypedOffsetofExpr( const CodeLocation & loc, const Type * ty, const std::string & mem )
     391        : Expr( loc ), type( ty ), member( mem ) {}
     392
     393        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     394private:
     395        UntypedOffsetofExpr * clone() const override { return new UntypedOffsetofExpr{ *this }; }
     396        MUTATE_FRIEND
     397};
     398
     399/// offsetof expression after resolver determines field, e.g. `offsetof(MyStruct, myfield)`
     400class OffsetofExpr final : public Expr {
     401public:
     402        ptr<Type> type;
     403        readonly<DeclWithType> member;
     404
     405        OffsetofExpr( const CodeLocation & loc, const Type * ty, const DeclWithType * mem );
     406
     407        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     408private:
     409        OffsetofExpr * clone() const override { return new OffsetofExpr{ *this }; }
     410        MUTATE_FRIEND
     411};
     412
     413/// a pack of field-offsets for a generic type
     414class OffsetPackExpr final : public Expr {
     415public:
     416        ptr<StructInstType> type;
     417
     418        OffsetPackExpr( const CodeLocation & loc, const StructInstType * ty );
     419
     420        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     421private:
     422        OffsetPackExpr * clone() const override { return new OffsetPackExpr{ *this }; }
     423        MUTATE_FRIEND
     424};
     425
     426/// Variants of short-circuiting logical expression
     427enum LogicalFlag { OrExpr, AndExpr };
     428
     429/// Short-circuiting boolean expression (`&&` or `||`)
     430class LogicalExpr final : public Expr {
     431public:
     432        ptr<Expr> arg1;
     433        ptr<Expr> arg2;
     434        LogicalFlag isAnd;
     435
     436        LogicalExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2, LogicalFlag ia );
     437
     438        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     439private:
     440        LogicalExpr * clone() const override { return new LogicalExpr{ *this }; }
     441        MUTATE_FRIEND
     442};
     443
     444/// Three-argument conditional e.g. `p ? a : b`
     445class ConditionalExpr final : public Expr {
     446public:
     447        ptr<Expr> arg1;
     448        ptr<Expr> arg2;
     449        ptr<Expr> arg3;
     450
     451        ConditionalExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2, const Expr * a3 )
     452        : Expr( loc ), arg1( a1 ), arg2( a2 ), arg3( a3 ) {}
     453
     454        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     455private:
     456        ConditionalExpr * clone() const override { return new ConditionalExpr{ *this }; }
     457        MUTATE_FRIEND
     458};
     459
     460/// Comma expression e.g. `( a , b )`
     461class CommaExpr final : public Expr {
     462public:
     463        ptr<Expr> arg1;
     464        ptr<Expr> arg2;
     465
     466        CommaExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2 )
     467        : Expr( loc ), arg1( a1 ), arg2( a2 ) {}
     468
     469        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     470private:
     471        CommaExpr * clone() const override { return new CommaExpr{ *this }; }
     472        MUTATE_FRIEND
     473};
     474
     475/// A type used as an expression (e.g. a type generator parameter)
     476class TypeExpr final : public Expr {
     477public:
     478        ptr<Type> type;
     479
     480        TypeExpr( const CodeLocation & loc, const Type * t ) : Expr(loc), type(t) {}
     481
     482        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
     483private:
     484        TypeExpr * clone() const override { return new TypeExpr{ *this }; }
     485        MUTATE_FRIEND
     486};
     487
     488/// A GCC "asm constraint operand" used in an asm statement, e.g. `[output] "=f" (result)`.
     489/// https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Machine-Constraints.html#Machine-Constraints
     490class AsmExpr final : public Expr {
     491public:
     492        ptr<Expr> inout;
     493        ptr<Expr> constraint;
     494};
    128495
    129496//=================================================================================================
     
    134501inline void increment( const class Expr * node, Node::ref_type ref ) { node->increment(ref); }
    135502inline void decrement( const class Expr * node, Node::ref_type ref ) { node->decrement(ref); }
    136 // inline void increment( const class ApplicationExpr * node, Node::ref_type ref ) { node->increment(ref); }
    137 // inline void decrement( const class ApplicationExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    138 // inline void increment( const class UntypedExpr * node, Node::ref_type ref ) { node->increment(ref); }
    139 // inline void decrement( const class UntypedExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    140 // inline void increment( const class NameExpr * node, Node::ref_type ref ) { node->increment(ref); }
    141 // inline void decrement( const class NameExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    142 // inline void increment( const class AddressExpr * node, Node::ref_type ref ) { node->increment(ref); }
    143 // inline void decrement( const class AddressExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    144 // inline void increment( const class LabelAddressExpr * node, Node::ref_type ref ) { node->increment(ref); }
    145 // inline void decrement( const class LabelAddressExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    146 // inline void increment( const class CastExpr * node, Node::ref_type ref ) { node->increment(ref); }
    147 // inline void decrement( const class CastExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    148 // inline void increment( const class KeywordCastExpr * node, Node::ref_type ref ) { node->increment(ref); }
    149 // inline void decrement( const class KeywordCastExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    150 // inline void increment( const class VirtualCastExpr * node, Node::ref_type ref ) { node->increment(ref); }
    151 // inline void decrement( const class VirtualCastExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    152 // inline void increment( const class MemberExpr * node, Node::ref_type ref ) { node->increment(ref); }
    153 // inline void decrement( const class MemberExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    154 // inline void increment( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->increment(ref); }
    155 // inline void decrement( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    156 // inline void increment( const class VariableExpr * node, Node::ref_type ref ) { node->increment(ref); }
    157 // inline void decrement( const class VariableExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    158 // inline void increment( const class ConstantExpr * node, Node::ref_type ref ) { node->increment(ref); }
    159 // inline void decrement( const class ConstantExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    160 // inline void increment( const class SizeofExpr * node, Node::ref_type ref ) { node->increment(ref); }
    161 // inline void decrement( const class SizeofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    162 // inline void increment( const class AlignofExpr * node, Node::ref_type ref ) { node->increment(ref); }
    163 // inline void decrement( const class AlignofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    164 // inline void increment( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); }
    165 // inline void decrement( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    166 // inline void increment( const class OffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); }
    167 // inline void decrement( const class OffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    168 // inline void increment( const class OffsetPackExpr * node, Node::ref_type ref ) { node->increment(ref); }
    169 // inline void decrement( const class OffsetPackExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    170 // inline void increment( const class AttrExpr * node, Node::ref_type ref ) { node->increment(ref); }
    171 // inline void decrement( const class AttrExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    172 // inline void increment( const class LogicalExpr * node, Node::ref_type ref ) { node->increment(ref); }
    173 // inline void decrement( const class LogicalExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    174 // inline void increment( const class ConditionalExpr * node, Node::ref_type ref ) { node->increment(ref); }
    175 // inline void decrement( const class ConditionalExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    176 // inline void increment( const class CommaExpr * node, Node::ref_type ref ) { node->increment(ref); }
    177 // inline void decrement( const class CommaExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    178 // inline void increment( const class TypeExpr * node, Node::ref_type ref ) { node->increment(ref); }
    179 // inline void decrement( const class TypeExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    180 // inline void increment( const class AsmExpr * node, Node::ref_type ref ) { node->increment(ref); }
    181 // inline void decrement( const class AsmExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     503inline void increment( const class ApplicationExpr * node, Node::ref_type ref ) { node->increment(ref); }
     504inline void decrement( const class ApplicationExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     505inline void increment( const class UntypedExpr * node, Node::ref_type ref ) { node->increment(ref); }
     506inline void decrement( const class UntypedExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     507inline void increment( const class NameExpr * node, Node::ref_type ref ) { node->increment(ref); }
     508inline void decrement( const class NameExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     509inline void increment( const class AddressExpr * node, Node::ref_type ref ) { node->increment(ref); }
     510inline void decrement( const class AddressExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     511inline void increment( const class LabelAddressExpr * node, Node::ref_type ref ) { node->increment(ref); }
     512inline void decrement( const class LabelAddressExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     513inline void increment( const class CastExpr * node, Node::ref_type ref ) { node->increment(ref); }
     514inline void decrement( const class CastExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     515inline void increment( const class KeywordCastExpr * node, Node::ref_type ref ) { node->increment(ref); }
     516inline void decrement( const class KeywordCastExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     517inline void increment( const class VirtualCastExpr * node, Node::ref_type ref ) { node->increment(ref); }
     518inline void decrement( const class VirtualCastExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     519inline void increment( const class MemberExpr * node, Node::ref_type ref ) { node->increment(ref); }
     520inline void decrement( const class MemberExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     521inline void increment( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->increment(ref); }
     522inline void decrement( const class UntypedMemberExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     523inline void increment( const class VariableExpr * node, Node::ref_type ref ) { node->increment(ref); }
     524inline void decrement( const class VariableExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     525inline void increment( const class ConstantExpr * node, Node::ref_type ref ) { node->increment(ref); }
     526inline void decrement( const class ConstantExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     527inline void increment( const class SizeofExpr * node, Node::ref_type ref ) { node->increment(ref); }
     528inline void decrement( const class SizeofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     529inline void increment( const class AlignofExpr * node, Node::ref_type ref ) { node->increment(ref); }
     530inline void decrement( const class AlignofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     531inline void increment( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); }
     532inline void decrement( const class UntypedOffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     533inline void increment( const class OffsetofExpr * node, Node::ref_type ref ) { node->increment(ref); }
     534inline void decrement( const class OffsetofExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     535inline void increment( const class OffsetPackExpr * node, Node::ref_type ref ) { node->increment(ref); }
     536inline void decrement( const class OffsetPackExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     537inline void increment( const class LogicalExpr * node, Node::ref_type ref ) { node->increment(ref); }
     538inline void decrement( const class LogicalExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     539inline void increment( const class ConditionalExpr * node, Node::ref_type ref ) { node->increment(ref); }
     540inline void decrement( const class ConditionalExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     541inline void increment( const class CommaExpr * node, Node::ref_type ref ) { node->increment(ref); }
     542inline void decrement( const class CommaExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     543inline void increment( const class TypeExpr * node, Node::ref_type ref ) { node->increment(ref); }
     544inline void decrement( const class TypeExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     545inline void increment( const class AsmExpr * node, Node::ref_type ref ) { node->increment(ref); }
     546inline void decrement( const class AsmExpr * node, Node::ref_type ref ) { node->decrement(ref); }
    182547// inline void increment( const class ImplicitCopyCtorExpr * node, Node::ref_type ref ) { node->increment(ref); }
    183548// inline void decrement( const class ImplicitCopyCtorExpr * node, Node::ref_type ref ) { node->decrement(ref); }
     
    214579}
    215580
     581#undef MUTATE_FRIEND
     582
    216583// Local Variables: //
    217584// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.