Changeset 44a81853 for src/Parser/ParseNode.h
- Timestamp:
- Jan 18, 2017, 4:57:52 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5ded739
- Parents:
- 1267fb1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r1267fb1 r44a81853 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 13 15:37:33 201613 // Update Count : 6 4312 // Last Modified On : Wed Jan 18 16:20:43 2017 13 // Update Count : 650 14 14 // 15 15 … … 35 35 class ExpressionNode; 36 36 class InitializerNode; 37 class Attribute; 37 38 38 39 //############################################################################## … … 242 243 static DeclarationNode * newTuple( DeclarationNode * members ); 243 244 static DeclarationNode * newTypeof( ExpressionNode * expr ); 244 static DeclarationNode * newAttr( std::string *, ExpressionNode * expr ); 245 static DeclarationNode * newAttr( std::string *, DeclarationNode * type ); 245 static DeclarationNode * newAttr( std::string *, ExpressionNode * expr ); // @ attributes 246 static DeclarationNode * newAttr( std::string *, DeclarationNode * type ); // @ attributes 247 static DeclarationNode * newAttribute( std::string *, ExpressionNode * expr = nullptr ); // gcc attributes 246 248 247 249 DeclarationNode(); … … 316 318 LinkageSpec::Spec linkage; 317 319 ConstantExpr *asmName; 318 std::list< std::string> attributes;320 std::list< Attribute * > attributes; 319 321 InitializerNode * initializer; 320 322 bool extension = false; … … 344 346 Statement * build() const { return const_cast<StatementNode*>(this)->stmt.release(); } 345 347 346 virtual StatementNode * add_label( const std::string * name ) { 347 stmt->get_labels().emplace_back( * name ); 348 virtual StatementNode * add_label( const std::string * name, DeclarationNode * attr = nullptr ) { 349 stmt->get_labels().emplace_back( * name, nullptr, attr ? std::move( attr->attributes ) : std::list< Attribute * > {} ); 350 delete attr; 348 351 delete name; 349 352 return this;
Note: See TracChangeset
for help on using the changeset viewer.