Ignore:
Timestamp:
Apr 6, 2020, 4:46:28 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
e3bc51c
Parents:
71d6bd8 (diff), 057298e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into new-ast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r71d6bd8 r7030dab  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 25 22:17:10 2019
    13 // Update Count     : 876
     12// Last Modified On : Fri Feb  7 17:56:02 2020
     13// Update Count     : 891
    1414//
    1515
     
    2828#include "Common/UniqueName.h"     // for UniqueName
    2929#include "Common/utility.h"        // for maybeClone, maybeBuild
    30 #include "Parser/LinkageSpec.h"    // for Spec
     30#include "SynTree/LinkageSpec.h"   // for Spec
     31#include "SynTree/Declaration.h"   // for Aggregate
    3132#include "SynTree/Expression.h"    // for Expression, ConstantExpr (ptr only)
    3233#include "SynTree/Label.h"         // for Label
     
    184185
    185186Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
    186 Expression * build_keyword_cast( KeywordCastExpr::Target target, ExpressionNode * expr_node );
     187Expression * build_keyword_cast( AggregateDecl::Aggregate target, ExpressionNode * expr_node );
    187188Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
    188189Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member );
     
    217218        enum Length { Short, Long, LongLong, NoLength };
    218219        static const char * lengthNames[];
    219         enum Aggregate { Struct, Union, Exception, Trait, Coroutine, Monitor, Thread, NoAggregate };
    220         static const char * aggregateNames[];
    221         enum TypeClass { Otype, Dtype, Ftype, Ttype, NoTypeClass };
    222         static const char * typeClassNames[];
    223220        enum BuiltinType { Valist, AutoType, Zero, One, NoBuiltinType };
    224221        static const char * builtinTypeNames[];
     
    237234        static DeclarationNode * newQualifiedType( DeclarationNode *, DeclarationNode * );
    238235        static DeclarationNode * newFunction( const std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );
    239         static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
     236        static DeclarationNode * newAggregate( AggregateDecl::Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
    240237        static DeclarationNode * newEnum( const std::string * name, DeclarationNode * constants, bool body );
    241238        static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant );
    242239        static DeclarationNode * newName( const std::string * );
    243240        static DeclarationNode * newFromTypeGen( const std::string *, ExpressionNode * params );
    244         static DeclarationNode * newTypeParam( TypeClass, const std::string * );
     241        static DeclarationNode * newTypeParam( TypeDecl::Kind, const std::string * );
    245242        static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts );
    246243        static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params );
     
    312309        struct Variable_t {
    313310//              const std::string * name;
    314                 DeclarationNode::TypeClass tyClass;
     311                TypeDecl::Kind tyClass;
    315312                DeclarationNode * assertions;
    316313                DeclarationNode * initializer;
     
    431428Statement * build_asm( bool voltile, Expression * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
    432429Statement * build_directive( std::string * directive );
     430SuspendStmt * build_suspend( StatementNode *, SuspendStmt::Type = SuspendStmt::None);
    433431WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when );
    434432WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when, WaitForStmt * existing );
     
    452450                                * out++ = result;
    453451                        } else {
    454                                 assertf(false, "buildList unknown type");
     452                                SemanticError( cur->location, "type specifier declaration in forall clause is currently unimplemented." );
    455453                        } // if
    456454                } catch( SemanticErrorException & e ) {
Note: See TracChangeset for help on using the changeset viewer.