Skip to content

Commit 337344d

Browse files
committed
Prune textmate grammar
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
1 parent 5e58fc7 commit 337344d

File tree

1 file changed

+56
-77
lines changed

1 file changed

+56
-77
lines changed

syntaxes/groovy.tmLanguage.json

Lines changed: 56 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@
8585
}
8686
]
8787
},
88-
"comment-block": {
89-
"begin": "/\\*",
90-
"captures": {
91-
"0": {
92-
"name": "punctuation.definition.comment.groovy"
93-
}
94-
},
95-
"end": "\\*/",
96-
"name": "comment.block.groovy"
97-
},
9888
"comments": {
9989
"patterns": [
10090
{
@@ -110,7 +100,14 @@
110100
"include": "text.html.javadoc"
111101
},
112102
{
113-
"include": "#comment-block"
103+
"begin": "/\\*",
104+
"captures": {
105+
"0": {
106+
"name": "punctuation.definition.comment.groovy"
107+
}
108+
},
109+
"end": "\\*/",
110+
"name": "comment.block.groovy"
114111
},
115112
{
116113
"captures": {
@@ -142,7 +139,7 @@
142139
"name": "keyword.control.new.groovy"
143140
}
144141
},
145-
"end": "(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=[;])|$",
142+
"end": "(?<=\\))|$",
146143
"patterns": [
147144
{
148145
"begin": "(?=\\w.*\\(?)",
@@ -198,9 +195,6 @@
198195
{
199196
"include": "#comments"
200197
},
201-
{
202-
"include": "#support-functions"
203-
},
204198
{
205199
"include": "#keyword-language"
206200
},
@@ -279,10 +273,6 @@
279273
"match": "\\?\\:",
280274
"name": "keyword.operator.elvis.groovy"
281275
},
282-
{
283-
"match": "\\*\\:",
284-
"name": "keyword.operator.spreadmap.groovy"
285-
},
286276
{
287277
"match": "\\.\\.",
288278
"name": "keyword.operator.range.groovy"
@@ -475,9 +465,6 @@
475465
},
476466
"parameters": {
477467
"patterns": [
478-
{
479-
"include": "#storage-modifiers"
480-
},
481468
{
482469
"include": "#types"
483470
},
@@ -504,52 +491,6 @@
504491
}
505492
]
506493
},
507-
"regexp": {
508-
"patterns": [
509-
{
510-
"begin": "/(?=[^/]+/([^>]|$))",
511-
"beginCaptures": {
512-
"0": {
513-
"name": "punctuation.definition.string.regexp.begin.groovy"
514-
}
515-
},
516-
"end": "/",
517-
"endCaptures": {
518-
"0": {
519-
"name": "punctuation.definition.string.regexp.end.groovy"
520-
}
521-
},
522-
"name": "string.regexp.groovy",
523-
"patterns": [
524-
{
525-
"match": "\\\\.",
526-
"name": "constant.character.escape.groovy"
527-
}
528-
]
529-
},
530-
{
531-
"begin": "~\"",
532-
"beginCaptures": {
533-
"0": {
534-
"name": "punctuation.definition.string.regexp.begin.groovy"
535-
}
536-
},
537-
"end": "\"",
538-
"endCaptures": {
539-
"0": {
540-
"name": "punctuation.definition.string.regexp.end.groovy"
541-
}
542-
},
543-
"name": "string.regexp.compiled.groovy",
544-
"patterns": [
545-
{
546-
"match": "\\\\.",
547-
"name": "constant.character.escape.groovy"
548-
}
549-
]
550-
}
551-
]
552-
},
553494
"string-quoted-double": {
554495
"begin": "\"",
555496
"beginCaptures": {
@@ -677,6 +618,52 @@
677618
}
678619
]
679620
},
621+
"string-slashy": {
622+
"patterns": [
623+
{
624+
"begin": "/(?=[^/]+/([^>]|$))",
625+
"beginCaptures": {
626+
"0": {
627+
"name": "punctuation.definition.string.regexp.begin.groovy"
628+
}
629+
},
630+
"end": "/",
631+
"endCaptures": {
632+
"0": {
633+
"name": "punctuation.definition.string.regexp.end.groovy"
634+
}
635+
},
636+
"name": "string.regexp.groovy",
637+
"patterns": [
638+
{
639+
"match": "\\\\.",
640+
"name": "constant.character.escape.groovy"
641+
}
642+
]
643+
},
644+
{
645+
"begin": "~\"",
646+
"beginCaptures": {
647+
"0": {
648+
"name": "punctuation.definition.string.regexp.begin.groovy"
649+
}
650+
},
651+
"end": "\"",
652+
"endCaptures": {
653+
"0": {
654+
"name": "punctuation.definition.string.regexp.end.groovy"
655+
}
656+
},
657+
"name": "string.regexp.compiled.groovy",
658+
"patterns": [
659+
{
660+
"match": "\\\\.",
661+
"name": "constant.character.escape.groovy"
662+
}
663+
]
664+
}
665+
]
666+
},
680667
"strings": {
681668
"patterns": [
682669
{
@@ -692,7 +679,7 @@
692679
"include": "#string-quoted-single"
693680
},
694681
{
695-
"include": "#regexp"
682+
"include": "#string-slashy"
696683
}
697684
]
698685
},
@@ -720,14 +707,6 @@
720707
}
721708
]
722709
},
723-
"support-functions": {
724-
"patterns": [
725-
{
726-
"match": "(?x)\\b(?:sprintf|print(?:f|ln)?)\\b",
727-
"name": "support.function.print.groovy"
728-
}
729-
]
730-
},
731710
"types": {
732711
"patterns": [
733712
{

0 commit comments

Comments
 (0)