Skip to content
Snippets Groups Projects
Commit 4f62954c authored by Lukas Stadler's avatar Lukas Stadler
Browse files

:: and ::: should not set argument names

parent ea1b1c2f
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,7 @@ public class ParserGeneration {
"allow greek characters in identifiers",
"allow everything but newlines in %<ident>% operators",
"allow strings in :: and :::",
"use file for interactive single-line source"
"use file for interactive single-line source",
":: and ::: do not set argument names"
};
}
......@@ -578,17 +578,17 @@ simple_expr returns [T v]
| cstr=conststring { $v = $cstr.v; }
| pkg=id op=(NS_GET|NS_GET_INT) n_ {
SourceSection pkgSource = src($pkg.v);
args.add(RCodeBuilder.argument(pkgSource, "pkg", builder.lookup(pkgSource, $pkg.text, false)));
args.add(RCodeBuilder.argument(pkgSource, (String) null, builder.lookup(pkgSource, $pkg.text, false)));
}
( compId=id {
SourceSection compSource = src($compId.v);
compToken = $compId.v;
args.add(RCodeBuilder.argument(compSource, "name", builder.lookup(compSource, $compId.text, false)));
args.add(RCodeBuilder.argument(compSource, (String) null, builder.lookup(compSource, $compId.text, false)));
}
| compString=STRING {
SourceSection compSource = src($compString);
compToken = $compString;
args.add(RCodeBuilder.argument(compSource, "name", builder.constant(compSource, $compString.text)));
args.add(RCodeBuilder.argument(compSource, (String) null, builder.constant(compSource, $compString.text)));
}
) { $v = builder.call(src($pkg.v, compToken), operator($op), args); }
| op=LPAR n_ ea=expr_or_assign n_ y=RPAR { $v = builder.call(src($op, $y), operator($op), $ea.v); }
......
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