History log of /PHP-Parser/lib/PhpParser/PrettyPrinterAbstract.php (Results 126 – 150 of 157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v3.0.6
# a32e3797 28-Apr-2017 Nikita Popov

Generate PHP 7 type annotations


# a6846e3b 28-Apr-2017 Nikita Popov

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node

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.

show more ...


# 8635365a 26-Apr-2017 Nikita Popov

Fix some typing issues


# c3cbf079 09-Apr-2017 Nikita Popov

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.


# 1ec55915 25-Mar-2017 Nikita Popov

Tweak node insertion formatting


Revision tags: v3.0.5
# 9857a545 11-Feb-2017 Matthew Brown

Remove unused variables (#357)


Revision tags: v3.0.4
# d18ccfee 08-Feb-2017 Nikita Popov

Use p() in pPrec() for easier extensibility


Revision tags: v3.0.3
# bfea338d 25-Jan-2017 Nikita Popov

Update doc comments after previous comment

Make some of the type annotations more accurate, and complete the
generated doc-comments to be complete (with description and
parameter ann

Update doc comments after previous comment

Make some of the type annotations more accurate, and complete the
generated doc-comments to be complete (with description and
parameter annotations.)

show more ...


# e3b87f40 24-Jan-2017 Matthew Brown

Add non-void return types


# 5e565e80 21-Jan-2017 Nikita Popov

Support insertion of nullable nodes

Still incomplete in some places and the formatting is not always
ideal.


# b9b6aeee 21-Jan-2017 Nikita Popov

Support format-preserving node removal

Take care of stripping surrouding tokens appropriately.


# b5fb6f2d 20-Jan-2017 Nikita Popov

Don't require useNopStatements=false for format preservation

Instead assign attributes on Nop nodes and in the pretty printer
specially handle end<start offsets. It's a somewhat weird ca

Don't require useNopStatements=false for format preservation

Instead assign attributes on Nop nodes and in the pretty printer
specially handle end<start offsets. It's a somewhat weird case,
but not wrong per se given the meaning the offsets have.

show more ...


# 48d3243a 19-Jan-2017 Nikita Popov

Drop last vestiges of consistent var mode flag


# 1bfbd7bc 19-Jan-2017 Nikita Popov

Make useExpressionStatement only supported mode


# 4d2a4d02 23-Dec-2016 Nikita Popov

Add first shot at format preserving pretty printer


Revision tags: v3.0.2, v3.0.1, v3.0.0, v3.0.0beta2, v3.0.0beta1, v2.1.1, v3.0.0alpha1
# 574665b4 09-Jul-2016 Nikita Popov

PHP 7.1: list() with keys

Expr\List will now contain ArrayItems instead of plain variables.
I'm reusing ArrayItem, because code handling list() must also handle
arrays, and this allo

PHP 7.1: list() with keys

Expr\List will now contain ArrayItems instead of plain variables.
I'm reusing ArrayItem, because code handling list() must also handle
arrays, and this allows both to go through the same code path.

This also renames Expr\List->vars to ->items.

TODO: Should Expr\List be dropped in favor of Expr\Array with an
extra flag?

show more ...


# 437890d3 06-Jul-2016 Nikita Popov

PHP 7: Short destructuring syntax

Potentially the pretty printer should force use of [] in assignment
context, instead of relying on the existance of the right attribute.


Revision tags: v2.1.0
# 5a6e7dd4 19-Apr-2016 Nikita Popov

Avoid superfluous newline when printing Nops


# 588e6a4d 02-Apr-2016 Nikita Popov

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
* Str

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.

show more ...


# aa199120 09-Mar-2016 Nikita Popov

Add kind attribute for arrays

To distinguish array() and [] syntax. The pretty printer respects
this attribute. The shortArraySyntax pretty printer option acts as
a default in case t

Add kind attribute for arrays

To distinguish array() and [] syntax. The pretty printer respects
this attribute. The shortArraySyntax pretty printer option acts as
a default in case the attribute is not specified.

show more ...


Revision tags: v2.0.1
# 9829bf69 28-Feb-2016 Nikita Popov

Fix issue #251


# 1fe8f09c 20-Feb-2016 Nikita Popov

Fix __halt_compiler() pretty printing edge case

We can't strip the <?php at the end of a __halt_compiler() segment
in file mode.

Fixed by being a bit more explicit in prettyPrin

Fix __halt_compiler() pretty printing edge case

We can't strip the <?php at the end of a __halt_compiler() segment
in file mode.

Fixed by being a bit more explicit in prettyPrintFile() about what
we want to do...

show more ...


# 65af37f7 20-Feb-2016 Nikita Popov

Doc comment tweaks


Revision tags: v2.0.0, v2.0.0beta1
# 39a039fa 21-Sep-2015 Nikita Popov

Add option for short array syntax in pretty printer


Revision tags: v1.4.1, v2.0.0alpha1, v1.4.0, v1.3.0
# 338bc1f8 26-Apr-2015 Nikita Popov

Fix "print" pretty-printing

Precedence was previously ignored.


1234567