function node

This commit is contained in:
vadim
2017-12-07 18:39:34 +02:00
parent 4394c3997d
commit 280ca04b50
3 changed files with 396 additions and 352 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -417,12 +417,7 @@ unset_variable:
function_declaration_statement:
T_FUNCTION returns_ref T_STRING '(' parameter_list ')' return_type '{' inner_statement_list '}'
{
$$ = node.NewSimpleNode("Function").
Attribute("name", $3.String()).
Attribute("returns_ref", $2).
Append($5).
Append($7).
Append($9);
$$ = stmt.NewFunction($3, $2 == "true", $5.(node.SimpleNode).Children, $7, $9.(node.SimpleNode).Children)
}
;