Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r25bca42 r6d539f83  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun  6 16:17:18 2018
    13 // Update Count     : 843
     12// Last Modified On : Mon Apr 30 09:19:17 2018
     13// Update Count     : 831
    1414//
    1515
     
    7777
    7878        ParseNode * next = nullptr;
    79         const std::string * name = nullptr;
     79        std::string * name = nullptr;
    8080        CodeLocation location = yylloc;
    8181}; // ParseNode
     
    8787        InitializerNode( ExpressionNode *, bool aggrp = false,  ExpressionNode * des = nullptr );
    8888        InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = nullptr );
    89         InitializerNode( bool isDelete );
    9089        ~InitializerNode();
    9190        virtual InitializerNode * clone() const { assert( false ); return nullptr; }
     
    9897        InitializerNode * set_maybeConstructed( bool value ) { maybeConstructed = value; return this; }
    9998        bool get_maybeConstructed() const { return maybeConstructed; }
    100 
    101         bool get_isDelete() const { return isDelete; }
    10299
    103100        InitializerNode * next_init() const { return kids; }
     
    113110        InitializerNode * kids;
    114111        bool maybeConstructed;
    115         bool isDelete;
    116112}; // InitializerNode
    117113
     
    171167};
    172168
    173 Expression * build_constantInteger( std::string & str ); // these 4 routines modify the string
    174 Expression * build_constantFloat( std::string & str );
    175 Expression * build_constantChar( std::string & str );
    176 Expression * build_constantStr( std::string & str );
     169Expression * build_constantInteger( std::string &str );
     170Expression * build_constantFloat( std::string &str );
     171Expression * build_constantChar( std::string &str );
     172Expression * build_constantStr( std::string &str );
    177173Expression * build_field_name_FLOATING_FRACTIONconstant( const std::string & str );
    178174Expression * build_field_name_FLOATING_DECIMALconstant( const std::string & str );
     
    230226        static DeclarationNode * newBuiltinType( BuiltinType );
    231227        static DeclarationNode * newForall( DeclarationNode * );
    232         static DeclarationNode * newFromTypedef( const std::string * );
    233         static DeclarationNode * newFunction( const std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );
     228        static DeclarationNode * newFromTypedef( std::string * );
     229        static DeclarationNode * newFunction( std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );
    234230        static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
    235         static DeclarationNode * newEnum( const std::string * name, DeclarationNode * constants, bool body );
    236         static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant );
    237         static DeclarationNode * newName( const std::string * );
    238         static DeclarationNode * newFromTypeGen( const std::string *, ExpressionNode * params );
    239         static DeclarationNode * newTypeParam( TypeClass, const std::string * );
     231        static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants, bool body );
     232        static DeclarationNode * newEnumConstant( std::string * name, ExpressionNode * constant );
     233        static DeclarationNode * newName( std::string * );
     234        static DeclarationNode * newFromTypeGen( std::string *, ExpressionNode * params );
     235        static DeclarationNode * newTypeParam( TypeClass, std::string * );
    240236        static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts );
    241237        static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params );
    242         static DeclarationNode * newTypeDecl( const std::string * name, DeclarationNode * typeParams );
     238        static DeclarationNode * newTypeDecl( std::string * name, DeclarationNode * typeParams );
    243239        static DeclarationNode * newPointer( DeclarationNode * qualifiers, OperKinds kind );
    244240        static DeclarationNode * newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic );
     
    247243        static DeclarationNode * newTuple( DeclarationNode * members );
    248244        static DeclarationNode * newTypeof( ExpressionNode * expr );
    249         static DeclarationNode * newAttr( const std::string *, ExpressionNode * expr ); // @ attributes
    250         static DeclarationNode * newAttr( const std::string *, DeclarationNode * type ); // @ attributes
    251         static DeclarationNode * newAttribute( const std::string *, ExpressionNode * expr = nullptr ); // gcc attributes
     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
    252248        static DeclarationNode * newAsmStmt( StatementNode * stmt ); // gcc external asm statement
    253249        static DeclarationNode * newStaticAssert( ExpressionNode * condition, Expression * message );
     
    403399};
    404400
    405 Expression * build_if_control( IfCtl * ctl, std::list< Statement * > & init );
    406401Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
    407402Statement * build_switch( bool isSwitch, ExpressionNode * ctl, StatementNode * stmt );
    408403Statement * build_case( ExpressionNode * ctl );
    409404Statement * build_default();
    410 Statement * build_while( IfCtl * ctl, StatementNode * stmt );
    411 Statement * build_do_while( ExpressionNode * ctl, StatementNode * stmt );
     405Statement * build_while( ExpressionNode * ctl, StatementNode * stmt, bool kind = false );
    412406Statement * build_for( ForCtl * forctl, StatementNode * stmt );
    413407Statement * build_branch( BranchStmt::Type kind );
Note: See TracChangeset for help on using the changeset viewer.