Nikita Popov
ec8692fb9e
Fix InlineHTML indentation
2017-09-03 19:02:07 +02:00
Nikita Popov
b1cd07a7b5
Extract TokenStream class from pretty printer
2017-09-03 18:54:22 +02:00
Nikita Popov
61e624bc9d
Replace noIndent mechanism in pretty printer
...
Instead store newline with indentation in $nl property and use it
where needed.
The implementation should be changed to compilet indentLevel and
fpIndentLevel, I don't think these need to be kept separate.
2017-09-03 18:11:25 +02:00
Nikita Popov
31065389f1
Remove workarounds for reserved keyword method names
...
No longer necessary in PHP 7.
2017-09-02 20:08:20 +02:00
Nikita Popov
829c6c3c71
Add initial changelog for version 4.0
2017-09-02 20:03:10 +02:00
Nikita Popov
e145102345
Merge branch '3.x'
2017-09-02 19:11:27 +02:00
Nikita Popov
a1e8e1a30e
Release PHP-Parser 3.1.1
2017-09-02 19:10:46 +02:00
Nikita Popov
efd39a67a2
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/Builder/Trait_.php
test/PhpParser/Builder/TraitTest.php
2017-08-29 23:20:47 +02:00
Nikita Popov
d77e6cd6e9
Allow TraitUse statements in trait builder
...
Fixes #413 .
2017-08-29 23:18:59 +02:00
Nikita Popov
fa12dc8a22
Merge branch '3.x'
2017-08-29 23:15:04 +02:00
Nikita Popov
a10780ca0d
Handle Nop statement after brace-style namespace
...
Fixes #412 .
2017-08-29 23:14:27 +02:00
Nikita Popov
9373a8e9f5
Implement JsonDecoder
...
Converts JSON representation back into node tree.
2017-08-18 23:56:12 +02:00
TomasVotruba
e2e99f269b
Add strict_types to lib code
2017-08-18 23:00:13 +02:00
Nikita Popov
7b36ca3b6c
Add isSpecialClassName() method to Identifier and Name
2017-08-15 22:59:52 +02:00
Nikita Popov
d97cc3d96e
Add toLowerString() method to Name and Identifier
...
Avoids patterns like strtolower((string) $name) when using
strict types.
2017-08-15 22:49:16 +02:00
TomasVotruba
6ab69a7dc9
[cs] apply short array to bin/php-parse
2017-08-15 22:25:39 +02:00
TomasVotruba
af12807451
[cs] apply same to tests
2017-08-13 21:14:28 +02:00
TomasVotruba
9d599040b7
[cs] spaces
2017-08-13 21:14:28 +02:00
TomasVotruba
05e6725b7a
[cs] use strict comparison where allowed
2017-08-13 21:14:28 +02:00
TomasVotruba
ec535ea14e
[cs] use PHP 5.4 short array, since PHP 7.0 is min version
2017-08-13 21:14:28 +02:00
TomasVotruba
58bf92e4f7
[cs] remove unused imports
2017-08-13 21:14:28 +02:00
Tomáš Votruba
a664b28248
travis: add dash to make command format united ( #407 )
...
Prevents possible error when adding a second line
2017-08-13 14:04:53 +02:00
Tomáš Votruba
edec3bb07a
Docs: fix FAQ link anchor ( #406 )
2017-08-08 17:53:02 +02:00
Tomáš Votruba
770c314dd1
Docs: Use PHP 7 return types ( #405 )
2017-08-07 22:49:26 +02:00
Pascal
94b5017e89
Fix missing semicolon in yacc grammar files ( #403 )
2017-07-30 12:23:40 +02:00
Nikita Popov
fe069d6de2
Merge branch '3.x'
2017-07-28 16:45:57 +02:00
Nikita Popov
4d4896e553
Release PHP-Parser 3.1.0
2017-07-28 16:45:09 +02:00
Nikita Popov
d11ef05aaf
Merge branch '3.x'
2017-07-19 17:14:23 +02:00
Nikita Popov
6fa073879e
Remove deprecation of Name::$parts
...
It doesn't look like this is going away for now, and we currently
don't have the APIs to cover all existing usages elegantly.
2017-07-19 17:13:10 +02:00
Nikita Popov
5a3a1ec25c
Handle LC_NUMERIC with comma decimal separator
...
Closes #399 .
2017-07-19 17:10:55 +02:00
Ilia Smirnov
441e6e1d31
Fixed incorrect class inheritance ( #394 )
...
Generated example was incorrect - you cannot define import alias:
use Some\Other\Thingy as SomeClass;
and then define a class with the same name:
abstract class SomeClass ...
Class names changed to avoid conflict between import alias and abstract class name.
2017-07-19 16:55:00 +02:00
Pavel Levin
8bdcb47815
Simplify ternary operator for PHP7 ( #395 )
2017-06-30 18:19:13 +02:00
Nikita Popov
46e7fea72d
Merge branch '3.x'
...
Conflicts:
test/PhpParser/Builder/ParamTest.php
2017-06-28 23:13:33 +02:00
Nikita Popov
4a7d011317
Add support for object type
2017-06-28 23:12:13 +02:00
Nikita Popov
4fea054ee0
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/Parser/Php7.php
2017-06-28 23:06:38 +02:00
Nikita Popov
7f862ac21c
Add support for trailing comma in group use
2017-06-28 23:05:28 +02:00
Nikita Popov
0808939f81
Release PHP-Parser 3.0.6
2017-06-28 22:53:48 +02:00
Nikita Popov
19dde1363e
Treat special names correctly in getShortName()
...
Also change the API to accept a string rather than a FullyQualified
name instance, as this is not appropriate for symbols like "self".
2017-06-13 19:51:22 +02:00
Nikita Popov
5b43809b48
Drop HHVM support
...
Not dropping any of the HHVM workaround code yet. If someone sorts
out the Travis build, I'm fine with keeping HHVM support.
2017-06-03 15:33:25 +02:00
Nikita Popov
947574d3dc
Merge branch '3.x'
2017-06-03 15:31:50 +02:00
Nikita Popov
7bfc320bda
Switch to dist: trusty, so HHVM runs
2017-06-03 15:25:50 +02:00
Nikita Popov
7646b31907
Merge branch '3.x'
2017-06-03 15:18:44 +02:00
Nikita Popov
bc0bff3f87
Fix method name in tests
2017-06-03 15:18:23 +02:00
Romain Neutron
c28b8556f5
Fix Lexer errorHandling when there is no tokens
...
I encounter an issue when no tokens exist. An error `Undefined offset -1` is triggered.
2017-06-03 15:17:45 +02:00
xKerman
24d583d5c3
Fix example code to work ( #390 )
2017-05-28 12:35:04 +02:00
Nikita Popov
b2c6497d63
Remove undefined variable hack
...
No longer necessary, as we don't support PHP 5 anymore.
2017-05-07 19:57:24 +02:00
Nikita Popov
4e162bd0ea
Fix type annotation for List::$items
2017-05-07 19:56:14 +02:00
Nikita Popov
73dc35cbbd
Allow null in ClassMethod::getStmts()
2017-05-07 19:56:14 +02:00
Wes
b1af3d1f7d
Add Node::setAttributes() ( #385 )
2017-05-05 18:18:44 +02:00
Nikita Popov
92275bdfa8
Remove Node::setLine() method
2017-04-29 13:01:02 +02:00