2015-08-20 16:42:49 +02:00
|
|
|
Invalid group use syntax
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
// Missing semicolon
|
|
|
|
use Foo\{Bar}
|
|
|
|
use Bar\{Foo};
|
|
|
|
-----
|
|
|
|
Syntax error, unexpected T_USE, expecting ';' from 4:1 to 4:3
|
|
|
|
array(
|
|
|
|
0: Stmt_GroupUse(
|
2016-07-25 14:04:04 +02:00
|
|
|
type: TYPE_UNKNOWN (0)
|
2015-08-20 16:42:49 +02:00
|
|
|
prefix: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
|
|
|
)
|
|
|
|
uses: array(
|
|
|
|
0: Stmt_UseUse(
|
2016-07-25 14:04:04 +02:00
|
|
|
type: TYPE_NORMAL (1)
|
2015-08-20 16:42:49 +02:00
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Foo
|
|
|
|
)
|
|
|
|
)
|
|
|
|
alias: Foo
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
// Missing NS separator
|
|
|
|
use Foo {Bar, Baz};
|
|
|
|
-----
|
|
|
|
Syntax error, unexpected '{', expecting ',' or ';' from 3:9 to 3:9
|
|
|
|
array(
|
2016-04-20 16:47:10 +02:00
|
|
|
0: Expr_ConstFetch(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
1: Expr_ConstFetch(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Baz
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-08-20 16:42:49 +02:00
|
|
|
)
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
// Extra NS separator
|
|
|
|
use Foo\{\Bar};
|
|
|
|
-----
|
|
|
|
Syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING or T_FUNCTION or T_CONST from 3:10 to 3:10
|
|
|
|
array(
|
2016-04-20 16:47:10 +02:00
|
|
|
0: Expr_ConstFetch(
|
|
|
|
name: Name_FullyQualified(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-08-20 16:42:49 +02:00
|
|
|
)
|