You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/09/09 05:20:30 UTC

[GitHub] [groovy] danielsun1106 commented on a change in pull request #1362: GROOVY-9712: type name may start with more than A-Z (CapitalizedIdentifier)

danielsun1106 commented on a change in pull request #1362:
URL: https://github.com/apache/groovy/pull/1362#discussion_r485344093



##########
File path: src/antlr/GroovyLexer.g4
##########
@@ -882,7 +882,7 @@ ELVIS_ASSIGN    : '?=';
 
 // ยง3.8 Identifiers (must appear after all keywords in the grammar)
 CapitalizedIdentifier
-    :   [A-Z] JavaLetterOrDigit*
+    :   JavaLetter {Character.isUpperCase(getInputStream().LA(-1))}? JavaLetterOrDigit*

Review comment:
       `getInputStream().LA(-1)` could be simplified as  `_input.LA(-1)`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org