-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript target cannot use rule exceptions #1741
Comments
Hi,
thanks for this.
can you submit a PR so we can understand how this would behave?
Eric
… Le 9 mars 2017 à 19:58, ChristophWedler ***@***.***> a écrit :
The try block around the rule body is not properly closed by } when using rule exceptions:
grammar noRuleExceptions;
options { language = JavaScript; }
start
:
'start'
;
catch [re] {
throw re;
}
In antlr4/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg,
the } must move from after to before the following block (starting in line 269),
as it is done for the Java target:
<if(exceptions)>
<exceptions; separator="\n">
<else>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#1741>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADLYJGDmVkGBruywdSMU0arEisLi_NyWks5rj-lwgaJpZM4MX_dX>.
|
I have understood that I also need to sign contributors.txt - still need some days to get an official OK from the company I work at. |
Closing as already fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
try
block around the rule body is not properly closed by}
when using rule exceptions:In
antlr4/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg
,the
}
must move from after to before the following block (starting in line 269),as it is done for the Java target:
The text was updated successfully, but these errors were encountered: