History log of /PHP-Parser/grammar/phpyLang.php (Results 1 – 7 of 7)
Revision Date Author Comments
# af14fdb2 21-Feb-2024 Nikita Popov

Avoid cyclic reference in parser

Pass $this as an explicit $self argument to the reduce callbacks,
so we can make them static. This avoids a circular reference in
the parser, so that

Avoid cyclic reference in parser

Pass $this as an explicit $self argument to the reduce callbacks,
so we can make them static. This avoids a circular reference in
the parser, so that it can be immediately destroyed when it goes
out of scope.

Fixes #980.

show more ...


# a1ccf577 24-Sep-2023 Nikita Popov

Introduce Stmt\Block

Stmt\Block will be created for { $a; } style blocks, unless these
occur directly inside some structure that is usually combined
with a block.

For exampl

Introduce Stmt\Block

Stmt\Block will be created for { $a; } style blocks, unless these
occur directly inside some structure that is usually combined
with a block.

For example if ($a) { $b; } will continue to use the old
representation (plain array in in If_::$stmts), but a free-standing
{ $b; } will become a Stmt\Block.

Fixes #590.

show more ...


# 4b497045 29-Jul-2023 Nikita Popov

Move attribute handling into parser

The Lexer now only provides the tokens to the parser, while the
parser is responsible for determining which attributes are placed
on notes. This o

Move attribute handling into parser

The Lexer now only provides the tokens to the parser, while the
parser is responsible for determining which attributes are placed
on notes. This only needs to be done when the attributes are
actually needed, rather than for all tokens.

This removes the usedAttributes lexer option (and lexer options
entirely). The attributes are now enabled unconditionally. They
have less overhead now, and the need to explicitly enable them for
some use cases (e.g. formatting-preserving printing) doesn't seem
like a good tradeoff anymore.

There are some additional changes to the Lexer interface that
should be done after this, and the docs / upgrading guide haven't
been adjusted yet.

show more ...


# f4ec6a1e 03-Sep-2022 Nikita Popov

Rename Scalar\EncapsedStringPart to InterpolatedStringPart

It is no longer an expression node, which unfortunately does
require a more awkward type for the Encaps node.


# 3c3bcd31 29-Aug-2022 Nikita Popov

Also format the grammar directory


# 5d83adcc 15-May-2022 Tomas Votruba

[String_] Add rawValue attribute (#831)


# 2a4bb7ef 10-Apr-2021 Miguel

Moved phpy pseudo lang functions to separate file