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

Function ast_addEmptyEnum

src/parser/parser_impl.cpp:483–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481 }
482
483 Enumeration * ast_addEmptyEnum ( yyscan_t scanner, string * name, const LineInfo & atName ) {
484 das_checkName(scanner,*name,atName);
485 auto pEnum = new Enumeration(*name);
486 delete name;
487 pEnum->at = atName;
488 if ( !yyextra->g_Program->addEnumeration(pEnum) ) {
489 das_yyerror(scanner,"enumeration is already defined "+pEnum->name, atName,
490 CompilationError::already_declared_enumeration);
491 return pEnum;
492 } else {
493 return pEnum;
494 }
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 ) {

Callers 3

yyparseFunction · 0.85
yyparseFunction · 0.85
yyparseFunction · 0.85

Calls 3

das_checkNameFunction · 0.85
das_yyerrorFunction · 0.70
addEnumerationMethod · 0.45

Tested by

no test coverage detected