scanner test
This commit is contained in:
parent
21ad25c581
commit
ca6ee77850
@ -209,9 +209,9 @@ func TestIdentifier(t *testing.T) {
|
|||||||
|
|
||||||
'adsf\'adsf\''
|
'adsf\'adsf\''
|
||||||
|
|
||||||
` + "`test $var {$var} ${var_name}`" + `
|
` + "`test $var {$var} ${var_name} {s $ \\$a `" + `
|
||||||
|
|
||||||
"test $var {$var} ${var_name}"
|
"test $var {$var} ${var_name} {s $ \$a "
|
||||||
|
|
||||||
"{$var}"
|
"{$var}"
|
||||||
|
|
||||||
@ -232,6 +232,10 @@ CAT;
|
|||||||
$var[0b1]
|
$var[0b1]
|
||||||
$var[var_name]
|
$var[var_name]
|
||||||
$var[$var]
|
$var[$var]
|
||||||
|
|
||||||
|
{$var}
|
||||||
|
${var_name}
|
||||||
|
{s $ \$a
|
||||||
CAT;
|
CAT;
|
||||||
|
|
||||||
( array )
|
( array )
|
||||||
@ -427,6 +431,7 @@ CAT;
|
|||||||
scanner.T_DOLLAR_OPEN_CURLY_BRACES,
|
scanner.T_DOLLAR_OPEN_CURLY_BRACES,
|
||||||
scanner.T_STRING_VARNAME,
|
scanner.T_STRING_VARNAME,
|
||||||
scanner.Rune2Class('}'),
|
scanner.Rune2Class('}'),
|
||||||
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
scanner.Rune2Class('`'),
|
scanner.Rune2Class('`'),
|
||||||
|
|
||||||
scanner.Rune2Class('"'),
|
scanner.Rune2Class('"'),
|
||||||
@ -440,6 +445,7 @@ CAT;
|
|||||||
scanner.T_DOLLAR_OPEN_CURLY_BRACES,
|
scanner.T_DOLLAR_OPEN_CURLY_BRACES,
|
||||||
scanner.T_STRING_VARNAME,
|
scanner.T_STRING_VARNAME,
|
||||||
scanner.Rune2Class('}'),
|
scanner.Rune2Class('}'),
|
||||||
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
scanner.Rune2Class('"'),
|
scanner.Rune2Class('"'),
|
||||||
|
|
||||||
scanner.Rune2Class('"'),
|
scanner.Rune2Class('"'),
|
||||||
@ -466,37 +472,41 @@ CAT;
|
|||||||
scanner.T_OBJECT_OPERATOR,
|
scanner.T_OBJECT_OPERATOR,
|
||||||
scanner.T_STRING,
|
scanner.T_STRING,
|
||||||
scanner.T_ENCAPSED_AND_WHITESPACE,
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
scanner.T_VARIABLE,
|
scanner.T_VARIABLE,
|
||||||
scanner.Rune2Class('['),
|
scanner.Rune2Class('['),
|
||||||
scanner.T_NUM_STRING,
|
scanner.T_NUM_STRING,
|
||||||
scanner.Rune2Class(']'),
|
scanner.Rune2Class(']'),
|
||||||
scanner.T_ENCAPSED_AND_WHITESPACE,
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
scanner.T_VARIABLE,
|
scanner.T_VARIABLE,
|
||||||
scanner.Rune2Class('['),
|
scanner.Rune2Class('['),
|
||||||
scanner.T_NUM_STRING,
|
scanner.T_NUM_STRING,
|
||||||
scanner.Rune2Class(']'),
|
scanner.Rune2Class(']'),
|
||||||
scanner.T_ENCAPSED_AND_WHITESPACE,
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
scanner.T_VARIABLE,
|
scanner.T_VARIABLE,
|
||||||
scanner.Rune2Class('['),
|
scanner.Rune2Class('['),
|
||||||
scanner.T_NUM_STRING,
|
scanner.T_NUM_STRING,
|
||||||
scanner.Rune2Class(']'),
|
scanner.Rune2Class(']'),
|
||||||
scanner.T_ENCAPSED_AND_WHITESPACE,
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
scanner.T_VARIABLE,
|
scanner.T_VARIABLE,
|
||||||
scanner.Rune2Class('['),
|
scanner.Rune2Class('['),
|
||||||
scanner.T_STRING,
|
scanner.T_STRING,
|
||||||
scanner.Rune2Class(']'),
|
scanner.Rune2Class(']'),
|
||||||
scanner.T_ENCAPSED_AND_WHITESPACE,
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
scanner.T_VARIABLE,
|
scanner.T_VARIABLE,
|
||||||
scanner.Rune2Class('['),
|
scanner.Rune2Class('['),
|
||||||
scanner.T_VARIABLE,
|
scanner.T_VARIABLE,
|
||||||
scanner.Rune2Class(']'),
|
scanner.Rune2Class(']'),
|
||||||
scanner.T_ENCAPSED_AND_WHITESPACE,
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
|
scanner.T_CURLY_OPEN,
|
||||||
|
scanner.T_VARIABLE,
|
||||||
|
scanner.Rune2Class('}'),
|
||||||
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
scanner.T_DOLLAR_OPEN_CURLY_BRACES,
|
||||||
|
scanner.T_STRING_VARNAME,
|
||||||
|
scanner.Rune2Class('}'),
|
||||||
|
scanner.T_ENCAPSED_AND_WHITESPACE,
|
||||||
|
|
||||||
scanner.T_END_HEREDOC,
|
scanner.T_END_HEREDOC,
|
||||||
scanner.Rune2Class(';'),
|
scanner.Rune2Class(';'),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user