Commit af4eb8f9 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1138 from h2so5/syntax-error-for-incomplete-global-variable

Add syntax error for incomplete global variables
parents 97aee949 51ef69de
......@@ -4726,6 +4726,10 @@ parser_yylex(parser_state *p)
p->lstate = EXPR_END;
token_column = newtok(p);
c = nextc(p);
if (c == -1) {
yyerror(p, "incomplete global variable syntax");
return 0;
}
switch (c) {
case '_': /* $_: last read line string */
c = nextc(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment