Skip to content

Commit f21ef42

Browse files
committed
Accept subscription as an operation type.
Fixes #32.
1 parent f4ec166 commit f21ef42

10 files changed

+962
-892
lines changed

lexer.cpp

+152-139
Large diffs are not rendered by default.

lexer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ extern int yylex \
339339
#undef YY_DECL
340340
#endif
341341

342-
#line 155 "lexer.lpp"
342+
#line 156 "lexer.lpp"
343343

344344

345345
#line 346 "lexer.h"

lexer.lpp

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ notnewline [^\n\r]
115115
null { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_NULL; }
116116
on { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_ON; }
117117
query { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_QUERY; }
118+
subscription { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_SUBSCRIPTION; }
118119
true { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_TRUE; }
119120

120121
{INTEGER} { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_INTEGER; }

location.hh

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131
// version 2.2 of Bison.
3232

3333
/**
34-
** \file location.hh
34+
** \file /Users/swolchok/libgraphqlparser/location.hh
3535
** Define the yy::location class.
3636
*/
3737

38-
#ifndef YY_YY_LOCATION_HH_INCLUDED
39-
# define YY_YY_LOCATION_HH_INCLUDED
38+
#ifndef YY_YY_USERS_SWOLCHOK_LIBGRAPHQLPARSER_LOCATION_HH_INCLUDED
39+
# define YY_YY_USERS_SWOLCHOK_LIBGRAPHQLPARSER_LOCATION_HH_INCLUDED
4040

4141
# include "position.hh"
4242

4343

4444
namespace yy {
45-
#line 46 "location.hh" // location.cc:337
45+
#line 46 "/Users/swolchok/libgraphqlparser/location.hh" // location.cc:337
4646
/// Abstract a location.
4747
class location
4848
{
@@ -188,5 +188,5 @@ namespace yy {
188188

189189

190190
} // yy
191-
#line 192 "location.hh" // location.cc:337
192-
#endif // !YY_YY_LOCATION_HH_INCLUDED
191+
#line 192 "/Users/swolchok/libgraphqlparser/location.hh" // location.cc:337
192+
#endif // !YY_YY_USERS_SWOLCHOK_LIBGRAPHQLPARSER_LOCATION_HH_INCLUDED

0 commit comments

Comments
 (0)