Commit eb1ca71b authored by Miklos Magyari's avatar Miklos Magyari

OOP: implemented the @trait modifier in the parser

Signed-off-by: Miklos Magyari's avatarMiklos Magyari <miklos.magyari@sigmatechnology.se>
parent b52c2218
......@@ -45,7 +45,7 @@ public final class CodeScanner extends RuleBasedScanner {
/* Because some OOP keywords start with @, they are added here temporarily
* as TITANSPECIFICKEYWORDS have special handling of the @ character */
"@abstract", "@final" };
"@abstract", "@final", "@trait" };
public static final String[] TEMPLATE_MATCH = new String[] { "complement", "decmatch", "ifpresent", "subset", "superset", "permutation" };
......
......@@ -43,7 +43,7 @@ public final class TTCN3Keywords {
"get_stringencoding", "oct2unichar", "remove_bom", "unichar2oct", "encode_base64", "decode_base64", "testcasename", "now",
/* OOP extension keywords */
"class", "@abstract", "@final", "this", "super" , "finally"
"class", "@abstract", "@final", "@trait", "this", "super", "finally"
};
public static final String[] FORMAL_PARAMETER_SCOPE = new String[] { "in", "inout", "out", "template" };
......
......@@ -550,6 +550,7 @@ DETERMINISTICKEYWORD: '@deterministic';
FUZZYKEYWORD: '@fuzzy';
INDEXKEYWORD: '@index';
LOCALKEYWORD: '@local';
TRAITKEYWORD: '@trait';
fragment DIGIT: [0-9];
......
......@@ -8986,6 +8986,10 @@ pr_Modifier
}
)?
(t = TRAITKEYWORD
{
})?
;
pr_ExtendsClassDef:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment