Nikita Popov
39a039fa42
Add option for short array syntax in pretty printer
2015-09-21 15:12:59 +08:00
Nikita Popov
b2961915a6
Fix XML serialization test
...
I have no idea why this suddenly turned up *now*
2015-09-21 14:29:24 +08:00
Nikita Popov
eecaf1e93b
Merge branch '1.x'
...
Conflicts:
grammar/rebuildParsers.php
lib/PhpParser/Parser.php
2015-09-19 22:07:29 +08:00
Nikita Popov
950ada4cba
Fix issue #227
...
Use \z instead of $.
2015-09-19 22:05:23 +08:00
Dmitry Patsura
e3a9356178
Use composer PSR-4 autoloader
2015-09-16 22:02:00 +09:00
Nikita Popov
fe6755ff4c
Use more helpful code test names
2015-08-25 21:36:08 +02:00
Nikita Popov
f57d217e91
Update group use support
...
To conform with current PHP 7 implementation
* Allow use \Foo\{Bar};
* Disallow use Foo\{\Bar};
* Disallow missing trailing semicolon (that was a bug)
2015-08-20 16:42:49 +02:00
Nikita Popov
dc85742034
Merge branch '1.x'
...
Conflicts:
CHANGELOG.md
composer.json
test/PhpParser/ParserTest.php
2015-07-14 19:43:49 +02:00
Nikita Popov
b9afcdfd92
Revert "Make tests compatible with PHP 7"
...
This reverts commit 91295a0790
.
This should no longer be necessary.
Conflicts:
test/PhpParser/ParserTest.php
2015-07-14 19:21:57 +02:00
Nikita Popov
feb82eed33
Disable cloning in traverser by default
2015-07-14 17:39:56 +02:00
Nikita Popov
0ef15c111a
Merge branch '1.x'
2015-07-14 17:08:28 +02:00
Nikita Popov
d341d94976
Add ClassLike::getMethod($name)
...
To allow getting individual method with a given name.
2015-07-14 17:07:45 +02:00
Nikita Popov
0265c28e6e
Switch NameResolver resolve methods to be immutable
...
To make it theoretically possible to expose this as API.
Add slice() method to Name to allow this. Deprecate existing mutable
Name APIs.
2015-07-12 23:56:57 +02:00
Nikita Popov
5bd8cb84de
Add dummy ParserFactory test
...
:/
2015-07-12 22:53:17 +02:00
Nikita Popov
ebeeae19a6
Merge branch '1.x'
2015-07-12 22:12:28 +02:00
Nikita Popov
5ede167835
Fix infinite recursion in Use builder __call
2015-07-12 22:11:43 +02:00
Nikita Popov
21e51c8cf6
Add some tests for Multiple parser
2015-07-12 22:00:02 +02:00
Nikita Popov
e7a2abb03b
Merge branch '1.x'
2015-07-11 22:33:19 +02:00
Nikita Popov
b862de1f5b
Support properties in trait builder
2015-07-11 22:31:45 +02:00
Nikita Popov
8090531acd
Fix pretty printing of const derefs for 5.x
...
(FOO)[0] is only supported on 7.x
2015-07-09 12:38:30 +02:00
Nikita Popov
1d62e9d8cc
Fix implicit visibility for properties as well
...
Also switch to using PPP mask.
2015-07-05 20:17:52 +02:00
Lisachenko Alexander
2a3bc608dc
Add broken test for implicit public nodes
2015-07-05 20:17:49 +02:00
Nikita Popov
90ab32f046
Merge branch '1.x'
2015-07-05 20:16:41 +02:00
Nikita Popov
7434a682e5
Fix implicit visibility for properties as well
...
Also switch to using PPP mask.
2015-07-05 20:16:21 +02:00
Lisachenko Alexander
5e6627c895
Add broken test for implicit public nodes
2015-07-05 20:10:47 +02:00
Nikita Popov
f872fa9b0b
Merge branch '1.x'
2015-07-04 14:40:53 +02:00
Nikita Popov
d5668f536d
Fix __HALT_COMPILER_OFFSET__ support on HHVM
2015-07-04 13:15:48 +02:00
Nikita Popov
9c9a8cddce
Merge branch '1.x'
2015-06-20 12:34:36 +02:00
Nikita Popov
fd7ee2e083
Add missing regex anchor
2015-06-20 12:34:10 +02:00
Nikita Popov
f2b7a31509
Rename ParserInterface to Parser
...
And drop the alias of Parser to Parser\Php5.
2015-06-20 11:47:25 +02:00
Nikita Popov
d8312a09a3
Split parsing tests into code tests and other stuff
...
And run the other stuff against Php5 and Php7 parsers.
Also move canonicalize() from CodeTestAbstract into a free-standing
function.
2015-06-20 11:44:29 +02:00
Nikita Popov
ef9a154d09
Add support for unicode escape sequences
...
Only parsed if the PHP 7 parser is used.
2015-06-13 20:51:02 +02:00
Nikita Popov
0da72fad00
Support scalar type declarations
2015-06-13 20:16:09 +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
f3f24e03ae
Support running against PHP 7 testsuite
2015-06-13 19:09:24 +02:00
Nikita Popov
bc21514ecf
Move token constants into separate class
...
As these are shared between Php5 and Php7 parsers they should be
in some common place, otherwise we'd have to always reference either
one or the other.
2015-06-13 18:39:55 +02:00
Nikita Popov
04e05907c3
Fix CRLF issue in Serializer\XML test
...
No idea why this suddenly turned up now.
2015-06-13 18:20:05 +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
Nikita Popov
602b9807eb
Import some UVS tests
2015-06-13 15:42:09 +02:00
Nikita Popov
f372a4c4ab
Move modeline handling into CodeTestAbstract
2015-06-13 15:10:46 +02:00
Nikita Popov
d18dcc0c7f
Implement UVS
2015-06-13 14:59:24 +02:00
Nikita Popov
74c57eef0e
Test PHP 5 and PHP 7 parsers
...
At this point they should return the same result.
2015-06-13 13:56:45 +02:00
Nikita Popov
dca46febc9
Implement semi-reserved identifiers
2015-06-13 12:47:13 +02:00
Nikita Popov
1a1bd1448d
Support mixed group use declarations
2015-06-13 11:27:38 +02:00
Nikita Popov
9620f79cdc
Add partial group use support
...
Supported via Stmt\GroupUse which has Name $prefix in addition to
the usual.
Still missing: Mixed group uses.
2015-06-12 23:05:28 +02:00
Nikita Popov
5d1e3be7d4
Anonymize some callbacks
2015-05-02 22:35:15 +02:00
Nikita Popov
cc75dd3612
Drop support for PHP 7 aliases
2015-05-02 22:21:12 +02:00
Nikita Popov
5f621c5adc
Drop support for legacy aliases from v0.9
2015-05-02 22:19:25 +02:00
Nikita Popov
29b9015f51
Drop support for old Node format
2015-05-02 22:17:34 +02:00
Nikita Popov
8b64195cf2
Try .17G print if .16G is not enough
...
This should be enough for all cases, because: A double has 53 bits
of mantissa (including the implicit 1 bit), which is 53*ln(2)/ln(10)
= 15.95 decimal digits. However the leading decimal digit may encode
less than the usual 3.32 bits, which will push this over the edge to
requiring 17 decimal digits.
2015-05-02 11:48:55 +02:00