summaryrefslogtreecommitdiff
path: root/ext/tokenizer
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-05-02 14:57:16 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-05-02 15:04:03 +0200
commitf3e5bbe6f37ce52a9ecd42812389e6aaf3aa2892 (patch)
tree4d7baab746e966624ee4557c2153e5099cbbcbd3 /ext/tokenizer
parenteaab0a2b6f6f61bc0b8c42579a74a626b179a070 (diff)
downloadphp-git-f3e5bbe6f37ce52a9ecd42812389e6aaf3aa2892.tar.gz
Implement arrow functions
Per RFC: https://wiki.php.net/rfc/arrow_functions_v2 Co-authored-by: Levi Morrison <levim@php.net> Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Diffstat (limited to 'ext/tokenizer')
-rw-r--r--ext/tokenizer/tokenizer_data.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c
index 8b5c6be945..5048ef732f 100644
--- a/ext/tokenizer/tokenizer_data.c
+++ b/ext/tokenizer/tokenizer_data.c
@@ -110,6 +110,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("T_CONTINUE", T_CONTINUE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_GOTO", T_GOTO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_FUNCTION", T_FUNCTION, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_FN", T_FN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_CONST", T_CONST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_RETURN", T_RETURN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_TRY", T_TRY, CONST_CS | CONST_PERSISTENT);
@@ -251,6 +252,7 @@ char *get_token_type_name(int token_type)
case T_CONTINUE: return "T_CONTINUE";
case T_GOTO: return "T_GOTO";
case T_FUNCTION: return "T_FUNCTION";
+ case T_FN: return "T_FN";
case T_CONST: return "T_CONST";
case T_RETURN: return "T_RETURN";
case T_TRY: return "T_TRY";