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

Function ast_globalBitfieldConst

src/parser/parser_impl.cpp:567–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565 }
566
567 void ast_globalBitfieldConst ( yyscan_t scanner, const TypeDeclPtr & bType, bool pub_var, const string & name, Expression * expr ) {
568 auto pVar = new Variable();
569 pVar->name = "`" + bType->alias + "`" + name;
570 pVar->at = expr->at;
571 pVar->type = new TypeDecl(*bType);
572 pVar->type->constant = true;
573 pVar->init = expr;
574 pVar->private_variable = !pub_var;
575 pVar->bitfield_constant = true;
576 if ( !yyextra->g_Program->addVariable(pVar) ) {
577 das_yyerror(scanner,"global bitfield constant is already declared " + name,expr->at,
578 CompilationError::already_declared_global_bitfield);
579 }
580 }
581
582 void ast_globalLet ( yyscan_t scanner, bool kwd_let, bool glob_shar, bool pub_var,
583 AnnotationArgumentList * ann, VariableDeclaration * decl ) {

Callers 3

yyparseFunction · 0.85
yyparseFunction · 0.85
yyparseFunction · 0.85

Calls 2

das_yyerrorFunction · 0.70
addVariableMethod · 0.45

Tested by

no test coverage detected