diff options
author | George Fraser <george@fivetran.com> | 2018-12-22 18:21:27 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-12-22 18:21:27 -0800 |
commit | dd3801cf2dc4edb4bbf6c54f1e425a8668649a28 (patch) | |
tree | eb7471db45ed34579c312475282e1de610276394 /lib | |
parent | 4faf72a719de397c5ef1c6b4377d7de353308e13 (diff) | |
download | java-language-server-dd3801cf2dc4edb4bbf6c54f1e425a8668649a28.zip |
Avoid regex nesting groups
Diffstat (limited to 'lib')
-rw-r--r-- | lib/java.tmLanguage.json | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/lib/java.tmLanguage.json b/lib/java.tmLanguage.json index 26c8459..5e66183 100644 --- a/lib/java.tmLanguage.json +++ b/lib/java.tmLanguage.json @@ -449,20 +449,7 @@ "name": "meta.constructor.name" }, { - "begin": "<", - "end": ">", - "name": "meta.constructor.parameters", - "patterns": [ - { - "TODO": "dedup", - "match": "\\b\\w+\\b", - "name": "storage.type.java" - }, - { - "match": "[<>,\\.\\?]|extends|super", - "name": "keyword.other" - } - ] + "include": "#type-parameters" }, { "begin": "\\(", @@ -863,22 +850,28 @@ "type-parameters": { "patterns": [ { - "match": "(?<GROUP><([^<>]|\\g<GROUP>)+>)", + "begin": "<", + "end": ">", "name": "meta.type-parameters.java", - "captures": { + "beginCaptures": { "0": { - "patterns": [ - { - "match": "\\b\\w+\\b", - "name": "storage.type.java" - }, - { - "match": "[<>,\\.\\?]|extends|super", - "name": "keyword.other" - } - ] + "name": "keyword.other" } - } + }, + "endCaptures": { + "0": { + "name": "keyword.other" + } + }, + "patterns": [ + { + "match": "\\b\\w+\\b", + "name": "storage.type.java" + }, + { + "include": "#type-parameters" + } + ] } ] }, |