mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-15 02:16:56 +01:00
caa5c0cc76
Nearly all special errors are now handled gracefully, i.e. the parser will be able to continue after encountering them. In some cases the associated error range has been improved using the new end attribute stack. To achieve this the error handling code has been moved out of the node constructors and into special methods in the parser.
30 lines
533 B
Plaintext
30 lines
533 B
Plaintext
Nested namespaces are not allowed
|
|
-----
|
|
<?php
|
|
namespace A {
|
|
namespace B {
|
|
|
|
}
|
|
}
|
|
-----
|
|
Namespace declarations cannot be nested from 3:5 to 5:5
|
|
array(
|
|
0: Stmt_Namespace(
|
|
name: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
)
|
|
stmts: array(
|
|
0: Stmt_Namespace(
|
|
name: Name(
|
|
parts: array(
|
|
0: B
|
|
)
|
|
)
|
|
stmts: array(
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) |