Commit Graph

823 Commits

Author SHA1 Message Date
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
0fbb5f90a1 Fix public modifier check for ClassMethod node 2015-07-05 20:10:48 +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
a5db176903 Merge branch '1.x' 2015-07-02 18:09:38 +02:00
Rodrigo Prado
7fbbf83011 Added syntax highlighting in README 2015-07-02 18:09:12 +02:00
Nikita Popov
42e368e964 Fix returnType typehints
Fixes issues #207
2015-07-02 18:06:41 +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
179d32cfaf Simplify handleHaltCompiler() implementation
Nowadays we're already tracking the filePos, no need to
recompute it.
2015-06-20 12:33:33 +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
813c9f1545 Add basic ParserFactory 2015-06-20 11:28:58 +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
fdbddc4b8c Add Multiple parser 2015-06-13 13:38:24 +02:00
Nikita Popov
ca3b44bf60 Fork separate PHP 7 parser
Also add ParserInterface
2015-06-13 13:09:34 +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
583b560f71 Drop {@inheritDoc}
Those are unnecessary and actually against the spec.
2015-06-12 20:37:43 +02:00
Nikita Popov
db3dafd64d Merge branch '1.x' 2015-06-05 18:57:04 +02:00
Suralc
bb2c5303ae Add a FunctionLike interface to Methods, Functions and Closures.
The elements listed above share common elements like parameters, possible return types and bodies.
2015-06-05 18:56:25 +02:00
Nikita Popov
5038dcc251 Merge branch '1.x' 2015-05-03 19:12:09 +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
a0e7d5e0aa Set correct number of s/r conflicts 2015-05-02 22:51:38 +02:00
Nikita Popov
51ec2a25fe Move parser to Parser\Php5
Old name still exists.
2015-05-02 22:50:11 +02:00
Nikita Popov
5d1e3be7d4 Anonymize some callbacks 2015-05-02 22:35:15 +02:00
Nikita Popov
9d42e4a2e2 Drop short array simulation from .phpy syntax
Instead use real short array syntax.
2015-05-02 22:30:44 +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
e6619f5514 Drop 5.4 support from emulative lexer 2015-05-02 22:13:55 +02:00
Nikita Popov
6b4a17b3e0 Set version to 2.0-dev. Drop PHP 5.3 support 2015-05-02 22:08:03 +02:00
Nikita Popov
30abe062f2 Update documentation link 2015-05-02 22:03:33 +02:00
Nikita Popov
dff239267f Release PHP-Parser 1.3.0 2015-05-02 17:40:40 +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
Nikita Popov
9caa51b3a5 Add some more tests 2015-05-01 20:18:04 +02:00