Merge pull request #1102 from carsonmcdonald/gvarunderscorefix

Allow globals that start with $_
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-03-28 19:35:52 -07:00
+5
View File
@@ -4729,6 +4729,11 @@ parser_yylex(parser_state *p)
switch (c) {
case '_': /* $_: last read line string */
c = nextc(p);
if (c != -1 && identchar(c)) { /* if there is more after _ it is a variable */
tokadd(p, '$');
tokadd(p, c);
break;
}
pushback(p, c);
c = '_';
/* fall through */