Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r2794fff r1db21619  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:28:16 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri Jul 03 18:11:50 2015
    13 // Update Count     : 85
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 14 14:58:25 2015
     13// Update Count     : 91
    1414//
    1515
     
    162162                                Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn,
    163163                                ERAssn, OrAssn, Index, FieldSel, PFieldSel, Range,
    164                                 UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress,
    165                                 Ctor, Dtor,
     164                                UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress
    166165        };
    167166
     
    266265class DeclarationNode : public ParseNode {
    267266  public:
    268         enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, Attribute };
     267        enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic };
    269268        enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, };
    270269        enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary };
     
    353352        std::string name;
    354353        std::list< StorageClass > storageClasses;
     354        std::list< std::string > attributes;
    355355        ExpressionNode *bitfieldWidth;
    356356        InitializerNode *initializer;
     
    359359
    360360        static UniqueName anonymous;
    361 };
     361}; // DeclarationNode
    362362
    363363class StatementNode : public ParseNode {
     
    381381        static StatementNode *newCatchStmt( DeclarationNode *d = 0, StatementNode *s = 0, bool catchRestP = false );
    382382
    383         void set_control( ExpressionNode * );
    384         StatementNode * set_block( StatementNode * );
    385 
    386         ExpressionNode *get_control() const ;
    387         StatementNode *get_block() const;
    388         StatementNode::Type get_type() const;
     383        StatementNode *set_block( StatementNode *b ) {  block = b; return this; }
     384        StatementNode *get_block() const { return block; }
     385
     386        void set_control( ExpressionNode *c ) { control = c; }
     387        ExpressionNode *get_control() const { return control; }
     388
     389        StatementNode::Type get_type() const { return type; }
    389390
    390391        StatementNode *add_label( const std::string * );
    391         std::list<std::string> *get_labels() const;
     392        const std::list<std::string> &get_labels() const { return labels; }
    392393
    393394        void addDeclaration( DeclarationNode *newDecl ) { decl = newDecl; }
     
    410411        ExpressionNode *control;
    411412        StatementNode *block;
    412         std::list<std::string> *labels;
     413        std::list<std::string> labels;
    413414        std::string *target;                            // target label for jump statements
    414415        DeclarationNode *decl;
    415416
    416417        bool isCatchRest;
    417 };
     418}; // StatementNode
    418419
    419420class CompoundStmtNode : public StatementNode {
Note: See TracChangeset for help on using the changeset viewer.