Skip to content

Commit

Permalink
Accept subscription as an operation type.
Browse files Browse the repository at this point in the history
Fixes #32.
  • Loading branch information
swolchok committed Apr 29, 2016
1 parent f4ec166 commit f21ef42
Show file tree
Hide file tree
Showing 10 changed files with 962 additions and 892 deletions.
291 changes: 152 additions & 139 deletions lexer.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ extern int yylex \
#undef YY_DECL
#endif

#line 155 "lexer.lpp"
#line 156 "lexer.lpp"


#line 346 "lexer.h"
Expand Down
1 change: 1 addition & 0 deletions lexer.lpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ notnewline [^\n\r]
null { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_NULL; }
on { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_ON; }
query { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_QUERY; }
subscription { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_SUBSCRIPTION; }
true { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_TRUE; }

{INTEGER} { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_INTEGER; }
Expand Down
12 changes: 6 additions & 6 deletions location.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
// version 2.2 of Bison.

/**
** \file location.hh
** \file /Users/swolchok/libgraphqlparser/location.hh
** Define the yy::location class.
*/

#ifndef YY_YY_LOCATION_HH_INCLUDED
# define YY_YY_LOCATION_HH_INCLUDED
#ifndef YY_YY_USERS_SWOLCHOK_LIBGRAPHQLPARSER_LOCATION_HH_INCLUDED
# define YY_YY_USERS_SWOLCHOK_LIBGRAPHQLPARSER_LOCATION_HH_INCLUDED

# include "position.hh"


namespace yy {
#line 46 "location.hh" // location.cc:337
#line 46 "/Users/swolchok/libgraphqlparser/location.hh" // location.cc:337
/// Abstract a location.
class location
{
Expand Down Expand Up @@ -188,5 +188,5 @@ namespace yy {


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

0 comments on commit f21ef42

Please sign in to comment.