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
Nikita Popov
56d57d472a
Merge branch '3.x'
2017-04-29 12:58:50 +02:00
Nikita Popov
3da86df48f
Deprecate Node::setLine()
2017-04-29 12:58:35 +02:00
Nikita Popov
5ec59eebe4
Fix some typos
2017-04-28 23:17:50 +02:00
Nikita Popov
a32e3797d4
Generate PHP 7 type annotations
2017-04-28 21:40:59 +02:00
Nikita Popov
e5fbdd6bda
Add upgrading notes
2017-04-28 21:23:55 +02:00
Nikita Popov
3da189769c
Distinguish between implicit/explicit alias
...
The UseUse::$alias node can now be null if an alias is not
explicitly given. As such "use Foo\Bar" and "use Foo\Bar as Bar"
are now represented differently.
The UseUse->getAlias() method replicates the previous semantics,
by returning "Bar" in both cases.
2017-04-28 21:05:01 +02:00
Nikita Popov
a6846e3b71
Always use Identifier nodes
...
The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.
Node constructors still accepts strings and will implicitly create
an Identifier wrapper. Identifier implement __toString(), so that
outside of strict-mode many things continue to work without changes.
2017-04-28 20:57:32 +02:00
Nikita Popov
3b4abbfc97
Add BuilderFactors->args(Add BuilderFactors->args())
2017-04-28 18:13:06 +02:00
Nikita Popov
7f6477ed83
Combine class/non-class name resolution into single method
2017-04-28 17:18:13 +02:00
Nikita Popov
56b810e91d
Add getShortName() API
...
PHP's name resolution rules are f'ing complicated.
2017-04-28 17:10:30 +02:00
Nikita Popov
6168abd9a0
Extract name resolution logic into NameContext
...
All the generic name resolution logic is now available as a separate
class with a public API.
2017-04-27 21:06:07 +02:00
Nikita Popov
888b9dcf30
Drop misspellt class constant
2017-04-27 18:28:10 +02:00
Nikita Popov
e1ab92275c
Allow tests without assertions
2017-04-27 18:20:12 +02:00
Ekin
3c44785e82
Bump phpunit version ( #381 )
2017-04-27 18:14:07 +02:00
Nikita Popov
8635365a30
Fix some typing issues
2017-04-26 21:50:40 +02:00
Nikita Popov
ceaed32e94
Fix typo in method name
2017-04-26 21:47:31 +02:00
Nikita Popov
fba61390d8
Use null-coalesce operator
2017-04-24 22:32:40 +02:00
Nikita Popov
7bdb55f9a8
Another try at HHVM
2017-04-24 22:26:31 +02:00
Nikita Popov
b35301659b
Try to enable php7 mode for hhvm on travis
2017-04-24 22:22:54 +02:00
Nikita Popov
60f1504978
Drop emulative lexer implementation
...
Nothing to emulate anymore... Revert this commit when something
turns up.
2017-04-24 22:15:50 +02:00
Nikita Popov
aa75838a5f
Bump minimum PHP version to 7.0
2017-04-24 22:12:03 +02:00
Nikita Popov
5f7070e94f
Added BuilderFactory->concat() method
2017-04-24 21:42:59 +02:00
Nikita Popov
8f40eec122
Add BuilderFactory->val() method
2017-04-24 21:28:03 +02:00
Nikita Popov
e4f493cd1d
Replace func_get_args() with variadics
...
We're on PHP 5.6 now, so can do this...
2017-04-24 21:19:08 +02:00
Nikita Popov
7419649eae
Change BuilderAbstract into BuilderHelpers static class
...
Used as poor man's function namespace here.
2017-04-24 21:15:11 +02:00
Nikita Popov
6b6c903585
Kill the BuilderAbstract::$flags property
...
Instead pass and return the flags explicitly.
2017-04-24 21:06:54 +02:00
Andreev Sergey
9dc93aafaa
Add ClassMethod::isMagic() method
2017-04-23 13:54:17 +02:00
Nikita Popov
ba85da88a0
Merge branch '3.x'
2017-04-19 11:20:32 +02:00
Nikita Popov
901b895c02
Fix spelling of VISIBILITY_MODIFIER_MASK
2017-04-19 11:20:05 +02:00
Nikita Popov
55be521ff8
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/Builder/Param.php
2017-04-19 11:17:52 +02:00
SignpostMarv
c877c1a64f
Add Builder\Param::makeVariadic()
2017-04-19 11:16:29 +02:00
Nikita Popov
bc75ac2990
Merge branch '3.x'
2017-04-09 19:51:18 +02:00
Nikita Popov
c3cbf07946
Pretty printer: Preserve comments in arrays and calls
...
If call arguments or array contains comments, print it in multiline
form, so that comments may be preserved.
2017-04-09 19:49:47 +02:00
Nikita Popov
e15b6aa3e0
Fix links
2017-04-09 18:51:46 +02:00
Maks Rafalko
12034b19d7
Use the correct method from NodeVisitor interface ( #373 )
...
FAQ's code examples use incorrect method, so this update fixes it
2017-04-09 11:29:07 +02:00
Nikita Popov
369a078c54
Add FAQ with entries for parent and siblings
2017-04-08 23:27:43 +02:00
Nikita Popov
deb64ab676
Remove XML serialization from docs
...
This is no longer available in version 4.
2017-04-08 23:12:53 +02:00
Nikita Popov
1ec5591574
Tweak node insertion formatting
2017-04-08 23:11:46 +02:00
Ben Peachey
291bb27f6a
Removes unneeded code from JSON encoding example ( #372 )
2017-04-07 16:15:46 +02:00
Tyson Andre
b5935a4aff
Fix a typo in NodeDumper for REQUIRE_ONCE ( #367 )
2017-03-17 11:35:48 +01:00
Nikita Popov
9d680b24f0
Merge branch '3.x'
2017-03-05 19:25:08 +01:00
Nikita Popov
2b9e2f71b7
Release PHP-Parser 3.0.5
2017-03-05 19:23:57 +01:00
Walt Sorensen
510e0cd202
Run on Trusty Beta Container ( #363 )
...
This uses a more recent HHVM version.
2017-03-05 18:07:48 +01:00
Nikita Popov
2beb4e7fd6
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/ParserAbstract.php
test/code/parser/errorHandling/recovery.test
2017-02-26 23:47:27 +01:00
Nikita Popov
d5873b177b
Adjust the end attributes on the stack as well
2017-02-26 23:45:14 +01:00
Nikita Popov
da97f78e25
Merge branch '3.x'
...
Conflicts:
lib/PhpParser/ParserAbstract.php
test/code/parser/errorHandling/recovery.test
2017-02-26 23:40:32 +01:00