Changes in src/SynTree/Attribute.h [2b7bf59:ea6332d]
- File:
-
- 1 edited
-
src/SynTree/Attribute.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Attribute.h
r2b7bf59 rea6332d 20 20 #include <string> // for string, operator== 21 21 22 #include "BaseSyntaxNode.h"23 #include "Mutator.h"24 #include "Visitor.h"25 26 22 class Expression; 27 23 28 24 // GCC attribute 29 25 // https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Attribute-Syntax.html#Attribute-Syntax 30 class Attribute : public BaseSyntaxNode{26 class Attribute { 31 27 public: 32 std::string name;33 // to keep things nice and tight, use NameExpr for special identifier parameters34 std::list< Expression * > parameters;35 36 28 Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {} 37 29 Attribute( const Attribute &other ); … … 44 36 45 37 Attribute * clone() const { return new Attribute( *this ); } 46 virtual void accept( Visitor & v ) { v.visit( this ); } 47 virtual Attribute * acceptMutator( Mutator & m ) { return m.mutate( this ); } 48 virtual void print( std::ostream & os, int indent = 0 ) const; 38 void print( std:: ostream &os, int indent = 0 ) const; 39 private: 40 std::string name; 41 // to keep things nice and tight, use NameExpr for special identifier parameters 42 std::list< Expression * > parameters; 49 43 }; 50 44
Note:
See TracChangeset
for help on using the changeset viewer.