9f0e12bf | 22-Nov-2012 |
nikic |
Update changelog |
cdbad02f | 20-Nov-2012 |
nikic |
Fix endAttributes assignment The end attributes previously were always assigned from the last read token, which does not necessarily correspond to the last token in the reduced rule.
Fix endAttributes assignment The end attributes previously were always assigned from the last read token, which does not necessarily correspond to the last token in the reduced rule. In particular this occurs if the parser read a new token and based on that lookahead decided to reduce a rule. The behavior was only correct if the newly read token was first shifted and then the rule was reduced. This is fixed by buffering the endAttributes of the new token in a temporary variable and only assigning them once the token is shifted.
show more ...
|
b0c87874 | 06-Nov-2012 |
nikic |
Merge pull request #43 from nicmart/patch-1 Update BuilderAbstract::normalizeValue() doc comment
|
bdb58ada | 06-Nov-2012 |
Nicolò Martini |
Update lib/PHPParser/BuilderAbstract.php Updated BuilderAbstract::normalizeValue phpdoc description. |
efa87269 | 05-Nov-2012 |
Fabien Potencier |
Fixed some typos in the doc |
fc56da59 | 31-Oct-2012 |
nikic |
Rename pSafe to pNoIndent Matches the function more closely |
df17d62b | 31-Oct-2012 |
nikic |
Fix switch formatting The switch cases were not indented and fall-through cases had an unnecessary additional newline. Patch by @pscheit (PR #39). |
ac6f221c | 31-Oct-2012 |
nikic |
Better prededence and associativity handling in pretty printer Previously the pretty printer added unnecessary and odd-looking parentheses when several operators with the same precedence
Better prededence and associativity handling in pretty printer Previously the pretty printer added unnecessary and odd-looking parentheses when several operators with the same precedence were chained: 'a' . 'b' . 'c' . 'd' . 'e' // was printed as 'a' . ('b' . ('c' . ('d' . 'e'))) Another issue reported as part of #39 was that assignments inside closures were wrapped in parentheses: function() { $a = $b; } // was printed as function() { ($a = $b); } This was caused by the automatic precedence handling, which just regarded the closure as an ordinal nested expression. With the new system the $predenceMap of PrettyPrinterAbstract contains both precedence and associativity and there is a new method pPrec() which prints a node taking precedence and associativity into account. For simpler usage there are additional function pInfixOp(), pPrefixOp() and pPostfixOp(). Prints not going through pPrec() do not have any precedence handling (fixing the closure issue).
show more ...
|
759c04db | 19-Oct-2012 |
nikic |
Turn rebuildParser.php into a CLI script The paths are now more generic so it can be run from any directory, not just grammar/. |
9e43acee | 19-Oct-2012 |
nikic |
Scalar_String::create() -> Scalar_String::parse() Directly creating the node isn't necessary anymore, the token only needs to be parsed. This makes it consistent with the other scalar pa
Scalar_String::create() -> Scalar_String::parse() Directly creating the node isn't necessary anymore, the token only needs to be parsed. This makes it consistent with the other scalar parsing methods and removes the need to pass $arguments around.
show more ...
|
9d8e13b4 | 19-Oct-2012 |
nikic |
Fix Switch subnode order Not that it makes much of a difference, but could have caused issues with "out of order" visiting of nodes. |
af5d288f | 07-Sep-2012 |
nikic |
Add support for expressions in empty (PHP 5.5) Apart from the grammar modifications this also renames the Empty subnode from var to expr. This breaks BC. |
f6c1ab66 | 07-Sep-2012 |
nikic |
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 v
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
show more ...
|
4259b44a | 07-Sep-2012 |
nikic |
Add support for constant dereferencing (PHP 5.5) Examples: "foo"[2], [1, 2, 3][2] |
417a8bb0 | 07-Sep-2012 |
nikic |
Add support for yield expressions (PHP 5.5) This adds a new Yield expression type, with subnodes key and value. |
ae3774f0 | 07-Sep-2012 |
nikic |
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. |
f8f1e17e | 07-Sep-2012 |
nikic |
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 struct
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`.
show more ...
|
8d218110 | 02-Aug-2012 |
nikic |
Fix some doc comments |
84b23a3e | 07-Aug-2012 |
hakre |
Change to SPDX License Identifier (BSD-3-Clause) for composer The composer validate command is now supporting SPDX license identifers. |
5a947e98 | 23-Jul-2012 |
nikic |
Fix parsing of `$foo =& new Bar;` By-reference assignments of new expressions are now parsed as AssignRef (instead of just Assign). Closes issue #31. |
Revision tags: v0.9.2 |
|
a81cccff | 07-Jul-2012 |
nikic |
Release PHP-Parser 0.9.2 |
e90c8f17 | 07-Jul-2012 |
nikic |
Add installation instructions for different methods |
25a7b2cb | 07-Jul-2012 |
nikic |
Add note about xdebug.max_nesting_level |
eb599122 | 07-Jul-2012 |
nikic |
Add Class->getMethods() function |
4137d7a7 | 07-Jul-2012 |
nikic |
Add modifier accessors for ClassMethod etc |