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 2017/08/28 14:54:18 UTC

groovy git commit: Refine the error alternative of right parenthesis for better message

Repository: groovy
Updated Branches:
  refs/heads/master 28d49df39 -> 0763245b0


Refine the error alternative of right parenthesis for better message


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/0763245b
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/0763245b
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/0763245b

Branch: refs/heads/master
Commit: 0763245b0ea8e60e60b7df87439f6a5d9fcfdda5
Parents: 28d49df
Author: sunlan <su...@apache.org>
Authored: Mon Aug 28 22:54:06 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Mon Aug 28 22:54:06 2017 +0800

----------------------------------------------------------------------
 src/main/antlr/GroovyParser.g4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/0763245b/src/main/antlr/GroovyParser.g4
----------------------------------------------------------------------
diff --git a/src/main/antlr/GroovyParser.g4 b/src/main/antlr/GroovyParser.g4
index 2c34c93..9c49b99 100644
--- a/src/main/antlr/GroovyParser.g4
+++ b/src/main/antlr/GroovyParser.g4
@@ -1251,8 +1251,8 @@ rparen
     :   RPAREN
     |
         // !!!Error Alternatives
-        { require(false, "Missing ')'"); }
-        ~RPAREN
+        ~LPAREN
+        { require(false, "Missing ')'", -1); }
     ;
 
 nls