#62: save the all text after __halt_compiler(); as Meta

This commit is contained in:
z7zmey
2018-09-13 20:07:50 +03:00
parent 4989d31874
commit b805f0b167
4 changed files with 8 additions and 4 deletions

View File

@@ -8948,7 +8948,7 @@ yyrule167: // .
}
yyrule168: // .|[ \t\n\r]
{
// do nothing
l.addMeta(meta.TokenType, l.Token())
goto yystate0
}
panic("unreachable")

View File

@@ -673,7 +673,7 @@ NEW_LINE (\r|\n|\r\n)
<STRING_VAR_NAME>{VAR_NAME}[\[\}] l.popState();l.pushState(PHP);lval.Token(l.createToken(l.ungetChars(1))); return int(T_STRING_VARNAME)
<STRING_VAR_NAME>. l.ungetChars(1);l.popState();l.pushState(PHP)
<HALT_COMPILER>.|[ \t\n\r] // do nothing
<HALT_COMPILER>.|[ \t\n\r] l.addMeta(meta.TokenType, l.Token())
%%
if _, ok := l.Abort(); ok {