MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / ast_enumDeclaration

Function ast_enumDeclaration

src/parser/parser_impl.cpp:497–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495 }
496
497 void ast_enumDeclaration ( yyscan_t scanner, AnnotationList * annL, const LineInfo & atannL, bool pubE, Enumeration * pEnum, Enumeration * pE, Type ebt ) {
498 if ( !pEnum->module ) {
499 return;
500 }
501 pEnum->baseType = ebt;
502 pEnum->isPrivate = !pubE;
503 pEnum->list = das::move(pE->list);
504 if ( annL ) {
505 for ( auto pA : *annL ) {
506 if ( pA->annotation ) {
507 if ( pA->annotation->rtti_isEnumerationAnnotation() ) {
508 auto ann = static_cast<EnumerationAnnotation*>(pA->annotation);
509 string err;
510 if ( !ann->touch(pEnum, *yyextra->g_Program->thisModuleGroup, pA->arguments, err) ) {
511 das_yyerror(scanner,"macro [" +pA->annotation->name + "] failed to finalize the enumeration " + pEnum->name + "\n" + err, atannL,
512 CompilationError::runtime_annotation);
513 }
514 }
515 }
516 }
517 swap ( pEnum->annotations, *annL );
518 delete annL;
519 }
520 }
521
522 void ast_globalLetList ( yyscan_t scanner, bool kwd_let, bool glob_shar, bool pub_var, vector<VariableDeclaration*> * list ) {
523 for ( auto pDecl : *list ) {

Callers 3

yyparseFunction · 0.85
yyparseFunction · 0.85
yyparseFunction · 0.85

Calls 4

das_yyerrorFunction · 0.70
swapFunction · 0.50
touchMethod · 0.45

Tested by

no test coverage detected