mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-24 07:41:35 +02:00
Rewrite namespace handling code
Add a check for disallowed statements between braced namespaces while at it.
This commit is contained in:
@@ -10,4 +10,11 @@ Namespace declaration statement has to be the very first statement in the script
|
||||
namespace A {}
|
||||
echo 1;
|
||||
-----
|
||||
No code may exist outside of namespace {} on line 3
|
||||
-----
|
||||
<?php
|
||||
namespace A {}
|
||||
declare(ticks=1);
|
||||
namespace B {}
|
||||
-----
|
||||
No code may exist outside of namespace {} on line 3
|
Reference in New Issue
Block a user