| 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 ) { |
no test coverage detected