You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (JIRA)" <ji...@apache.org> on 2019/04/01 16:00:00 UTC

[jira] [Resolved] (JEXL-288) Annotation can not be specified for a standalone statement

     [ https://issues.apache.org/jira/browse/JEXL-288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro resolved JEXL-288.
--------------------------------
    Resolution: Fixed

Fixed grammar as suggested, added test

https://github.com/apache/commons-jexl/commit/94be4377345033cc20c64f35e8fa5b5d9f35d8c2

> Annotation can not be specified for a standalone statement
> ----------------------------------------------------------
>
>                 Key: JEXL-288
>                 URL: https://issues.apache.org/jira/browse/JEXL-288
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.2
>
>
> It is expected that the following code
> {code:java}
> @Annotation while (true) {}
> {code}
> should be successfully parsed as the code below
> {code:java}
> @Annotation {while (true) {}}
> {code}
> The suggestion is to change the grammar for the annotated statement from
> {code:java}
> void AnnotatedStatement() #AnnotatedStatement() : {}
>  {
>     (LOOKAHEAD(<ANNOTATION>) Annotation())+ (LOOKAHEAD(<VAR>) Var() | LOOKAHEAD(1) Block() | Expression())
>  }
> {code}
> to
> {code:java}
> void AnnotatedStatement() #AnnotatedStatement() : {}
>  {
>     (LOOKAHEAD(<ANNOTATION>) Annotation())+ (LOOKAHEAD(1) Block() | Statement())
>  }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)