Skip to content

Commit 081da0d

Browse files
authored
Merge pull request #3 from dncrews/enumComments
Fix comments in ENUM values
2 parents 4820845 + cddd5a9 commit 081da0d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

GraphQL.sublime-syntax

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ file_extensions:
77
- gql
88
scope: source.graphql
99
contexts:
10+
comments:
11+
# Comments begin with a '#' and finish at the end of the line
12+
- match: '#'
13+
scope: punctuation.definition.comment.graphql
14+
push: line_comment
15+
1016
main:
1117
# Strings begin and end with quotes, and use backslashes as an escape
1218
# character
1319
- match: '"'
1420
scope: punctuation.definition.string.begin.graphql
1521
push: double_quoted_string
1622

17-
# Comments begin with a '//' and finish at the end of the line
18-
- match: '#'
19-
scope: punctuation.definition.comment.graphql
20-
push: line_comment
23+
- include: comments
2124

2225
# Brace matching
2326
- match: '{'
@@ -148,6 +151,7 @@ contexts:
148151
scope: variable.parameter.enum.graphql
149152
- match: '}'
150153
pop: true
154+
- include: comments
151155

152156
parentheses:
153157
- match: '\b\w+(?=\:)'

0 commit comments

Comments
 (0)