Changes in src/Parser/ParseNode.h [44a81853:8f60f0b]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r44a81853 r8f60f0b 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 18 16:20:43 201713 // Update Count : 6 5012 // Last Modified On : Tue Dec 13 15:37:33 2016 13 // Update Count : 643 14 14 // 15 15 … … 35 35 class ExpressionNode; 36 36 class InitializerNode; 37 class Attribute;38 37 39 38 //############################################################################## … … 243 242 static DeclarationNode * newTuple( DeclarationNode * members ); 244 243 static DeclarationNode * newTypeof( ExpressionNode * expr ); 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 244 static DeclarationNode * newAttr( std::string *, ExpressionNode * expr ); 245 static DeclarationNode * newAttr( std::string *, DeclarationNode * type ); 248 246 249 247 DeclarationNode(); … … 318 316 LinkageSpec::Spec linkage; 319 317 ConstantExpr *asmName; 320 std::list< Attribute *> attributes;318 std::list< std::string > attributes; 321 319 InitializerNode * initializer; 322 320 bool extension = false; … … 346 344 Statement * build() const { return const_cast<StatementNode*>(this)->stmt.release(); } 347 345 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; 346 virtual StatementNode * add_label( const std::string * name ) { 347 stmt->get_labels().emplace_back( * name ); 351 348 delete name; 352 349 return this;
Note:
See TracChangeset
for help on using the changeset viewer.