Changes in src/Parser/DeclarationNode.cc [44a81853:8f60f0b]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r44a81853 r8f60f0b 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jan 14 14:36:23 201713 // Update Count : 66 912 // Last Modified On : Tue Dec 13 14:43:38 2016 13 // Update Count : 660 14 14 // 15 15 … … 22 22 #include "TypeData.h" 23 23 24 #include "SynTree/Attribute.h"25 24 #include "SynTree/Declaration.h" 26 25 #include "SynTree/Expression.h" … … 398 397 } 399 398 400 DeclarationNode * DeclarationNode::newAttribute( string * name, ExpressionNode * expr ) {401 DeclarationNode * newnode = new DeclarationNode;402 newnode->type = nullptr;403 std::list< Expression * > exprs;404 buildList( expr, exprs );405 newnode->attributes.push_back( new Attribute( *name, exprs ) );406 delete name;407 return newnode;408 }409 410 399 void appendError( string & dst, const string & src ) { 411 400 if ( src.empty() ) return; … … 446 435 storageClass = q->storageClass; 447 436 } // if 448 attributes.splice( attributes.end(), q->attributes );449 437 return this; 450 438 } // DeclarationNode::copyStorageClasses … … 970 958 971 959 if ( type ) { 972 return buildDecl( type, name ? *name : string( "" ), storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, asmName, maybeBuild< Initializer >(initializer) , attributes)->set_extension( extension );960 return buildDecl( type, name ? *name : string( "" ), storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, asmName, maybeBuild< Initializer >(initializer) )->set_extension( extension ); 973 961 } // if 974 962
Note:
See TracChangeset
for help on using the changeset viewer.