History log of /php-ast/tests/constructor.phpt (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v1.0.5, v1.0.4, v1.0.3, v1.0.2, v1.0.1, v1.0.0
# a04f661f 07-Oct-2018 Nikita Popov

Remove ast\Node\Decl

No longer used since version 50, which is the lowest supported one.


Revision tags: v0.1.7, v0.1.6, v0.1.5
# 159b984b 24-Jun-2017 Tyson Andre

Add constructors with parameters for Node (#55)

Signature: new Node(kind, flags, children, lineno)

Assume that the constructor is either never used with parameters
or used very

Add constructors with parameters for Node (#55)

Signature: new Node(kind, flags, children, lineno)

Assume that the constructor is either never used with parameters
or used very frequently (e.g. ast simplifier, code refactoring,
php-parser to ast conversion, etc.)
Validate the data types of params, but not the values themselves.

For backwards compatibility reasons, leave parameters
with no passed values as null, and make everything nullable.
- Assume no pre-existing code would pass in values.

This constructor hasn't been benchmarked yet
(compare with assigning params manually).
php-parser-to-php-ast (incomplete) is one codebase that could be used to
test this, e.g. in a loop.

Also, add aliases to simplify setting a Node property to a zend_long.
- AST_CACHE_SLOT_FLAGS was missing in one place, this PR added it back.
Was the absense deliberate?
- TRY_DELREF is unnecessary in some places, and wrong for parameters to
the constructor.

show more ...