Nikita Popov
deb64ab676
Remove XML serialization from docs
...
This is no longer available in version 4.
2017-04-08 23:12:53 +02:00
Nikita Popov
1ec5591574
Tweak node insertion formatting
2017-04-08 23:11:46 +02:00
Ben Peachey
291bb27f6a
Removes unneeded code from JSON encoding example ( #372 )
2017-04-07 16:15:46 +02:00
Tyson Andre
b5935a4aff
Fix a typo in NodeDumper for REQUIRE_ONCE ( #367 )
2017-03-17 11:35:48 +01:00
Nikita Popov
9d680b24f0
Merge branch '3.x'
2017-03-05 19:25:08 +01:00
Nikita Popov
2b9e2f71b7
Release PHP-Parser 3.0.5
2017-03-05 19:23:57 +01:00
Walt Sorensen
510e0cd202
Run on Trusty Beta Container ( #363 )
...
This uses a more recent HHVM version.
2017-03-05 18:07:48 +01:00
Nikita Popov
2beb4e7fd6
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/ParserAbstract.php
test/code/parser/errorHandling/recovery.test
2017-02-26 23:47:27 +01:00
Nikita Popov
d5873b177b
Adjust the end attributes on the stack as well
2017-02-26 23:45:14 +01:00
Nikita Popov
da97f78e25
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/ParserAbstract.php
test/code/parser/errorHandling/recovery.test
2017-02-26 23:40:32 +01:00
Nikita Popov
48ec654d0c
Make Expr\Error nodes empty
...
Resolves issue #359 .
2017-02-26 23:38:32 +01:00
Nikita Popov
f291a19fd5
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/Parser/Php7.php
2017-02-26 23:13:21 +01:00
Nikita Popov
c12a4c8239
Fix start attribute assignment for Error in ClassConstFetch
2017-02-26 23:00:38 +01:00
Nikita Popov
86ea6fe8c4
Remove leftover code
2017-02-26 22:53:08 +01:00
Nikita Popov
dce34f37db
Merge branch '3.x'
2017-02-26 22:51:27 +01:00
Nikita Popov
1b59e918f7
Perform NullableType resolution earlier
...
This makes sure function signatures are already fully resolved in
enterNode(). Resolves issue #360 .
2017-02-26 22:50:31 +01:00
Nikita Popov
9cd9c0cd52
Drop XML serialization from php-parse
...
The class no longer exists, so this broke the script.
2017-02-23 21:18:04 +01:00
Matthew Brown
9857a545e2
Remove unused variables ( #357 )
2017-02-11 11:05:36 +01:00
Nikita Popov
54b61ebe7c
Merge branch '3.x'
2017-02-10 21:20:30 +01:00
Nikita Popov
0bf561dfe7
Release PHP-Parser 3.0.4
2017-02-10 21:20:03 +01:00
Matthew Brown
329e90c239
Improve doc comments
2017-02-09 20:49:52 +01:00
Nikita Popov
9f5ec5a69a
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/Parser/Php5.php
lib/PhpParser/Parser/Php7.php
test/code/parser/stmt/class/name.test
2017-02-09 20:38:33 +01:00
Nikita Popov
df98b0417b
Handle "extends static" etc more gracefully
...
Use class_name production and emit the same error as for
"extends self" and "extends parent". It's weird that "extends
static" gives a different result than those two.
2017-02-09 18:43:09 +01:00
Nikita Popov
a8eb2fc675
Support recovery from invalid trailing commas
2017-02-09 00:35:12 +01:00
Nikita Popov
4a434fdc1b
Merge branch '3.x'
2017-02-09 00:03:37 +01:00
Nikita Popov
d18ccfeec7
Use p() in pPrec() for easier extensibility
2017-02-09 00:03:00 +01:00
Nikita Popov
f8a2f6e760
Merge branch '3.x'
2017-02-08 23:55:16 +01:00
Jennifer Hodgdon
4e55897059
Change one function to protected
2017-02-08 23:55:02 +01:00
Jesse Schalken
41facc02ef
Fix typo with-posititions => with-positions
2017-02-08 23:54:08 +01:00
Nikita Popov
865bfb2acf
Merge branch '3.x'
...
Conflicts:
grammar/php7.y
lib/PhpParser/Parser/Php7.php
test/code/parser/expr/uvs/globalNonSimpleVarError.test
test/code/parser/stmt/namespace/groupUseErrors.test
2017-02-05 17:50:54 +01:00
Nikita Popov
62877b5d14
Recover from missing semicolons on statements
2017-02-05 17:47:56 +01:00
Nikita Popov
f4ea0270c8
Mark version 2.x as unsupported
...
No commits to this branch for five months, mark as unsupported.
2017-02-05 14:19:54 +01:00
Nikita Popov
8f623fb241
Use closures instead of methods for semantic actions
...
The dispatch using $this->{'reduceRule' . $rule}() is very expensive
because it involves
* One allocation when converting $rule to a string
* Another allocation when concatenating the two strings
* Lowercasing during the method call
* Various uncached method checks, e.g. visibility.
Using an array of closures for semantic action dispatch is
significantly more efficient.
2017-02-05 11:58:45 +01:00
Nikita Popov
3bbf8d8f7a
Use local var for $stackPos
...
We're accessing $this->stackPos a lot, and property accesses are
much more expensive than local variable acesses. Its cheaper to
use a local var and pass it as an argument to semantic actions.
2017-02-05 11:57:21 +01:00
Nikita Popov
90b6d7cb5b
Remove XML serializer
2017-02-04 01:10:09 +01:00
Nikita Popov
7fa5495d64
Merge branch '3.x'
2017-02-03 22:59:06 +01:00
Nikita Popov
5b8182cc0a
Release PHP-Parser 3.0.3
2017-02-03 22:57:31 +01:00
Nikita Popov
af8b17bd75
Update changelog
2017-02-03 22:56:55 +01:00
Nikita Popov
42f046ec19
Deprecate XML serializer
2017-02-03 22:52:16 +01:00
Nikita Popov
987c61e935
Drop support for false return value in NodeTraverser
2017-02-03 22:36:57 +01:00
Nikita Popov
2b72bae3d9
Throw if NodeVisitor returns invalid value
2017-02-03 22:30:26 +01:00
Nikita Popov
2b6804aa50
Throw on nested array in NodeTraverser
...
The AST never uses deeply nested arrays, so don't support this in
the node traverser. Throw an exception instead.
2017-02-03 22:11:31 +01:00
Nikita Popov
d9911c8da5
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/Node/Expr/ClassConstFetch.php
test/PhpParser/PrettyPrinterTest.php
2017-02-03 21:54:48 +01:00
Nikita Popov
d287c167bc
Pretty print: Handle Error in ClassConstFetch
2017-02-03 21:53:02 +01:00
Nikita Popov
79afd56565
Add NodeFinder class
...
To simplify basic node finding operations.
2017-01-29 23:20:53 +01:00
Nikita Popov
5cc2750ebc
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/NodeVisitor.php
2017-01-29 22:36:33 +01:00
Nikita Popov
58e7881e98
Implement NodeTraverser::STOP_TRAVERSAL
...
Conflicts:
lib/PhpParser/NodeVisitor.php
2017-01-29 22:35:40 +01:00
Nikita Popov
e072c789d1
Merge branch '3.x'
...
Conflicts:
test/PhpParser/PrettyPrinterTest.php
2017-01-29 21:57:37 +01:00
Nikita Popov
fd7ac25108
Throw if pretty-printing Error node
2017-01-29 21:56:21 +01:00
Nikita Popov
bfea338d36
Update doc comments after previous comment
...
Make some of the type annotations more accurate, and complete the
generated doc-comments to be complete (with description and
parameter annotations.)
2017-01-26 00:16:54 +01:00