add (binary) cast

This commit is contained in:
z7zmey 2018-06-05 12:24:24 +03:00
parent 876c5845d9
commit 95c257c0f6
3 changed files with 2366 additions and 2326 deletions

File diff suppressed because it is too large Load Diff

View File

@ -213,7 +213,7 @@ NEW_LINE (\r|\n|\r\n)
<PHP>\([ \t]*(real|double|float)[ \t]*\) lval.Token(l.newToken(l.Token())); return T_DOUBLE_CAST
<PHP>\([ \t]*(int|integer)[ \t]*\) lval.Token(l.newToken(l.Token())); return T_INT_CAST
<PHP>\([ \t]*object[ \t]*\) lval.Token(l.newToken(l.Token())); return T_OBJECT_CAST
<PHP>\([ \t]*string[ \t]*\) lval.Token(l.newToken(l.Token())); return T_STRING_CAST
<PHP>\([ \t]*(string|binary)[ \t]*\) lval.Token(l.newToken(l.Token())); return T_STRING_CAST
<PHP>\([ \t]*unset[ \t]*\) lval.Token(l.newToken(l.Token())); return T_UNSET_CAST
<PHP>new lval.Token(l.newToken(l.Token())); return T_NEW
<PHP>and lval.Token(l.newToken(l.Token())); return T_LOGICAL_AND

View File

@ -224,6 +224,7 @@ func TestTokens(t *testing.T) {
( integer )
( object )
( string )
( binary )
( unset )
`
@ -408,6 +409,7 @@ func TestTokens(t *testing.T) {
scanner.T_INT_CAST,
scanner.T_OBJECT_CAST,
scanner.T_STRING_CAST,
scanner.T_STRING_CAST,
scanner.T_UNSET_CAST,
}