From 7f6dc4b4206be1613d3c89d9efc78e8e5fca25a5 Mon Sep 17 00:00:00 2001 From: George Fraser Date: Fri, 12 Oct 2018 10:10:39 -0700 Subject: Reorganize --- lib/java.tmLanguage.json | 88 ++++++++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 37 deletions(-) (limited to 'lib') diff --git a/lib/java.tmLanguage.json b/lib/java.tmLanguage.json index 16d3d4a..5ca0a3c 100644 --- a/lib/java.tmLanguage.json +++ b/lib/java.tmLanguage.json @@ -47,47 +47,16 @@ "include": "#keywords" }, { - "match": "\\b(private|public|protected|static|final|default)\\b", - "name": "storage.modifier.java" + "include": "#modifiers" }, { - "match": "\\b(instanceof)\\s+((\\w+\\.)*\\w+)", - "captures": { - "1": { - "name": "keyword.instanceof.java" - }, - "2": { - "name": "entity.name.class.java" - } - }, - "name": "meta.instanceof.java" - }, - { - "begin": "\\b(new)\\s+((\\w+\\.)*\\w+)", - "beginCaptures": { - "1": { - "name": "keyword.new.java" - }, - "2": { - "name": "entity.name.class.java" - } - }, - "end": "\\(", - "name": "meta.new.java", - "patterns": [ - { - "include": "#keywords" - }, - { - "include": "#class-name" - } - ] + "include": "#comments" }, { "include": "#constants" }, { - "include": "#comments" + "include": "#builtins" } ], "repository": { @@ -99,11 +68,11 @@ } ] }, - "class-name": { + "modifiers": { "patterns": [ { - "match": "(\\w+\\.)*\\w+", - "name": "entity.name.class.java" + "match": "\\b(private|public|protected|static|final|default)\\b", + "name": "storage.modifier.java" } ] }, @@ -204,6 +173,51 @@ ] } ] + }, + "builtins": { + "patterns": [ + { + "match": "\\b(instanceof)\\s+((\\w+\\.)*\\w+)", + "captures": { + "1": { + "name": "keyword.instanceof.java" + }, + "2": { + "name": "entity.name.class.java" + } + }, + "name": "meta.instanceof.java" + }, + { + "begin": "\\b(new)\\s+((\\w+\\.)*\\w+)", + "beginCaptures": { + "1": { + "name": "keyword.new.java" + }, + "2": { + "name": "entity.name.class.java" + } + }, + "end": "\\(", + "name": "meta.new.java", + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#class-name" + } + ] + } + ] + }, + "class-name": { + "patterns": [ + { + "match": "(\\w+\\.)*\\w+", + "name": "entity.name.class.java" + } + ] } } } \ No newline at end of file -- cgit v1.2.3