groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] branch GROOVY_2_5_X updated: GROOVY-9038: rework antlr2 java grammar to partially understand try-with-resources (minor tweak)
Date Sat, 16 Mar 2019 05:18:15 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new ee9d81e  GROOVY-9038: rework antlr2 java grammar to partially understand try-with-resources
(minor tweak)
ee9d81e is described below

commit ee9d81e8b5080f1f8f83393ced5d272116afac25
Author: Paul King <paulk@asert.com.au>
AuthorDate: Sat Mar 16 15:18:03 2019 +1000

    GROOVY-9038: rework antlr2 java grammar to partially understand try-with-resources (minor
tweak)
---
 src/main/antlr2/org/codehaus/groovy/antlr/java/java.g | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/antlr2/org/codehaus/groovy/antlr/java/java.g b/src/main/antlr2/org/codehaus/groovy/antlr/java/java.g
index dd7b244..96046a5 100644
--- a/src/main/antlr2/org/codehaus/groovy/antlr/java/java.g
+++ b/src/main/antlr2/org/codehaus/groovy/antlr/java/java.g
@@ -1214,7 +1214,7 @@ forIter  {Token first = LT(1);}
 // TODO currently handles try-with-resources only enough for groovydoc, not java2groovy
 // plan is to switch java2groovy over to using parrot parser (or some other alternative)
 tryBlock
-	:	"try"^ ((LPAREN) => resources)? compoundStatement
+	:	"try"^ ((LPAREN) => resources!)? compoundStatement
 		(handler)*
 		( finallyClause )?
 	;


Mime
View raw message