Changeset View
Changeset View
Standalone View
Standalone View
support/xhpast/parser.y
| Show First 20 Lines • Show All 1,191 Lines • ▼ Show 20 Lines | |||||
| | class_constant_declaration ';' { | | class_constant_declaration ';' { | ||||
| $$ = NNEW(n_STATEMENT)->appendChild($1); | $$ = NNEW(n_STATEMENT)->appendChild($1); | ||||
| NMORE($$, $2); | NMORE($$, $2); | ||||
| } | } | ||||
| | trait_use_statement { | | trait_use_statement { | ||||
| $$ = $1; | $$ = $1; | ||||
| } | } | ||||
| | method_modifiers function { | | method_modifiers function { | ||||
| yyextra->old_expecting_xhp_class_statements = | /* empty */ | ||||
| yyextra->expecting_xhp_class_statements; | |||||
| yyextra->expecting_xhp_class_statements = false; | |||||
| } is_reference T_STRING '(' parameter_list ')' method_body { | } is_reference T_STRING '(' parameter_list ')' method_body { | ||||
| yyextra->expecting_xhp_class_statements = | |||||
| yyextra->old_expecting_xhp_class_statements; | |||||
| $$ = NNEW(n_METHOD_DECLARATION); | $$ = NNEW(n_METHOD_DECLARATION); | ||||
| NMORE($$, $2); | NMORE($$, $2); | ||||
| $$->appendChild($1); | $$->appendChild($1); | ||||
| $$->appendChild($4); | $$->appendChild($4); | ||||
| $$->appendChild(NTYPE($5, n_STRING)); | $$->appendChild(NTYPE($5, n_STRING)); | ||||
| $$->appendChild(NEXPAND($6, $7, $8)); | $$->appendChild(NEXPAND($6, $7, $8)); | ||||
| $$->appendChild(NNEW(n_EMPTY)); | $$->appendChild(NNEW(n_EMPTY)); | ||||
| $$->appendChild($9); | $$->appendChild($9); | ||||
| ▲ Show 20 Lines • Show All 1,520 Lines • Show Last 20 Lines | |||||