Skip to content

Commit 1fcd8ae

Browse files
committed
allow comments in grammar
1 parent 615e000 commit 1fcd8ae

File tree

3 files changed

+80
-73
lines changed

3 files changed

+80
-73
lines changed

src/main/grammar/Graphql.g4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ fragment EscapedChar : '\\' (["\\/bfnrt] | Unicode) ;
134134
fragment Unicode : 'u' Hex Hex Hex Hex ;
135135
fragment Hex : [0-9a-fA-F] ;
136136
137-
Ignored: (Whitspace|Comma|LineTerminator) -> skip;
137+
Ignored: (Whitspace|Comma|LineTerminator|Comment) -> skip;
138+
139+
fragment Comment: '#' ~[\n\r\u2028\u2029]*;
138140
139141
fragment LineTerminator: [\n\r\u2028\u2029];
140142

src/main/java/graphql/parser/antlr/GraphqlLexer.java

Lines changed: 73 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class GraphqlLexer extends Lexer {
3030
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "BooleanValue",
3131
"NAME", "IntValue", "FloatValue", "Sign", "IntegerPart", "NonZeroDigit",
3232
"ExponentPart", "Digit", "StringValue", "EscapedChar", "Unicode", "Hex",
33-
"Ignored", "LineTerminator", "Whitspace", "Comma"
33+
"Ignored", "Comment", "LineTerminator", "Whitspace", "Comma"
3434
};
3535

3636
private static final String[] _LITERAL_NAMES = {
@@ -99,78 +99,82 @@ public GraphqlLexer(CharStream input) {
9999
public ATN getATN() { return _ATN; }
100100

101101
public static final String _serializedATN =
102-
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\35\u00db\b\1\4\2"+
102+
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\35\u00e5\b\1\4\2"+
103103
"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
104104
"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
105105
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
106106
"\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+
107-
" \4!\t!\4\"\t\"\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
108-
"\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\13\3"+
109-
"\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16"+
110-
"\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+
111-
"\3\22\5\22\u0084\n\22\3\23\3\23\7\23\u0088\n\23\f\23\16\23\u008b\13\23"+
112-
"\3\24\5\24\u008e\n\24\3\24\3\24\3\25\5\25\u0093\n\25\3\25\3\25\3\25\6"+
113-
"\25\u0098\n\25\r\25\16\25\u0099\3\25\5\25\u009d\n\25\3\26\3\26\3\27\3"+
114-
"\27\3\27\3\27\6\27\u00a5\n\27\r\27\16\27\u00a6\5\27\u00a9\n\27\3\30\3"+
115-
"\30\3\31\3\31\5\31\u00af\n\31\3\31\6\31\u00b2\n\31\r\31\16\31\u00b3\3"+
116-
"\32\3\32\3\33\3\33\3\33\7\33\u00bb\n\33\f\33\16\33\u00be\13\33\3\33\3"+
117-
"\33\3\34\3\34\3\34\5\34\u00c5\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\36"+
118-
"\3\36\3\37\3\37\3\37\5\37\u00d2\n\37\3\37\3\37\3 \3 \3!\3!\3\"\3\"\2\2"+
119-
"#\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20"+
120-
"\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\29\2;\2="+
121-
"\35?\2A\2C\2\3\2\t\5\2C\\aac|\6\2\62;C\\aac|\7\2\f\f\17\17$$^^\u202a\u202b"+
122-
"\n\2$$\61\61^^ddhhppttvv\5\2\62;CHch\5\2\f\f\17\17\u202a\u202b\6\2\13"+
123-
"\13\r\16\"\"\u00a2\u00a2\u00e4\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+
124-
"\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+
125-
"\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+
126-
"\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2"+
127-
"+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+
128-
"\2=\3\2\2\2\3E\3\2\2\2\5K\3\2\2\2\7T\3\2\2\2\tV\3\2\2\2\13X\3\2\2\2\r"+
129-
"Z\3\2\2\2\17\\\3\2\2\2\21^\3\2\2\2\23`\3\2\2\2\25b\3\2\2\2\27f\3\2\2\2"+
130-
"\31i\3\2\2\2\33r\3\2\2\2\35t\3\2\2\2\37v\3\2\2\2!x\3\2\2\2#\u0083\3\2"+
131-
"\2\2%\u0085\3\2\2\2\'\u008d\3\2\2\2)\u0092\3\2\2\2+\u009e\3\2\2\2-\u00a8"+
132-
"\3\2\2\2/\u00aa\3\2\2\2\61\u00ac\3\2\2\2\63\u00b5\3\2\2\2\65\u00b7\3\2"+
133-
"\2\2\67\u00c1\3\2\2\29\u00c6\3\2\2\2;\u00cc\3\2\2\2=\u00d1\3\2\2\2?\u00d5"+
134-
"\3\2\2\2A\u00d7\3\2\2\2C\u00d9\3\2\2\2EF\7s\2\2FG\7w\2\2GH\7g\2\2HI\7"+
135-
"t\2\2IJ\7{\2\2J\4\3\2\2\2KL\7o\2\2LM\7w\2\2MN\7v\2\2NO\7c\2\2OP\7v\2\2"+
136-
"PQ\7k\2\2QR\7q\2\2RS\7p\2\2S\6\3\2\2\2TU\7*\2\2U\b\3\2\2\2VW\7+\2\2W\n"+
137-
"\3\2\2\2XY\7<\2\2Y\f\3\2\2\2Z[\7&\2\2[\16\3\2\2\2\\]\7?\2\2]\20\3\2\2"+
138-
"\2^_\7}\2\2_\22\3\2\2\2`a\7\177\2\2a\24\3\2\2\2bc\7\60\2\2cd\7\60\2\2"+
139-
"de\7\60\2\2e\26\3\2\2\2fg\7q\2\2gh\7p\2\2h\30\3\2\2\2ij\7h\2\2jk\7t\2"+
140-
"\2kl\7c\2\2lm\7i\2\2mn\7o\2\2no\7g\2\2op\7p\2\2pq\7v\2\2q\32\3\2\2\2r"+
141-
"s\7]\2\2s\34\3\2\2\2tu\7_\2\2u\36\3\2\2\2vw\7B\2\2w \3\2\2\2xy\7#\2\2"+
142-
"y\"\3\2\2\2z{\7v\2\2{|\7t\2\2|}\7w\2\2}\u0084\7g\2\2~\177\7h\2\2\177\u0080"+
143-
"\7c\2\2\u0080\u0081\7n\2\2\u0081\u0082\7u\2\2\u0082\u0084\7g\2\2\u0083"+
144-
"z\3\2\2\2\u0083~\3\2\2\2\u0084$\3\2\2\2\u0085\u0089\t\2\2\2\u0086\u0088"+
145-
"\t\3\2\2\u0087\u0086\3\2\2\2\u0088\u008b\3\2\2\2\u0089\u0087\3\2\2\2\u0089"+
146-
"\u008a\3\2\2\2\u008a&\3\2\2\2\u008b\u0089\3\2\2\2\u008c\u008e\5+\26\2"+
147-
"\u008d\u008c\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0090"+
148-
"\5-\27\2\u0090(\3\2\2\2\u0091\u0093\5+\26\2\u0092\u0091\3\2\2\2\u0092"+
149-
"\u0093\3\2\2\2\u0093\u0094\3\2\2\2\u0094\u0095\5-\27\2\u0095\u0097\7\60"+
150-
"\2\2\u0096\u0098\5\63\32\2\u0097\u0096\3\2\2\2\u0098\u0099\3\2\2\2\u0099"+
151-
"\u0097\3\2\2\2\u0099\u009a\3\2\2\2\u009a\u009c\3\2\2\2\u009b\u009d\5\61"+
152-
"\31\2\u009c\u009b\3\2\2\2\u009c\u009d\3\2\2\2\u009d*\3\2\2\2\u009e\u009f"+
153-
"\7/\2\2\u009f,\3\2\2\2\u00a0\u00a9\7\62\2\2\u00a1\u00a9\5/\30\2\u00a2"+
154-
"\u00a4\5/\30\2\u00a3\u00a5\5\63\32\2\u00a4\u00a3\3\2\2\2\u00a5\u00a6\3"+
155-
"\2\2\2\u00a6\u00a4\3\2\2\2\u00a6\u00a7\3\2\2\2\u00a7\u00a9\3\2\2\2\u00a8"+
156-
"\u00a0\3\2\2\2\u00a8\u00a1\3\2\2\2\u00a8\u00a2\3\2\2\2\u00a9.\3\2\2\2"+
157-
"\u00aa\u00ab\4\63;\2\u00ab\60\3\2\2\2\u00ac\u00ae\7g\2\2\u00ad\u00af\5"+
158-
"+\26\2\u00ae\u00ad\3\2\2\2\u00ae\u00af\3\2\2\2\u00af\u00b1\3\2\2\2\u00b0"+
159-
"\u00b2\5\63\32\2\u00b1\u00b0\3\2\2\2\u00b2\u00b3\3\2\2\2\u00b3\u00b1\3"+
160-
"\2\2\2\u00b3\u00b4\3\2\2\2\u00b4\62\3\2\2\2\u00b5\u00b6\4\62;\2\u00b6"+
161-
"\64\3\2\2\2\u00b7\u00bc\7$\2\2\u00b8\u00bb\n\4\2\2\u00b9\u00bb\5\67\34"+
162-
"\2\u00ba\u00b8\3\2\2\2\u00ba\u00b9\3\2\2\2\u00bb\u00be\3\2\2\2\u00bc\u00ba"+
163-
"\3\2\2\2\u00bc\u00bd\3\2\2\2\u00bd\u00bf\3\2\2\2\u00be\u00bc\3\2\2\2\u00bf"+
164-
"\u00c0\7$\2\2\u00c0\66\3\2\2\2\u00c1\u00c4\7^\2\2\u00c2\u00c5\t\5\2\2"+
165-
"\u00c3\u00c5\59\35\2\u00c4\u00c2\3\2\2\2\u00c4\u00c3\3\2\2\2\u00c58\3"+
166-
"\2\2\2\u00c6\u00c7\7w\2\2\u00c7\u00c8\5;\36\2\u00c8\u00c9\5;\36\2\u00c9"+
167-
"\u00ca\5;\36\2\u00ca\u00cb\5;\36\2\u00cb:\3\2\2\2\u00cc\u00cd\t\6\2\2"+
168-
"\u00cd<\3\2\2\2\u00ce\u00d2\5A!\2\u00cf\u00d2\5C\"\2\u00d0\u00d2\5? \2"+
169-
"\u00d1\u00ce\3\2\2\2\u00d1\u00cf\3\2\2\2\u00d1\u00d0\3\2\2\2\u00d2\u00d3"+
170-
"\3\2\2\2\u00d3\u00d4\b\37\2\2\u00d4>\3\2\2\2\u00d5\u00d6\t\7\2\2\u00d6"+
171-
"@\3\2\2\2\u00d7\u00d8\t\b\2\2\u00d8B\3\2\2\2\u00d9\u00da\7.\2\2\u00da"+
172-
"D\3\2\2\2\21\2\u0083\u0089\u008d\u0092\u0099\u009c\u00a6\u00a8\u00ae\u00b3"+
173-
"\u00ba\u00bc\u00c4\u00d1\3\b\2\2";
107+
" \4!\t!\4\"\t\"\4#\t#\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3"+
108+
"\3\3\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3"+
109+
"\13\3\13\3\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16"+
110+
"\3\16\3\17\3\17\3\20\3\20\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+
111+
"\3\22\3\22\5\22\u0086\n\22\3\23\3\23\7\23\u008a\n\23\f\23\16\23\u008d"+
112+
"\13\23\3\24\5\24\u0090\n\24\3\24\3\24\3\25\5\25\u0095\n\25\3\25\3\25\3"+
113+
"\25\6\25\u009a\n\25\r\25\16\25\u009b\3\25\5\25\u009f\n\25\3\26\3\26\3"+
114+
"\27\3\27\3\27\3\27\6\27\u00a7\n\27\r\27\16\27\u00a8\5\27\u00ab\n\27\3"+
115+
"\30\3\30\3\31\3\31\5\31\u00b1\n\31\3\31\6\31\u00b4\n\31\r\31\16\31\u00b5"+
116+
"\3\32\3\32\3\33\3\33\3\33\7\33\u00bd\n\33\f\33\16\33\u00c0\13\33\3\33"+
117+
"\3\33\3\34\3\34\3\34\5\34\u00c7\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\36"+
118+
"\3\36\3\37\3\37\3\37\3\37\5\37\u00d5\n\37\3\37\3\37\3 \3 \7 \u00db\n "+
119+
"\f \16 \u00de\13 \3!\3!\3\"\3\"\3#\3#\2\2$\3\3\5\4\7\5\t\6\13\7\r\b\17"+
120+
"\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+"+
121+
"\27-\30/\31\61\32\63\33\65\34\67\29\2;\2=\35?\2A\2C\2E\2\3\2\t\5\2C\\"+
122+
"aac|\6\2\62;C\\aac|\7\2\f\f\17\17$$^^\u202a\u202b\n\2$$\61\61^^ddhhpp"+
123+
"ttvv\5\2\62;CHch\5\2\f\f\17\17\u202a\u202b\6\2\13\13\r\16\"\"\u00a2\u00a2"+
124+
"\u00ef\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2"+
125+
"\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3"+
126+
"\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2"+
127+
"\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2"+
128+
"/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2=\3\2\2\2\3G\3\2\2\2"+
129+
"\5M\3\2\2\2\7V\3\2\2\2\tX\3\2\2\2\13Z\3\2\2\2\r\\\3\2\2\2\17^\3\2\2\2"+
130+
"\21`\3\2\2\2\23b\3\2\2\2\25d\3\2\2\2\27h\3\2\2\2\31k\3\2\2\2\33t\3\2\2"+
131+
"\2\35v\3\2\2\2\37x\3\2\2\2!z\3\2\2\2#\u0085\3\2\2\2%\u0087\3\2\2\2\'\u008f"+
132+
"\3\2\2\2)\u0094\3\2\2\2+\u00a0\3\2\2\2-\u00aa\3\2\2\2/\u00ac\3\2\2\2\61"+
133+
"\u00ae\3\2\2\2\63\u00b7\3\2\2\2\65\u00b9\3\2\2\2\67\u00c3\3\2\2\29\u00c8"+
134+
"\3\2\2\2;\u00ce\3\2\2\2=\u00d4\3\2\2\2?\u00d8\3\2\2\2A\u00df\3\2\2\2C"+
135+
"\u00e1\3\2\2\2E\u00e3\3\2\2\2GH\7s\2\2HI\7w\2\2IJ\7g\2\2JK\7t\2\2KL\7"+
136+
"{\2\2L\4\3\2\2\2MN\7o\2\2NO\7w\2\2OP\7v\2\2PQ\7c\2\2QR\7v\2\2RS\7k\2\2"+
137+
"ST\7q\2\2TU\7p\2\2U\6\3\2\2\2VW\7*\2\2W\b\3\2\2\2XY\7+\2\2Y\n\3\2\2\2"+
138+
"Z[\7<\2\2[\f\3\2\2\2\\]\7&\2\2]\16\3\2\2\2^_\7?\2\2_\20\3\2\2\2`a\7}\2"+
139+
"\2a\22\3\2\2\2bc\7\177\2\2c\24\3\2\2\2de\7\60\2\2ef\7\60\2\2fg\7\60\2"+
140+
"\2g\26\3\2\2\2hi\7q\2\2ij\7p\2\2j\30\3\2\2\2kl\7h\2\2lm\7t\2\2mn\7c\2"+
141+
"\2no\7i\2\2op\7o\2\2pq\7g\2\2qr\7p\2\2rs\7v\2\2s\32\3\2\2\2tu\7]\2\2u"+
142+
"\34\3\2\2\2vw\7_\2\2w\36\3\2\2\2xy\7B\2\2y \3\2\2\2z{\7#\2\2{\"\3\2\2"+
143+
"\2|}\7v\2\2}~\7t\2\2~\177\7w\2\2\177\u0086\7g\2\2\u0080\u0081\7h\2\2\u0081"+
144+
"\u0082\7c\2\2\u0082\u0083\7n\2\2\u0083\u0084\7u\2\2\u0084\u0086\7g\2\2"+
145+
"\u0085|\3\2\2\2\u0085\u0080\3\2\2\2\u0086$\3\2\2\2\u0087\u008b\t\2\2\2"+
146+
"\u0088\u008a\t\3\2\2\u0089\u0088\3\2\2\2\u008a\u008d\3\2\2\2\u008b\u0089"+
147+
"\3\2\2\2\u008b\u008c\3\2\2\2\u008c&\3\2\2\2\u008d\u008b\3\2\2\2\u008e"+
148+
"\u0090\5+\26\2\u008f\u008e\3\2\2\2\u008f\u0090\3\2\2\2\u0090\u0091\3\2"+
149+
"\2\2\u0091\u0092\5-\27\2\u0092(\3\2\2\2\u0093\u0095\5+\26\2\u0094\u0093"+
150+
"\3\2\2\2\u0094\u0095\3\2\2\2\u0095\u0096\3\2\2\2\u0096\u0097\5-\27\2\u0097"+
151+
"\u0099\7\60\2\2\u0098\u009a\5\63\32\2\u0099\u0098\3\2\2\2\u009a\u009b"+
152+
"\3\2\2\2\u009b\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009e\3\2\2\2\u009d"+
153+
"\u009f\5\61\31\2\u009e\u009d\3\2\2\2\u009e\u009f\3\2\2\2\u009f*\3\2\2"+
154+
"\2\u00a0\u00a1\7/\2\2\u00a1,\3\2\2\2\u00a2\u00ab\7\62\2\2\u00a3\u00ab"+
155+
"\5/\30\2\u00a4\u00a6\5/\30\2\u00a5\u00a7\5\63\32\2\u00a6\u00a5\3\2\2\2"+
156+
"\u00a7\u00a8\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a8\u00a9\3\2\2\2\u00a9\u00ab"+
157+
"\3\2\2\2\u00aa\u00a2\3\2\2\2\u00aa\u00a3\3\2\2\2\u00aa\u00a4\3\2\2\2\u00ab"+
158+
".\3\2\2\2\u00ac\u00ad\4\63;\2\u00ad\60\3\2\2\2\u00ae\u00b0\7g\2\2\u00af"+
159+
"\u00b1\5+\26\2\u00b0\u00af\3\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b3\3\2"+
160+
"\2\2\u00b2\u00b4\5\63\32\2\u00b3\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5"+
161+
"\u00b3\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\62\3\2\2\2\u00b7\u00b8\4\62;"+
162+
"\2\u00b8\64\3\2\2\2\u00b9\u00be\7$\2\2\u00ba\u00bd\n\4\2\2\u00bb\u00bd"+
163+
"\5\67\34\2\u00bc\u00ba\3\2\2\2\u00bc\u00bb\3\2\2\2\u00bd\u00c0\3\2\2\2"+
164+
"\u00be\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf\u00c1\3\2\2\2\u00c0\u00be"+
165+
"\3\2\2\2\u00c1\u00c2\7$\2\2\u00c2\66\3\2\2\2\u00c3\u00c6\7^\2\2\u00c4"+
166+
"\u00c7\t\5\2\2\u00c5\u00c7\59\35\2\u00c6\u00c4\3\2\2\2\u00c6\u00c5\3\2"+
167+
"\2\2\u00c78\3\2\2\2\u00c8\u00c9\7w\2\2\u00c9\u00ca\5;\36\2\u00ca\u00cb"+
168+
"\5;\36\2\u00cb\u00cc\5;\36\2\u00cc\u00cd\5;\36\2\u00cd:\3\2\2\2\u00ce"+
169+
"\u00cf\t\6\2\2\u00cf<\3\2\2\2\u00d0\u00d5\5C\"\2\u00d1\u00d5\5E#\2\u00d2"+
170+
"\u00d5\5A!\2\u00d3\u00d5\5? \2\u00d4\u00d0\3\2\2\2\u00d4\u00d1\3\2\2\2"+
171+
"\u00d4\u00d2\3\2\2\2\u00d4\u00d3\3\2\2\2\u00d5\u00d6\3\2\2\2\u00d6\u00d7"+
172+
"\b\37\2\2\u00d7>\3\2\2\2\u00d8\u00dc\7%\2\2\u00d9\u00db\n\7\2\2\u00da"+
173+
"\u00d9\3\2\2\2\u00db\u00de\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd\3\2"+
174+
"\2\2\u00dd@\3\2\2\2\u00de\u00dc\3\2\2\2\u00df\u00e0\t\7\2\2\u00e0B\3\2"+
175+
"\2\2\u00e1\u00e2\t\b\2\2\u00e2D\3\2\2\2\u00e3\u00e4\7.\2\2\u00e4F\3\2"+
176+
"\2\2\22\2\u0085\u008b\u008f\u0094\u009b\u009e\u00a8\u00aa\u00b0\u00b5"+
177+
"\u00bc\u00be\u00c6\u00d4\u00dc\3\b\2\2";
174178
public static final ATN _ATN =
175179
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
176180
static {

src/test/groovy/graphql/parser/ParserTest.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ class ParserTest extends Specification {
298298
document.definitions[0] == queryDefinition
299299
}
300300

301-
def "parse complex string value"(){
301+
def "parse complex string value and comment"(){
302302
given:
303303
def input = """
304-
{
305-
hello(arg: "hello, world" ) }
304+
{ # this is some comment, which should be igored
305+
hello(arg: "hello, world" ) }
306306
"""
307307

308308
when:
@@ -316,6 +316,7 @@ class ParserTest extends Specification {
316316

317317

318318

319+
319320
Field getInnerField(SelectionSet selectionSet) {
320321
def field = (Field) selectionSet.selections[0]
321322
(Field) field.selectionSet.selections[0]

0 commit comments

Comments
 (0)