groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Milles (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-8913) Parrot Parser: binary expression interpreted as cast and unary plus
Date Thu, 06 Dec 2018 22:45:00 GMT
Eric Milles created GROOVY-8913:
-----------------------------------

             Summary: Parrot Parser: binary expression interpreted 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
            Reporter: Eric Milles


Groovy 2.6 (and possible 3.0) is parsing this expression differently:
{code:groovy}
def x = (a.b) + c()
{code}

In Groovy 2.4, 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