groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8913) Parrot Parser: partially-parenthesized binary expression parsed as cast and unary plus
Date Wed, 06 Feb 2019 16:39:00 GMT

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

Daniel Sun updated GROOVY-8913:
-------------------------------
    Fix Version/s: 3.0.0-alpha-5

> Parrot Parser: partially-parenthesized binary expression parsed as cast and unary plus
> --------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8913
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8913
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr4
>    Affects Versions: 2.6.0-alpha-4
>            Reporter: Eric Milles
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 3.0.0-alpha-5
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Groovy 2.6 (and possibly/probably 3.0) is parsing this expression differently from 2.5:
> {code:groovy}
> def x = (a.b) + c()
> {code}
> In Groovy 2.5, this is a DeclarationExpression with a VariableExpression for the left
expression and a BinaryExpression (with PLUS operator) for the right expression.  Parrot Parser
is seeing the right expression as a CastExpression with a UnaryPlusExpression.



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

Mime
View raw message