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/02/01 00:02:54 UTC

[groovy] 08/08: Tweak `elementValueArrayInitializer` rule

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 866a9885d049a32687ea9f6d56b6ce8f633c7b47
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Feb 1 06:36:14 2020 +0800

    Tweak `elementValueArrayInitializer` rule
    
    (cherry picked from commit 388c5f402509f976c85f6e95a6941261cac46456)
---
 src/antlr/GroovyParser.g4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/antlr/GroovyParser.g4 b/src/antlr/GroovyParser.g4
index b8f5f06..bb47db1 100644
--- a/src/antlr/GroovyParser.g4
+++ b/src/antlr/GroovyParser.g4
@@ -567,7 +567,7 @@ elementValue
     ;
 
 elementValueArrayInitializer
-    :   LBRACK (elementValue (COMMA elementValue)*)? (COMMA)? RBRACK
+    :   LBRACK (elementValue (COMMA elementValue)* COMMA?)? RBRACK
     ;
 
 // STATEMENTS / BLOCKS