Repository: groovy
Updated Branches:
  refs/heads/master 4ee262fe2 -> 8ce1bb23b


Highlight the boolean literals


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

Branch: refs/heads/master
Commit: 8ce1bb23b3b0975e56c94daf92b2aebec93bb18b
Parents: 4ee262f
Author: Daniel Sun <sun...@apache.org>
Authored: Sat Oct 13 21:25:38 2018 +0800
Committer: Daniel Sun <sun...@apache.org>
Committed: Sat Oct 13 21:25:38 2018 +0800

----------------------------------------------------------------------
 .../src/main/groovy/groovy/ui/text/SmartDocumentFilter.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/8ce1bb23/subprojects/groovy-console/src/main/groovy/groovy/ui/text/SmartDocumentFilter.java
----------------------------------------------------------------------
diff --git 
a/subprojects/groovy-console/src/main/groovy/groovy/ui/text/SmartDocumentFilter.java
 
b/subprojects/groovy-console/src/main/groovy/groovy/ui/text/SmartDocumentFilter.java
index d2ad69f..bccfe55 100644
--- 
a/subprojects/groovy-console/src/main/groovy/groovy/ui/text/SmartDocumentFilter.java
+++ 
b/subprojects/groovy-console/src/main/groovy/groovy/ui/text/SmartDocumentFilter.java
@@ -44,6 +44,7 @@ import static 
org.apache.groovy.parser.antlr4.GroovyLexer.ABSTRACT;
 import static org.apache.groovy.parser.antlr4.GroovyLexer.AS;
 import static org.apache.groovy.parser.antlr4.GroovyLexer.ASSERT;
 import static org.apache.groovy.parser.antlr4.GroovyLexer.BREAK;
+import static org.apache.groovy.parser.antlr4.GroovyLexer.BooleanLiteral;
 import static org.apache.groovy.parser.antlr4.GroovyLexer.BuiltInPrimitiveType;
 import static org.apache.groovy.parser.antlr4.GroovyLexer.CASE;
 import static org.apache.groovy.parser.antlr4.GroovyLexer.CATCH;
@@ -254,12 +255,12 @@ public class SmartDocumentFilter extends DocumentFilter {
             StyleConstants.setForeground(style, Color.RED.darker());
         }
 
-        // reserved keywords and null literal
+        // reserved keywords, null literals, boolean literals
         for (int t : Arrays.asList(AS, DEF, IN, TRAIT, THREADSAFE,
                 VAR, BuiltInPrimitiveType, ABSTRACT, ASSERT, BREAK, CASE, 
CATCH, CLASS, CONST, CONTINUE, DEFAULT, DO,
                 ELSE, ENUM, EXTENDS, FINAL, FINALLY, FOR, IF, GOTO, 
IMPLEMENTS, IMPORT, INSTANCEOF, INTERFACE,
                 NATIVE, NEW, PACKAGE, PRIVATE, PROTECTED, PUBLIC, RETURN, 
STATIC, STRICTFP, SUPER, SWITCH, SYNCHRONIZED,
-                THIS, THROW, THROWS, TRANSIENT, TRY, VOID, VOLATILE, WHILE, 
NullLiteral)) {
+                THIS, THROW, THROWS, TRANSIENT, TRY, VOID, VOLATILE, WHILE, 
NullLiteral, BooleanLiteral)) {
             Style style = createDefaultStyleByTokenType(t);
             StyleConstants.setBold(style, true);
             StyleConstants.setForeground(style, Color.BLUE.darker().darker());

Reply via email to