File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -3934,6 +3934,34 @@ http_endpoints_list ::=
3934
3934
{:
3935
3935
RESULT = ImmutableMap.<IdentifierReferenceTerm, Object>builder().put(endpoint_name, path.getVal());
3936
3936
:}
3937
+
3938
+ /*Report on unexpected trailing commas.*/
3939
+ | identifier:endpoint_name COLON fmt_string:path COMMA:c
3940
+ {:
3941
+ Symbol currSymbol = new Symbol(
3942
+ -1,
3943
+ cleft,
3944
+ cright,
3945
+ LexedValue.create(
3946
+ String.valueOf(c.getVal()),
3947
+ c.getCurrentInputLine(),
3948
+ c.getLen())
3949
+ );
3950
+ report_error("Syntax error: Unexpected trailing comma", currSymbol);
3951
+ :}
3952
+ | identifier:endpoint_name COLON STRING:path COMMA:c
3953
+ {:
3954
+ Symbol currSymbol = new Symbol(
3955
+ -1,
3956
+ cleft,
3957
+ cright,
3958
+ LexedValue.create(
3959
+ String.valueOf(c.getVal()),
3960
+ c.getCurrentInputLine(),
3961
+ c.getLen())
3962
+ );
3963
+ report_error("Syntax error: Unexpected trailing comma", currSymbol);
3964
+ :}
3937
3965
;
3938
3966
3939
3967
endpoint_handlers_block_stmt ::=
You can’t perform that action at this time.
0 commit comments