1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-27 04:14:44 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Nikita Popov
588e6a4d4c Add string kinds and doc string labels
Scalar\String_ and Scalar\Encapsed now have an additional "kind"
attribute, which may be one of:

 * String_::KIND_SINGLE_QUOTED
 * String_::KIND_DOUBLE_QUOTED
 * String_::KIND_NOWDOC
 * String_::KIND_HEREDOC

Additionally, if the string kind is one of the latter two, an
attribute "docLabel" is provided, which contains the doc string
label (STR in <<<STR) that was originally used.

The pretty printer will try to take the original kind of the string,
as well as the used doc string label into account.
2016-04-07 12:09:00 +09:00
Nikita Popov
35011d2e4d Deduplicate attribute assignment code a bit 2016-04-02 08:02:58 +09:00
Nikita Popov
68b4c0388a Fix Serializer/XML test output indent
This causes a failure here, but not on another machine, not sure
why.
2016-04-02 07:27:01 +09:00
Nikita Popov
f493219c7d Move "kind" attribute handling out of lexer
Doesn't belong there and will cause issue with multiple assignments.
2016-03-10 12:55:15 +01:00
Nikita Popov
ae30f97af6 Add "kind" attribute to LNumbers
Kind specifies whether the number was formatted as decimal, octal,
binary or hex. The pretty printer reproduces the number kind (but
not necessarily the exact formatting).
2016-03-09 21:10:55 +01: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
f3f24e03ae Support running against PHP 7 testsuite 2015-06-13 19:09:24 +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
3ad0d4b310 Add support for return type declarations [PHP 7]
This adds an additional "returnType" subnode to Stmt\Function_,
Stmt\ClassMethod and Expr\Closure, as well as the corresponding
support in the name resolver and pretty printer.
2015-03-12 22:16:12 +01:00
nikic
6dc24fa9f5 Fix coverage annotations 2014-09-28 12:49:12 +02:00
nikic
96f1151ab2 Add support for variadic parameters (PHP 5.6) 2014-03-26 18:23:30 +01:00
nikic
f5be0d30f7 Guarantee that subnodes are always in the right order 2014-03-22 14:49:56 +01:00
nikic
f82862ec9c Port library to use namespaces, with BC for old names 2014-02-06 20:29:35 +01:00