Changeset View
Changeset View
Standalone View
Standalone View
support/xhpast/parser.y
Show First 20 Lines • Show All 2,740 Lines • ▼ Show 20 Lines | |||||
new_expr: | new_expr: | ||||
T_NEW class_name_reference ctor_arguments { | T_NEW class_name_reference ctor_arguments { | ||||
NTYPE($1, n_NEW); | NTYPE($1, n_NEW); | ||||
$1->appendChild($2); | $1->appendChild($2); | ||||
$1->appendChild($3); | $1->appendChild($3); | ||||
$$ = $1; | $$ = $1; | ||||
} | } | ||||
| T_NEW T_CLASS ctor_arguments extends_from implements_list | |||||
'{' class_statement_list '}' { | |||||
$$ = NNEW(n_CLASS_DECLARATION); | |||||
$$->appendChild($2); | |||||
$$->appendChild(NNEW(n_EMPTY)); | |||||
$$->appendChild($4); | |||||
$$->appendChild($5); | |||||
$$->appendChild(NEXPAND($6, $7, $8)); | |||||
NMORE($$, $8); | |||||
NTYPE($1, n_NEW); | |||||
$1->appendChild($$); | |||||
$1->appendChild($3); | |||||
$$ = $1; | |||||
} | |||||
; | ; | ||||
class_constant: | class_constant: | ||||
class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { | class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { | ||||
$$ = NNEW(n_CLASS_STATIC_ACCESS); | $$ = NNEW(n_CLASS_STATIC_ACCESS); | ||||
$$->appendChild($1); | $$->appendChild($1); | ||||
$$->appendChild(NTYPE($3, n_STRING)); | $$->appendChild(NTYPE($3, n_STRING)); | ||||
} | } | ||||
Show All 15 Lines |