Skip to content

Instantly share code, notes, and snippets.

@marcioAlmada
Last active October 2, 2015 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcioAlmada/faf67d251ada131043bd to your computer and use it in GitHub Desktop.
Save marcioAlmada/faf67d251ada131043bd to your computer and use it in GitHub Desktop.
callable_arg_type_list:
/* empty */ { $$ = NULL; }
| '(' ')' { $$ = zend_ast_create_list(0, ZEND_AST_PARAM_LIST); }
| T_INT_CAST {
zval zv;
ZVAL_STRINGL(&zv, "int", sizeof("int")-1);
zend_ast *type = zend_ast_create_zval_ex(&zv, ZEND_NAME_NOT_FQ);
zend_ast *arg = zend_ast_create_ex(ZEND_AST_PARAM, 0, type, NULL, NULL);
zend_ast *args = zend_ast_create_list(0, ZEND_AST_PARAM_LIST);
zend_ast_list_add(args, arg);
$$ = args;
}
| T_DOUBLE_CAST ...
;
@marcioAlmada
Copy link
Author

@nikita2206 in case you miss the chat room ping ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment