Ignore:
Timestamp:
Jul 16, 2015, 5:28:24 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
994ec2c
Parents:
724c2b6
Message:

add CFA flag, remove -p from cc1, typedef on functions become function declarations, move isInline/isNoreturn to Declaration, cleaned up label code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r724c2b6 r1db21619  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul  2 17:57:05 2015
    13 // Update Count     : 84
     12// Last Modified On : Tue Jul 14 14:58:25 2015
     13// Update Count     : 91
    1414//
    1515
     
    265265class DeclarationNode : public ParseNode {
    266266  public:
    267         enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic, Attribute };
     267        enum Qualifier { Const, Restrict, Volatile, Lvalue, Atomic };
    268268        enum StorageClass { Extern, Static, Auto, Register, Inline, Fortran, Noreturn, Threadlocal, NoStorageClass, };
    269269        enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary };
     
    352352        std::string name;
    353353        std::list< StorageClass > storageClasses;
     354        std::list< std::string > attributes;
    354355        ExpressionNode *bitfieldWidth;
    355356        InitializerNode *initializer;
     
    358359
    359360        static UniqueName anonymous;
    360 };
     361}; // DeclarationNode
    361362
    362363class StatementNode : public ParseNode {
     
    380381        static StatementNode *newCatchStmt( DeclarationNode *d = 0, StatementNode *s = 0, bool catchRestP = false );
    381382
    382         void set_control( ExpressionNode * );
    383         StatementNode * set_block( StatementNode * );
    384 
    385         ExpressionNode *get_control() const ;
    386         StatementNode *get_block() const;
    387         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; }
    388390
    389391        StatementNode *add_label( const std::string * );
    390         std::list<std::string> *get_labels() const;
     392        const std::list<std::string> &get_labels() const { return labels; }
    391393
    392394        void addDeclaration( DeclarationNode *newDecl ) { decl = newDecl; }
     
    409411        ExpressionNode *control;
    410412        StatementNode *block;
    411         std::list<std::string> *labels;
     413        std::list<std::string> labels;
    412414        std::string *target;                            // target label for jump statements
    413415        DeclarationNode *decl;
    414416
    415417        bool isCatchRest;
    416 };
     418}; // StatementNode
    417419
    418420class CompoundStmtNode : public StatementNode {
Note: See TracChangeset for help on using the changeset viewer.