Skip to content
Snippets Groups Projects
Commit 23e76a8a authored by earplov's avatar earplov
Browse files

Bug 503395 - Ttcn3Parser: handle erroneous global template variable


Signed-off-by: default avatarearplov <arpad.lovassy@ericsson.com>
parent 95ba9f9f
No related branches found
No related tags found
No related merge requests found
......@@ -631,7 +631,19 @@ pr_ModuleDef returns [List<Definition> definitions]
( ( m = pr_Visibility { modifier = $m.modifier; } )?
( d1 = pr_TypeDef { if($d1.def_type != null) { $definitions.add($d1.def_type); } }
| d2 = pr_ConstDef { if($d2.array != null) { $definitions.addAll($d2.array); } }
| d3 = pr_TemplateDef { if($d3.def_template != null) { $definitions.add($d3.def_template); } }
| { boolean isTemplateVar = false; }
( pr_VarKeyword { isTemplateVar = true; } )?
d3 = pr_TemplateDef
{
final Def_Template templateDef = $d3.def_template;
if ( isTemplateVar ) {
final String templateName = templateDef != null ? " `" + templateDef.getIdentifier() + "'" : "";
reportError( "Code generation for global template variable" + templateName + " is not supported", $start, $d3.stop );
}
else if ( $d3.def_template != null ) {
$definitions.add( $d3.def_template );
}
}
| d4 = pr_FunctionDef { if($d4.def_func != null) { $definitions.add($d4.def_func); } }
| d5 = pr_SignatureDef { if($d5.def_type != null) { $definitions.add($d5.def_type); } }
| d6 = pr_TestcaseDef { if($d6.def_testcase != null) { $definitions.add($d6.def_testcase); } }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment