Commit Graph

1270 Commits

Author SHA1 Message Date
Nikita Popov
0cd7207ca6 Add tests for var() and propertyFetch() 2018-07-20 21:59:42 +02:00
Eridan Domoratskiy
6751ac3c9d Add Variable and PropertyFetch node constructors 2018-07-20 21:49:21 +02:00
Eridan Domoratskiy
5aeb884ab5 Mention makeReturnByRef() in AST_builders.markdown (#519) 2018-07-20 21:47:07 +02:00
Nikita Popov
b855c1ca23 Add some tests for new use builders 2018-07-20 21:44:37 +02:00
Eridan Domoratskiy
53c732a96d Add useFunction() and useConst() builder methods 2018-07-20 21:38:27 +02:00
Nikita Popov
bd088dc940 Release PHP-Parser 4.0.3 2018-07-15 19:25:16 +02:00
Nikita Popov
8b1c9c0409 Store comment at end of class in Nop statement
Fixed #509.
2018-07-07 12:49:49 +02:00
openex27
df64d86cf4 Check for empty $append in safeAppend()
Can happen with Nop statements.
2018-07-07 12:34:07 +02:00
Nikita Popov
aac539ef0a Adjust test output
Whoops, forgot to commit this part.
2018-07-07 12:25:01 +02:00
Nikita Popov
f967b867d5 Improve error recovery in arrays
Similarly to missing semicolons, the error is not indicated in the
AST.

Fixes #512.
2018-07-07 12:24:06 +02:00
Gabriel Caruso
6bbdaf6c16 Remove flags from phpunit.xml that have default value and colorize (#510) 2018-07-01 23:29:44 +02:00
Nikita Popov
35b8caf75e Release PHP-Parser 4.0.2 2018-06-03 13:33:10 +02:00
Nikita Popov
6526ea2497 Throw when printin EncapsedStringPart
This needs to go through something like Encapsed or ShellExec to
determine quotation type. Explicitly throw an exception to avoid
getting an undefined method error.
2018-06-03 13:31:00 +02:00
David Paz
3ce5e628a7 Fix binary operator doc block comment (#504)
Remove reference to bitwise and in doc block.
2018-05-19 12:21:45 +02:00
Gabriel Caruso
ee870e3464 Fixes from PHPStan (#502) 2018-05-19 11:12:24 +02:00
Gabriel Caruso
21d27527ed Use dedicated assertNull assertion (#503) 2018-05-19 11:12:07 +02:00
Nikita Popov
7b201b63d2 Error recovery for functions without body 2018-05-13 16:28:08 +02:00
Nikita Popov
01e85a26c6 Support recovery for param without variable
We store an Expr\Error for the variable in this case.
2018-05-12 19:49:39 +02:00
Gabriel Caruso
e6452e8d15 Fix typo in UPGRADE-4.0 (#498) 2018-05-05 23:45:25 +02:00
Gabriel Caruso
9202d87f53 Fix typos in UPGRADE-4.0 (#497) 2018-05-01 22:19:29 +02:00
Nikita Popov
fa99c3fbfb Recover from foreach without as 2018-04-28 22:31:45 +02:00
Loek van der Linde
2b0bd657bb Update 2_Usage_of_basic_components.markdown (#494) 2018-04-17 18:29:16 +03:00
Hans Ott
81b7be3ba6 Fix links in README.md (#493) 2018-04-07 18:26:59 +03:00
Nikita Popov
6121001576 Remove unused ParserAbstract::$errors property
Leftover from before ErrorHandler was introduced.
2018-03-30 21:45:52 +02:00
Nikita Popov
7208b1c7ac Improve error recovery in classes (#492) 2018-03-30 16:03:03 +02:00
Nikita Popov
e4a54fa90a Release PHP-Parser 4.0.1 2018-03-25 19:35:16 +02:00
Nikita Popov
3125b54e5e Link to composer/xdebug-handler 2018-03-25 19:34:45 +02:00
Nikita Popov
7f8ff1b9a4 Add support for list reference assignments
RFC: https://wiki.php.net/rfc/list_reference_assignment
2018-03-10 16:48:20 +01:00
Nikita Popov
91a462ce76 PHP 7.3: Add support for trailing commas in calls
RFC: https://wiki.php.net/rfc/trailing-comma-function-calls
2018-03-10 16:41:20 +01:00
Nikita Popov
610617fe93 Also add new() builder 2018-03-03 22:25:58 +01:00
Nikita Popov
ff2d85dc6b Add constFetch() and classConstFetch() builders 2018-03-03 22:14:42 +01:00
Nikita Popov
b998d1e9b5 Add funcCall(), methodCall() and staticCall() builders 2018-03-03 15:40:51 +01:00
Nikita Popov
6aba7624ed Add replacement sanity check in traverser 2018-03-03 13:22:36 +01:00
Nikita Popov
9c18e3db49 Release PHP-Parser 4.0.0 2018-02-28 21:39:30 +01:00
Nikita Popov
ae52aadb43 Fix merge leftovers in changelog 2018-02-28 21:37:11 +01:00
Nikita Popov
9cea94000a Merge branch '3.x'
Conflicts:
	CHANGELOG.md
	lib/PhpParser/NodeAbstract.php
2018-02-28 21:32:04 +01:00
Nikita Popov
bb87e28e7d Release PHP-Parser 3.1.5 2018-02-28 21:30:58 +01:00
Nikita Popov
7484acb88b Enable syntax highlighting for one code block 2018-02-28 21:27:29 +01:00
Nikita Popov
bc5ba47b28 Add links to component docs 2018-02-28 21:14:04 +01:00
Nikita Popov
b9996315a6 Add more extensive docs for node visitors
Also document NodeFinder.
2018-02-28 21:00:42 +01:00
Ryan Weaver
de3470190c Proofreading the docs - very minor changes! 2018-02-28 18:15:02 +01:00
Théo FIDRY
1c3eabb000 Replace string by class call (#477)
For better PHP-Scoper compatibility
2018-02-23 22:44:40 +01:00
Nikita Popov
8d1e86b47f Move node dumper docs into basic usage
Also mentioned php-parse here.
2018-02-08 17:17:32 +01:00
Nikita Popov
ff10cc9d08 Move JSON representation into component documentation
Also add -j flag to php-parse script to get a JSON dump. Also
drop obsolete flag for XML dumping.
2018-02-08 16:36:04 +01:00
Gabriel Caruso
14454326e9 Fix misspellings 2018-02-06 14:47:39 +01:00
Gabriel Caruso
3a45c1a121 Support PHPUnit 7 2018-02-02 11:52:56 +01:00
Nikita Popov
ad9c42b66a Merge branch '3.x'
Conflicts:
	lib/PhpParser/Parser/Php5.php
	lib/PhpParser/Parser/Php7.php
2018-01-30 23:07:11 +01:00
Nikita Popov
08215e7646 Fix duplicate switch comment assignment
Fixes #469.
2018-01-30 23:06:20 +01:00
Nikita Popov
c18bb27723 Release PHP-Parser 4.0 Beta 1 2018-01-27 19:06:36 +01:00
Nikita Popov
dd0adcc96c Move code gen docs to components and improve
Mention non-fluent helper methods.
2018-01-27 18:56:21 +01:00