Changeset e04ef3a for src/SynTree


Ignore:
Timestamp:
Jun 14, 2016, 12:53:03 PM (8 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, with_gc
Children:
c8c03683
Parents:
55ba7339
Message:

add gcc extension, first attempt, not done yet

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r55ba7339 re04ef3a  
    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 13 13:23:11 2016
    13 // Update Count     : 40
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jun 13 16:03:39 2016
     13// Update Count     : 42
    1414//
    1515
     
    3232Expression::Expression( Expression *_aname ) : env( 0 ), argName( _aname ) {}
    3333
    34 Expression::Expression( const Expression &other ) : env( maybeClone( other.env ) ), argName( maybeClone( other.get_argName() ) ) {
     34Expression::Expression( const Expression &other ) : env( maybeClone( other.env ) ), argName( maybeClone( other.get_argName() ) ), extension( other.extension ) {
    3535        cloneAll( other.results, results );
    3636}
     
    5959                os << std::string( indent, ' ' ) << "with designator:";
    6060                argName->print( os, indent+2 );
     61        } // if
     62
     63        if ( extension ) {
     64                os << std::string( indent, ' ' ) << "with extension:";
    6165        } // if
    6266}
  • src/SynTree/Expression.h

    r55ba7339 re04ef3a  
    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 : Wed Apr 27 17:06:49 2016
    13 // Update Count     : 21
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Jun  8 17:05:30 2016
     13// Update Count     : 22
    1414//
    1515
     
    3838        Expression *get_argName() const { return argName; }
    3939        void set_argName( Expression *name ) { argName = name; }
     40        bool get_extension() const { return extension; }
     41        void set_extension( bool exten ) { extension = exten; }
    4042
    4143        virtual Expression *clone() const = 0;
     
    4749        TypeSubstitution *env;
    4850        Expression* argName; // if expression is used as an argument, it can be "designated" by this name
     51        bool extension = false;
    4952};
    5053
Note: See TracChangeset for help on using the changeset viewer.