parse opent echo tag
This commit is contained in:
parent
880749fbda
commit
e7579c4e05
12
example.php
12
example.php
@ -13,4 +13,14 @@ abstract class Foo extends Bar implements Buz, Buzz {
|
||||
public function &test(bool $a, string $b = null): ?void {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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