You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/03/07 06:51:14 UTC

[groovy] branch GROOVY_3_0_X updated (c7d62c7 -> 63b011f)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a change to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from c7d62c7  GROOVY-9446: Bump japicmp-gradle-plugin to 0.2.9 (port to 3_0_X)
     new ebd78a0  Add more test cases for command expression
     new 63b011f  Tweak `commandArgument` rule

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/antlr/GroovyParser.g4                                        | 9 ++++++++-
 .../parser-antlr4/src/test/resources/core/Command_05.groovy      | 6 ++++++
 2 files changed, 14 insertions(+), 1 deletion(-)


[groovy] 02/02: Tweak `commandArgument` rule

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 63b011f0cd5c6c1fe1192251e38fcdea44bf8636
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Mar 7 13:57:33 2020 +0800

    Tweak `commandArgument` rule
    
    (cherry picked from commit 23843a6f7ae19367ace82880246e8a51e46fdc7e)
---
 src/antlr/GroovyParser.g4 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/antlr/GroovyParser.g4 b/src/antlr/GroovyParser.g4
index de512f2..2833376 100644
--- a/src/antlr/GroovyParser.g4
+++ b/src/antlr/GroovyParser.g4
@@ -863,7 +863,7 @@ commandExpression
     ;
 
 commandArgument
-    :   primary
+    :   commandPrimary
         // what follows is either a normal argument, parens,
         // an appended block, an index operation, or nothing
         // parens (a b already processed):
@@ -1009,6 +1009,13 @@ options { baseContext = primary; }
     |   parExpression                                                                       #parenPrmrAlt
     ;
 
+commandPrimary
+options { baseContext = primary; }
+    :   identifier                                                                          #identifierPrmrAlt
+    |   literal                                                                             #literalPrmrAlt
+    |   gstring                                                                             #gstringPrmrAlt
+    ;
+
 list
     :   LBRACK expressionList[true]? COMMA? RBRACK
     ;


[groovy] 01/02: Add more test cases for command expression

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ebd78a041c17187bfaa829c4628213bbc300f144
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Mar 7 14:46:09 2020 +0800

    Add more test cases for command expression
    
    (cherry picked from commit ce3c97ff6d6a3c12d7a92cfd8553ab74a1616a64)
---
 subprojects/parser-antlr4/src/test/resources/core/Command_05.groovy | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/subprojects/parser-antlr4/src/test/resources/core/Command_05.groovy b/subprojects/parser-antlr4/src/test/resources/core/Command_05.groovy
index 06205a7..49f2f39 100644
--- a/subprojects/parser-antlr4/src/test/resources/core/Command_05.groovy
+++ b/subprojects/parser-antlr4/src/test/resources/core/Command_05.groovy
@@ -75,3 +75,9 @@ a b 1 2
 
 (obj.m1(1, 2)) m2(3, 4)
 obj.m1(1, 2) m2(3, 4)
+
+a {} 1 {}
+a {} 1.2 {}
+a {} "1" {}
+a {} true {}
+a {} false {}