Changeset 7030dab for src/Parser/ParseNode.h
- Timestamp:
- Apr 6, 2020, 4:46:28 PM (5 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r71d6bd8 r7030dab 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 25 22:17:10 201913 // Update Count : 8 7612 // Last Modified On : Fri Feb 7 17:56:02 2020 13 // Update Count : 891 14 14 // 15 15 … … 28 28 #include "Common/UniqueName.h" // for UniqueName 29 29 #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 31 32 #include "SynTree/Expression.h" // for Expression, ConstantExpr (ptr only) 32 33 #include "SynTree/Label.h" // for Label … … 184 185 185 186 Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ); 186 Expression * build_keyword_cast( KeywordCastExpr::Targettarget, ExpressionNode * expr_node );187 Expression * build_keyword_cast( AggregateDecl::Aggregate target, ExpressionNode * expr_node ); 187 188 Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ); 188 189 Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member ); … … 217 218 enum Length { Short, Long, LongLong, NoLength }; 218 219 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[];223 220 enum BuiltinType { Valist, AutoType, Zero, One, NoBuiltinType }; 224 221 static const char * builtinTypeNames[]; … … 237 234 static DeclarationNode * newQualifiedType( DeclarationNode *, DeclarationNode * ); 238 235 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 ); 240 237 static DeclarationNode * newEnum( const std::string * name, DeclarationNode * constants, bool body ); 241 238 static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant ); 242 239 static DeclarationNode * newName( const std::string * ); 243 240 static DeclarationNode * newFromTypeGen( const std::string *, ExpressionNode * params ); 244 static DeclarationNode * newTypeParam( Type Class, const std::string * );241 static DeclarationNode * newTypeParam( TypeDecl::Kind, const std::string * ); 245 242 static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts ); 246 243 static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params ); … … 312 309 struct Variable_t { 313 310 // const std::string * name; 314 DeclarationNode::TypeClasstyClass;311 TypeDecl::Kind tyClass; 315 312 DeclarationNode * assertions; 316 313 DeclarationNode * initializer; … … 431 428 Statement * build_asm( bool voltile, Expression * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr ); 432 429 Statement * build_directive( std::string * directive ); 430 SuspendStmt * build_suspend( StatementNode *, SuspendStmt::Type = SuspendStmt::None); 433 431 WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when ); 434 432 WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when, WaitForStmt * existing ); … … 452 450 * out++ = result; 453 451 } else { 454 assertf(false, "buildList unknown type");452 SemanticError( cur->location, "type specifier declaration in forall clause is currently unimplemented." ); 455 453 } // if 456 454 } catch( SemanticErrorException & e ) {
Note:
See TracChangeset
for help on using the changeset viewer.