138 Commits

Author SHA1 Message Date
Nikita Popov
e50c67b7a9 Add basic support for tab indentation
Add a new "indent" option for the pretty printer, which can be
use to control the indentation width, or switch it to use tabs.

Tab width is currenlty hardcoded to 4, but also shouldn't matter
much.

Possibly the formatting-preserving printer should auto-detect
the indentation in the future.
2024-09-21 20:58:10 +02:00
Nikita Popov
23c79fbbfb Release PHP-Parser 5.2.0 2024-09-15 18:40:33 +02:00
Amirreza Nasiri
5973c30a46 Update JSON_representation.markdown
Fix the invalid JSON structure
2024-07-13 15:46:21 +02:00
Sandro Gehri
eabae1f7fa Fix typo 2023-11-01 18:45:07 +01:00
Nikita Popov
0b3c762939 Update docs table of contents 2023-09-17 20:26:35 +02:00
Nikita Popov
3c52ea9b6d Document phpVersion effect on pretty printer 2023-09-17 15:52:10 +02:00
Nikita Popov
21ead39056 Update docs after lexer changes 2023-09-17 09:07:58 +02:00
Nikita Popov
ee3e7db3fc Raise minimum PHP version to PHP 7.4 2023-08-16 21:06:38 +02:00
Nikita Popov
ba851243f4 Replace startLexing() with tokenize()
For now Lexer::getTokens() still exists, but should probably be
removed.
2023-08-13 16:06:10 +02:00
Nikita Popov
c48ee36f54 Allow passing visitors to NodeTraverser constructor 2023-07-09 15:34:31 +02:00
Nikita Popov
8b1371990c Minor documentation updates 2023-07-09 15:34:31 +02:00
Nikita Popov
5b65f9fc92 Some documentation updates 2023-05-27 21:35:10 +02:00
Nikita Popov
93731c5cfa Move constants from NodeTraverser to NodeVisitor
These are really part of the NodeVisitor API. Retain aliases for
compatibility.
2023-05-20 21:37:34 +02:00
Nikita Popov
7785d2b887 Remove garbage collection section from docs
The GC issue has been fixed in PHP 7.3 and is no longer relevant.
2023-03-05 16:12:50 +01:00
Ondřej Mirtes
7362f2b2d0 Fix pretty printing example 2022-09-05 10:32:21 +02:00
Nikita Popov
8d02d37e42 More docs updates 2022-09-04 18:55:27 +02:00
Nikita Popov
f63081a57c Partial documentation update 2022-09-04 16:16:25 +02:00
Nikita Popov
23835d20ef Rename Scalar\LNumber to Scalar\Int_ 2022-09-03 12:07:38 +02:00
Daniel Schmelz
f828b76972 Fix typo 2022-08-28 13:01:12 +02:00
Ilhan Yumer
6a21234e58 Code highlighting 2021-10-31 09:11:00 +01:00
Rod Elias
e69ebbbfd9 chore: use the word Xdebug instead of XDebug 2021-06-17 18:00:12 +02:00
Nikita Popov
37ac4ea9c2 Document that namespaced names containing whitespace are not supported 2021-04-25 22:47:15 +02:00
Maxim L
4abdcde5f1
Fix missing argument in documentation (#767)
Missing argument in the getMessageWithColumnInfo call
2021-03-25 18:37:06 +01:00
Sebastian Bergmann
f545f18a87
Add ParentConnectingVisitor and NodeConnectingVisitor (#681) 2020-07-11 11:31:43 +02:00
Hassan Tariq
f33f081c8f Fix a minor typo 2020-04-18 10:56:47 +02:00
Nikita Popov
e612609022 Release PHP-Parser 4.2.3 2019-08-12 22:17:41 +02:00
Tyson Andre
a1f72690ef Fix harmless typos in documentation 2019-07-23 12:32:37 +02:00
Chris Hewitt
a4b43edb03 Fix one-character inconsistency 2019-06-30 09:25:26 +02:00
Tomas Votruba
af8c729603 Add PHP 7.4 typed properties support 2019-01-05 21:34:25 +01:00
Nikita Popov
8aae5b59b8 Release PHP-Parser 4.1.1 2018-12-26 12:32:39 +01:00
Niko
294b93fbca Another Typo 2018-12-24 17:28:52 +01:00
Niko
bc3ac5e5ea Fixed typo 2018-12-24 16:23:47 +01:00
Cosmin Radoi
ebf6b1c33b Fix NodeDecoder => JsonDecoder in docs (#552) 2018-11-29 23:12:33 +01:00
Romain Canon
8e4f972036 Fix wrong method call in doc 2018-11-07 17:34:08 +01:00
Phil Davis
69068722b7 Fix typo of DONT_TRAVERSE_CURRENT_AND_CHILDREN 2018-10-11 10:16:31 +02:00
Maks Rafalko
fb3d89e463 Document new DONT_TRAVERSER_CURRENT_AND_CHILDREN constant (#540)
* Document new `DONT_TRAVERSER_CURRENT_AND_CHILDREN` constant

* Rewording sentences, added 1 space indentation to make bullet list correct
2018-10-10 21:56:48 +02:00
Brent Shaffer
1973b6633a Fixes typo in AST Builder doc (#529) 2018-08-17 07:18:50 +09:00
Nikita Popov
4d6825c460 Add notes for new builders in docs 2018-07-22 21:33:04 +02:00
Eridan Domoratskiy
5aeb884ab5 Mention makeReturnByRef() in AST_builders.markdown (#519) 2018-07-20 21:47:07 +02:00
Loek van der Linde
2b0bd657bb Update 2_Usage_of_basic_components.markdown (#494) 2018-04-17 18:29:16 +03:00
Nikita Popov
3125b54e5e Link to composer/xdebug-handler 2018-03-25 19:34:45 +02: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
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
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