Changeset 546e712 for src/SynTree
- Timestamp:
- Jun 6, 2019, 3:01:46 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8c0d801, f46bfd2f
- Parents:
- 2a54479
- Location:
- src/SynTree
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/DeclReplacer.h
r2a54479 r546e712 33 33 34 34 size_t replace( BaseSyntaxNode *& node, const ExprMap & exprMap, bool debug = false); 35 35 36 template<typename T> 36 voidreplace( T *& node, const ExprMap & exprMap, bool debug = false ) {37 if ( ! node ) return ;37 size_t replace( T *& node, const ExprMap & exprMap, bool debug = false ) { 38 if ( ! node ) return 0ul; 38 39 BaseSyntaxNode * arg = node; 39 replace( arg, exprMap, debug );40 size_t replaced = replace( arg, exprMap, debug ); 40 41 node = dynamic_cast<T *>( arg ); 41 42 assertf( node, "DeclReplacer fundamentally changed the type of its argument." ); 43 return replaced; 42 44 } 43 45 } -
src/SynTree/Expression.cc
r2a54479 r546e712 102 102 SemanticError( this, "Constant expression of non-integral type " ); 103 103 } 104 105 VariableExpr::VariableExpr() : Expression(), var( nullptr ) {} 104 106 105 107 VariableExpr::VariableExpr( DeclarationWithType *_var ) : Expression(), var( _var ) { -
src/SynTree/Expression.h
r2a54479 r546e712 299 299 DeclarationWithType * var; 300 300 301 VariableExpr(); 301 302 VariableExpr( DeclarationWithType * var ); 302 303 VariableExpr( const VariableExpr & other );
Note:
See TracChangeset
for help on using the changeset viewer.