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
924
924
{
925
925
BEGIN (INITIAL);
926
926
yylval->str = yyextra->str .c_str ();
927
+ *yylloc = yyextra->loc ;
927
928
return yy::GraphQLParserImpl::token::TOK_STRING;
928
929
}
929
930
YY_BREAK
930
931
case 2 :
931
932
/* rule 2 can match eol */
932
933
YY_RULE_SETUP
933
- #line 63 "lexer.lpp"
934
+ #line 64 "lexer.lpp"
934
935
{
935
936
throw make_error (yyextra->loc , " Unterminated string" );
936
937
}
937
938
YY_BREAK
938
939
case YY_STATE_EOF (STRING_STATE):
939
- #line 67 "lexer.lpp"
940
+ #line 68 "lexer.lpp"
940
941
{
941
942
throw make_error (yyextra->loc , " Unterminated string at EOF" );
942
943
}
943
944
YY_BREAK
944
945
case 3 :
945
946
YY_RULE_SETUP
946
- #line 71 "lexer.lpp"
947
+ #line 72 "lexer.lpp"
947
948
{
948
949
char *p = yytext;
949
950
while (*p) {
950
- yyextra->loc .columns ();
951
951
yyextra->str .push_back (*p++);
952
952
}
953
953
}
@@ -1017,13 +1017,13 @@ case 15:
1017
1017
/* rule 15 can match eol */
1018
1018
YY_RULE_SETUP
1019
1019
#line 100 "lexer.lpp"
1020
- { yyextra->loc .step (); BEGIN (INITIAL); }
1020
+ { yyextra->loc .lines (yyleng / 2 ); yyextra-> loc . step (); BEGIN (INITIAL); }
1021
1021
YY_BREAK
1022
1022
case 16 :
1023
1023
/* rule 16 can match eol */
1024
1024
YY_RULE_SETUP
1025
1025
#line 101 "lexer.lpp"
1026
- { yyextra->loc .step (); BEGIN (INITIAL); }
1026
+ { yyextra->loc .lines (yyleng); yyextra-> loc . step (); BEGIN (INITIAL); }
1027
1027
YY_BREAK
1028
1028
case 17 :
1029
1029
YY_RULE_SETUP
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ notnewline [^\n\r]
56
56
\" {
57
57
BEGIN(INITIAL);
58
58
yylval->str = yyextra->str.c_str();
59
+ *yylloc = yyextra->loc;
59
60
return yy::GraphQLParserImpl::token::TOK_STRING;
60
61
}
61
62
@@ -70,7 +71,6 @@ notnewline [^\n\r]
70
71
{STRINGCHAR}+ {
71
72
char *p = yytext;
72
73
while (*p) {
73
- yyextra->loc.columns();
74
74
yyextra->str.push_back(*p++);
75
75
}
76
76
}
@@ -96,8 +96,8 @@ notnewline [^\n\r]
96
96
}
97
97
98
98
<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); }
101
101
{notnewline}+ /* eat comment character */
102
102
}
103
103
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments