mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-11 08:59:46 +01:00
7eac2cfd8b
A Nop statement will be inserted into statement lists if there are any trailing comments in the list (which would otherwise not be associated with any node). The pretty printer output currently still contains a superfluous newline.
91 lines
1.8 KiB
Plaintext
91 lines
1.8 KiB
Plaintext
Static property fetches
|
|
-----
|
|
<?php
|
|
|
|
// property name variations
|
|
A::$b;
|
|
A::$$b;
|
|
A::${'b'};
|
|
|
|
// array access
|
|
A::$b['c'];
|
|
A::$b{'c'};
|
|
|
|
// class name variations can be found in staticCall.test
|
|
-----
|
|
array(
|
|
0: Expr_StaticPropertyFetch(
|
|
class: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
comments: array(
|
|
0: // property name variations
|
|
)
|
|
)
|
|
name: b
|
|
comments: array(
|
|
0: // property name variations
|
|
)
|
|
)
|
|
1: Expr_StaticPropertyFetch(
|
|
class: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
)
|
|
name: Expr_Variable(
|
|
name: b
|
|
)
|
|
)
|
|
2: Expr_StaticPropertyFetch(
|
|
class: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
)
|
|
name: Scalar_String(
|
|
value: b
|
|
)
|
|
)
|
|
3: Expr_ArrayDimFetch(
|
|
var: Expr_StaticPropertyFetch(
|
|
class: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
comments: array(
|
|
0: // array access
|
|
)
|
|
)
|
|
name: b
|
|
comments: array(
|
|
0: // array access
|
|
)
|
|
)
|
|
dim: Scalar_String(
|
|
value: c
|
|
)
|
|
comments: array(
|
|
0: // array access
|
|
)
|
|
)
|
|
4: Expr_ArrayDimFetch(
|
|
var: Expr_StaticPropertyFetch(
|
|
class: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
)
|
|
name: b
|
|
)
|
|
dim: Scalar_String(
|
|
value: c
|
|
)
|
|
)
|
|
5: Stmt_Nop(
|
|
comments: array(
|
|
0: // class name variations can be found in staticCall.test
|
|
)
|
|
)
|
|
) |