Ignore:
Timestamp:
Dec 11, 2019, 8:52:38 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
737c98a
Parents:
98d6965d
Message:

move enum Aggregate from DeclarationNode? to AggregateDecl?, add control-keyword field-dereference to replace control-keyword cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r98d6965d r312029a  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 25 22:17:10 2019
    13 // Update Count     : 1116
     12// Last Modified On : Wed Dec 11 07:40:14 2019
     13// Update Count     : 1123
    1414//
    1515
     
    4747const char * DeclarationNode::signednessNames[] = { "signed", "unsigned", "NoSignednessNames" };
    4848const char * DeclarationNode::lengthNames[] = { "short", "long", "long long", "NoLengthNames" };
    49 const char * DeclarationNode::aggregateNames[] = { "struct", "union", "trait", "coroutine", "monitor", "thread", "NoAggregateNames" };
    5049const char * DeclarationNode::typeClassNames[] = { "otype", "dtype", "ftype", "NoTypeClassNames" };
    5150const char * DeclarationNode::builtinTypeNames[] = { "__builtin_va_list", "__auto_type", "zero_t", "one_t", "NoBuiltinTypeNames" };
     
    267266}
    268267
    269 DeclarationNode * DeclarationNode::newAggregate( Aggregate kind, const string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
     268DeclarationNode * DeclarationNode::newAggregate( AggregateDecl::Aggregate kind, const string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
    270269        DeclarationNode * newnode = new DeclarationNode;
    271270        newnode->type = new TypeData( TypeData::Aggregate );
     
    328327        newnode->type = new TypeData( TypeData::Aggregate );
    329328        newnode->type->aggregate.name = name;
    330         newnode->type->aggregate.kind = Trait;
     329        newnode->type->aggregate.kind = AggregateDecl::Trait;
    331330        newnode->type->aggregate.params = params;
    332331        newnode->type->aggregate.fields = asserts;
     
    338337        newnode->type = new TypeData( TypeData::AggregateInst );
    339338        newnode->type->aggInst.aggregate = new TypeData( TypeData::Aggregate );
    340         newnode->type->aggInst.aggregate->aggregate.kind = Trait;
     339        newnode->type->aggInst.aggregate->aggregate.kind = AggregateDecl::Trait;
    341340        newnode->type->aggInst.aggregate->aggregate.name = name;
    342341        newnode->type->aggInst.params = params;
Note: See TracChangeset for help on using the changeset viewer.