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

Add syntax error for incomplete global variables
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-04-05 08:34:59 -07:00
+4
View File
@@ -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);