Commit Graph

13 Commits

Author SHA1 Message Date
TomasVotruba
ec535ea14e [cs] use PHP 5.4 short array, since PHP 7.0 is min version 2017-08-13 21:14:28 +02:00
Nikita Popov
92275bdfa8 Remove Node::setLine() method 2017-04-29 13:01:02 +02:00
Nikita Popov
56d57d472a Merge branch '3.x' 2017-04-29 12:58:50 +02:00
Nikita Popov
3da86df48f Deprecate Node::setLine() 2017-04-29 12:58:35 +02:00
Nikita Popov
a32e3797d4 Generate PHP 7 type annotations 2017-04-28 21:40:59 +02:00
Matthew Brown
e3b87f40aa Add non-void return types 2017-01-25 23:32:50 +01:00
Nikita Popov
4d2a4d02b0 Add first shot at format preserving pretty printer 2016-12-26 18:28:49 +01:00
Nikita Popov
ea47b6e0d6 Add NodeAbstract::setDocComment() 2016-09-17 20:51:22 +02:00
Nikita Popov
7dae6c7a6b Implement JsonSerializable for Nodes and Comments
Exposes the properties and adds an additional nodeType property.
2016-07-25 20:59:09 +02:00
Nikita Popov
583b560f71 Drop {@inheritDoc}
Those are unnecessary and actually against the spec.
2015-06-12 20:37:43 +02:00
Nikita Popov
29b9015f51 Drop support for old Node format 2015-05-02 22:17:34 +02:00
Nikita Popov
a2d7e8977a Use real properties for storing subnodes
Instead of storing subnodes in a subNodes dictionary, they are
now stored as simple properties. This requires declarating the
properties, assigning them in the constructor, overriding
the getSubNodeNames() method and passing NULL to the first argument
of the NodeAbstract constructor.

[Deprecated: It's still possible to use the old mode of operation
for custom nodes by passing an array of subnodes to the constructor.]

The only behavior difference this should cause is that getSubNodeNames()
will always return the original subnode names and skip any additional
properties that were dynamically added. E.g. this means that the
"namespacedName" node added by the NameResolver visitor is not treated
as a subnode, but as a dynamic property instead.

This change improves performance and memory usage.
2015-03-09 08:54:20 +01:00
nikic
f82862ec9c Port library to use namespaces, with BC for old names 2014-02-06 20:29:35 +01:00