File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -924,30 +924,30 @@ YY_RULE_SETUP
924924{
925925 BEGIN (INITIAL);
926926 yylval->str = yyextra->str .c_str ();
927+ *yylloc = yyextra->loc ;
927928 return yy::GraphQLParserImpl::token::TOK_STRING;
928929 }
929930 YY_BREAK
930931case 2 :
931932/* rule 2 can match eol */
932933YY_RULE_SETUP
933- #line 63 "lexer.lpp"
934+ #line 64 "lexer.lpp"
934935{
935936 throw make_error (yyextra->loc , " Unterminated string" );
936937 }
937938 YY_BREAK
938939case YY_STATE_EOF (STRING_STATE):
939- #line 67 "lexer.lpp"
940+ #line 68 "lexer.lpp"
940941{
941942 throw make_error (yyextra->loc , " Unterminated string at EOF" );
942943 }
943944 YY_BREAK
944945case 3 :
945946YY_RULE_SETUP
946- #line 71 "lexer.lpp"
947+ #line 72 "lexer.lpp"
947948{
948949 char *p = yytext;
949950 while (*p) {
950- yyextra->loc .columns ();
951951 yyextra->str .push_back (*p++);
952952 }
953953 }
@@ -1017,13 +1017,13 @@ case 15:
10171017/* rule 15 can match eol */
10181018YY_RULE_SETUP
10191019#line 100 "lexer.lpp"
1020- { yyextra->loc .step (); BEGIN (INITIAL); }
1020+ { yyextra->loc .lines (yyleng / 2 ); yyextra-> loc . step (); BEGIN (INITIAL); }
10211021 YY_BREAK
10221022case 16 :
10231023/* rule 16 can match eol */
10241024YY_RULE_SETUP
10251025#line 101 "lexer.lpp"
1026- { yyextra->loc .step (); BEGIN (INITIAL); }
1026+ { yyextra->loc .lines (yyleng); yyextra-> loc . step (); BEGIN (INITIAL); }
10271027 YY_BREAK
10281028case 17 :
10291029YY_RULE_SETUP
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ notnewline [^\n\r]
5656 \" {
5757 BEGIN(INITIAL);
5858 yylval->str = yyextra->str.c_str();
59+ *yylloc = yyextra->loc;
5960 return yy::GraphQLParserImpl::token::TOK_STRING;
6061 }
6162
@@ -70,7 +71,6 @@ notnewline [^\n\r]
7071 {STRINGCHAR}+ {
7172 char *p = yytext;
7273 while (*p) {
73- yyextra->loc.columns();
7474 yyextra->str.push_back(*p++);
7575 }
7676 }
@@ -96,8 +96,8 @@ notnewline [^\n\r]
9696}
9797
9898<LINE_COMMENT_STATE>{
99- {CRLF} { yyextra->loc.step(); BEGIN(INITIAL); }
100- {newline} { yyextra->loc.step(); BEGIN(INITIAL); }
99+ {CRLF} { yyextra->loc.lines(yyleng / 2); yyextra->loc. step(); BEGIN(INITIAL); }
100+ {newline} { yyextra->loc.lines(yyleng); yyextra->loc. step(); BEGIN(INITIAL); }
101101 {notnewline}+ /* eat comment character */
102102}
103103
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments