nikic
b5bcfa1168
Add support for argument unpacking (PHP 5.6)
2014-03-26 18:42:46 +01:00
nikic
96f1151ab2
Add support for variadic parameters (PHP 5.6)
2014-03-26 18:23:30 +01:00
nikic
f5be0d30f7
Guarantee that subnodes are always in the right order
2014-03-22 14:49:56 +01:00
nikic
1c8481bff6
Merge branch '0.9'
...
Conflicts:
lib/PhpParser/Lexer.php
lib/PhpParser/Node/Stmt/Class.php
lib/PhpParser/Node/Stmt/ClassMethod.php
lib/PhpParser/Node/Stmt/Interface.php
lib/PhpParser/Node/Stmt/Namespace.php
lib/PhpParser/Node/Stmt/UseUse.php
lib/PhpParser/Parser.php
2014-02-12 20:23:12 +01:00
Martin Hasoň
118f28344d
Synchronized error messages with native php error messages
2014-02-12 20:19:48 +01:00
nikic
f82862ec9c
Port library to use namespaces, with BC for old names
2014-02-06 20:29:35 +01:00
nikic
fbaa1e5fc3
Add information on expected tokens to syntax errors
...
This now mimics the error messages provided by PHP itself (pre 5.4).
2013-01-15 17:30:14 +01:00
nikic
9d8e13b4a9
Fix Switch subnode order
...
Not that it makes much of a difference, but could have caused issues with
"out of order" visiting of nodes.
2012-10-19 14:54:56 +02:00
nikic
f6c1ab6657
Adjust list and yield parsing, update prettyprinter
...
* nested list()s will now create nested List nodes (instead of just
nested arrays)
* yield $k => $v was parsed with key and value swapped. This is now fixed
* the pretty printer now works with the newly added language constructs
2012-09-07 23:41:59 +02:00
nikic
417a8bb07e
Add support for yield expressions (PHP 5.5)
...
This adds a new Yield expression type, with subnodes key and value.
2012-09-07 23:41:57 +02:00
nikic
ae3774f0f2
Add support for finally clauses (PHP 5.5)
...
This adds a new finallyStmts subnode to the TryCatch node. If there is
no finally clause it will be null.
2012-09-07 23:41:56 +02:00
nikic
f8f1e17e41
Add support for list() in foreach (PHP 5.5)
...
Example: foreach ($coords as list($x, $y)) { ... }
This change slightly breaks backwards compatability, as it changes the
node structure for the previously existing `list(...) = $foo` assignments.
Those no longer have a dedicated `AssignList` node; instead they are
parsed as a normal `Assign` node with a `List` as `var`. Similarly the
use in `foreach` will generate a `List` for `valueVar`.
2012-09-07 23:41:55 +02:00
nikic
81e53ce0ff
Insert comments when pretty printing
...
This changset also adds unit tests for Comments and adds a way to test the
pretty printer.
2012-05-11 16:18:14 +02:00