Changeset View
Changeset View
Standalone View
Standalone View
support/xhpast/parser.y
Show First 20 Lines • Show All 2,701 Lines • ▼ Show 20 Lines | | combined_scalar_offset '[' dim_offset ']' { | ||||
NMORE($$, $4); | NMORE($$, $4); | ||||
} | } | ||||
| T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { | | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { | ||||
$$ = NNEW(n_INDEX_ACCESS); | $$ = NNEW(n_INDEX_ACCESS); | ||||
$$->appendChild(NTYPE($1, n_STRING_SCALAR)); | $$->appendChild(NTYPE($1, n_STRING_SCALAR)); | ||||
$$->appendChild($3); | $$->appendChild($3); | ||||
NMORE($$, $4); | NMORE($$, $4); | ||||
} | } | ||||
| class_constant '[' dim_offset ']' { | |||||
$$ = NNEW(n_INDEX_ACCESS); | |||||
$$->appendChild($1); | |||||
$$->appendChild($3); | |||||
NMORE($$, $4); | |||||
} | |||||
| T_STRING '[' dim_offset ']' { | |||||
$$ = NNEW(n_INDEX_ACCESS); | |||||
$$->appendChild(NTYPE($1, n_STRING)); | |||||
$$->appendChild($3); | |||||
NMORE($$, $4); | |||||
} | |||||
; | ; | ||||
combined_scalar: | combined_scalar: | ||||
T_ARRAY '(' array_pair_list ')' { | T_ARRAY '(' array_pair_list ')' { | ||||
NTYPE($1, n_ARRAY_LITERAL); | NTYPE($1, n_ARRAY_LITERAL); | ||||
$1->appendChild(NEXPAND($2, $3, $4)); | $1->appendChild(NEXPAND($2, $3, $4)); | ||||
$$ = $1; | $$ = $1; | ||||
} | } | ||||
Show All 37 Lines |