Changeset 44a81853 for src/SynTree


Ignore:
Timestamp:
Jan 18, 2017, 4:57:52 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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
Message:

first attempt at gcc attributes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Attribute.h

    r1267fb1 r44a81853  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 06 16:26:12 2016
    13 // Update Count     : 33
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Jan 18 16:27:11 2017
     13// Update Count     : 38
    1414//
    1515
     
    2323class Attribute {
    2424  public:
    25   Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {}
    26   Attribute( const Attribute &other );
    27   virtual ~Attribute();
     25        Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {}
     26        Attribute( const Attribute &other );
     27        virtual ~Attribute();
    2828
    29   std::string get_name() const { return name; }
    30   void set_name( const std::string & newValue ) { name = newValue; }
    31   std::list< Expression * > & get_parameters() { return parameters; }
    32   bool empty() const { return name == ""; }
     29        std::string get_name() const { return name; }
     30        void set_name( const std::string & newValue ) { name = newValue; }
     31        std::list< Expression * > & get_parameters() { return parameters; }
     32        bool empty() const { return name == ""; }
    3333
    34   Attribute * clone() const { return new Attribute( *this ); }
    35   void print( std:: ostream &os, int indent = 0 ) const;
    36 
     34        Attribute * clone() const { return new Attribute( *this ); }
     35        void print( std:: ostream &os, int indent = 0 ) const;
    3736  private:
    38   std::string name;
    39   // to keep things nice and tight, use NameExpr for special identifier parameters
    40   std::list< Expression * > parameters;
     37        std::string name;
     38        // to keep things nice and tight, use NameExpr for special identifier parameters
     39        std::list< Expression * > parameters;
    4140};
    4241
    4342#endif
     43
     44// Local Variables: //
     45// tab-width: 4 //
     46// mode: c++ //
     47// compile-command: "make install" //
     48// End: //
Note: See TracChangeset for help on using the changeset viewer.