Commit Graph

29 Commits

Author SHA1 Message Date
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
TomasVotruba
6ab69a7dc9 [cs] apply short array to bin/php-parse 2017-08-15 22:25:39 +02: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
Jesse Schalken
41facc02ef Fix typo with-posititions => with-positions 2017-02-08 23:54:08 +01:00
Nikita Popov
d5eebf7214 Add php-parse --with-positions
To invoke NodeDumper in dumpPositions mode
2016-12-09 22:41:46 +01:00
Nikita Popov
4e25f51581 Fix php-parse script 2016-10-16 22:19:33 +02:00
Nikita Popov
f3c7dc9d89 Add Error::getMessageWithColumnInfo() 2016-09-30 18:24:43 +02:00
Nikita Popov
2b209aaaf0 Add error recovery mode to php-parse script 2016-07-25 17:40:18 +02:00
Nikita Popov
82bb6627c9 Drop superfluous newlines before help text 2016-04-15 14:36:11 +02:00
Remi Collet
d1dd9f5aec support -h and --help standard options 2016-04-15 14:34:28 +02:00
Nikita Popov
f493219c7d Move "kind" attribute handling out of lexer
Doesn't belong there and will cause issue with multiple assignments.
2016-03-10 12:55:15 +01:00
Nikita Popov
ae30f97af6 Add "kind" attribute to LNumbers
Kind specifies whether the number was formatted as decimal, octal,
binary or hex. The pretty printer reproduces the number kind (but
not necessarily the exact formatting).
2016-03-09 21:10:55 +01:00
Nikita Popov
a0c216bf4b Add dumpComments option to NodeDumper
Adding this as an option to avoid breaking people's tests.

Some of the test results show pretty clearly that we are incorrectly
assigning the same comment multiple times for nested nodes (mentioned
in #36).
2016-03-09 19:48:36 +01:00
Steve Miketa
573c7c20c4 Update file mode 2016-03-03 13:06:54 -05:00
Nikita Popov
fcf23101dd Fix autoloader path in php-parse
Need to go up another directory...
2015-09-21 14:57:31 +08:00
Nikita Popov
c8898df3dd Add php-parse as composer bin
Renaming from php-parse.php to just php-parse to follow the usual
conventions.

Not tested.
2015-09-21 14:39:19 +08:00
Nikita Popov
2496cd38ad Various docs fixes 2015-07-14 21:11:54 +02:00
Nikita Popov
71fa7c6674 Support UVS in pretty printer
Try to generate interoperable code where possible (but not
everything can be expressed in PHP 5).
2015-06-13 20:01:01 +02:00
Nikita Popov
61e060694d Implement generalized yield operator
And split tokens.y off, so I don't waste time debugging this again...
2015-06-13 18:11:40 +02:00
David Prévot
69c00ebbe4 Make help output help2man-friendly
These changes follow regular advices for CLI output and allow help2man
to produce a meaningful manpage out of it.
2015-05-03 19:11:04 +02:00
Nikita Popov
611fa5c7f1 Test parser position information (syntax errors) 2015-04-18 13:27:57 +02:00
Gerrit Addiks
33a39fae06 added column-numbers to syntax errors 2015-04-18 10:14:49 +02:00
Hugo Fonseca
e3bc5b564d Added php shebang 2015-02-24 21:43:12 +01:00
Nikita Popov
8f1eacdab7 Increase recommended xdebug.max_nesting_level
Looks like 2000 is not quite enough for some cases...
2015-02-13 15:04:00 +01:00
Dexter Gerig
1a93cc3b9d Add line returns
Add line returns to the help message so that the terminal won't end up on the same line.
2014-11-25 19:03:35 -06:00
nikic
16dff7c2e6 Add ability to pass code directly to php-parse.php 2014-09-28 13:14:37 +02:00
nikic
88e2d42ba4 Fix var_dump truncation with xdebug in php-parse.php 2014-09-28 13:08:59 +02:00
nikic
7c81229261 Disable xdebug var_dump in php-parse script 2014-08-31 16:21:21 +02:00
nikic
3db3ad7d1e Add experimental php-parse script
Script supporting dumping, pretty printing, serializing and resolving
names. Intended to help exploring and debugging the node tree.
2014-04-19 23:14:28 +02:00