parse opent echo tag
This commit is contained in:
parent
880749fbda
commit
e7579c4e05
10
example.php
10
example.php
@ -14,3 +14,13 @@ abstract class Foo extends Bar implements Buz, Buzz {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($a === true) {
|
||||
} elseif ($a === false) {
|
||||
} elseif ($a === null) {
|
||||
} else {
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?= $b; $b ?>
|
@ -7715,7 +7715,7 @@ yyrule5: // \<\?=
|
||||
{
|
||||
l.begin(PHP)
|
||||
lval.token = string(l.TokenBytes(nil))
|
||||
return T_OPEN_TAG_WITH_ECHO
|
||||
return T_ECHO
|
||||
goto yystate0
|
||||
}
|
||||
yyrule6: // [ \t\n\r]+
|
||||
@ -7725,7 +7725,9 @@ yyrule6: // [ \t\n\r]+
|
||||
}
|
||||
yyrule7: // \?\>{NEW_LINE}?
|
||||
{
|
||||
l.begin(INITIAL) //lval.token = string(l.TokenBytes(nil)); return T_CLOSE_TAG;
|
||||
l.begin(INITIAL)
|
||||
lval.token = ";"
|
||||
return rune2Class(';')
|
||||
goto yystate0
|
||||
}
|
||||
yyrule8: // {DNUM}|{EXPONENT_DNUM}
|
||||
|
@ -96,10 +96,10 @@ NEW_LINE (\r|\n|\r\n)
|
||||
|
||||
<INITIAL>\<\?php([ \t]|{NEW_LINE}) l.begin(PHP);//lval.token = string(l.TokenBytes(nil)); return T_OPEN_TAG;
|
||||
<INITIAL>\<\? l.begin(PHP);//lval.token = string(l.TokenBytes(nil)); return T_OPEN_TAG;
|
||||
<INITIAL>\<\?= l.begin(PHP);lval.token = string(l.TokenBytes(nil)); return T_OPEN_TAG_WITH_ECHO;
|
||||
<INITIAL>\<\?= l.begin(PHP);lval.token = string(l.TokenBytes(nil)); return T_ECHO;
|
||||
|
||||
<PHP>[ \t\n\r]+ //lval.token = string(l.TokenBytes(nil)); return T_WHITESPACE
|
||||
<PHP>\?\>{NEW_LINE}? l.begin(INITIAL);//lval.token = string(l.TokenBytes(nil)); return T_CLOSE_TAG;
|
||||
<PHP>\?\>{NEW_LINE}? l.begin(INITIAL);lval.token = ";"; return rune2Class(';');
|
||||
|
||||
<PHP>{DNUM}|{EXPONENT_DNUM} lval.token = string(l.TokenBytes(nil)); return T_DNUMBER
|
||||
<PHP>{BNUM}
|
||||
|
Loading…
Reference in New Issue
Block a user