1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: a89f03303f8a7d254509ae2bc46a36bb79a3c900 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_get_all, 0, 1, IS_ARRAY, 0)
5 ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0)
6 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
7 ZEND_END_ARG_INFO()
8
9 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_name, 0, 1, IS_STRING, 0)
10 ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0)
11 ZEND_END_ARG_INFO()
12
13 #define arginfo_class_PhpToken_tokenize arginfo_token_get_all
14
15 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PhpToken___construct, 0, 0, 2)
16 ZEND_ARG_TYPE_INFO(0, id, IS_LONG, 0)
17 ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0)
18 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, line, IS_LONG, 0, "-1")
19 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pos, IS_LONG, 0, "-1")
20 ZEND_END_ARG_INFO()
21
22 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken_is, 0, 1, _IS_BOOL, 0)
23 ZEND_ARG_INFO(0, kind)
24 ZEND_END_ARG_INFO()
25
26 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken_isIgnorable, 0, 0, _IS_BOOL, 0)
27 ZEND_END_ARG_INFO()
28
29 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken_getTokenName, 0, 0, IS_STRING, 1)
30 ZEND_END_ARG_INFO()
31
32 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_PhpToken___toString, 0, 0, IS_STRING, 0)
33 ZEND_END_ARG_INFO()
34
35
36 ZEND_FUNCTION(token_get_all);
37 ZEND_FUNCTION(token_name);
38 ZEND_METHOD(PhpToken, tokenize);
39 ZEND_METHOD(PhpToken, __construct);
40 ZEND_METHOD(PhpToken, is);
41 ZEND_METHOD(PhpToken, isIgnorable);
42 ZEND_METHOD(PhpToken, getTokenName);
43 ZEND_METHOD(PhpToken, __toString);
44
45
46 static const zend_function_entry ext_functions[] = {
47 ZEND_FE(token_get_all, arginfo_token_get_all)
48 ZEND_FE(token_name, arginfo_token_name)
49 ZEND_FE_END
50 };
51
52
53 static const zend_function_entry class_PhpToken_methods[] = {
54 ZEND_ME(PhpToken, tokenize, arginfo_class_PhpToken_tokenize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
55 ZEND_ME(PhpToken, __construct, arginfo_class_PhpToken___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
56 ZEND_ME(PhpToken, is, arginfo_class_PhpToken_is, ZEND_ACC_PUBLIC)
57 ZEND_ME(PhpToken, isIgnorable, arginfo_class_PhpToken_isIgnorable, ZEND_ACC_PUBLIC)
58 ZEND_ME(PhpToken, getTokenName, arginfo_class_PhpToken_getTokenName, ZEND_ACC_PUBLIC)
59 ZEND_ME(PhpToken, __toString, arginfo_class_PhpToken___toString, ZEND_ACC_PUBLIC)
60 ZEND_FE_END
61 };
62
register_tokenizer_symbols(int module_number)63 static void register_tokenizer_symbols(int module_number)
64 {
65 REGISTER_LONG_CONSTANT("TOKEN_PARSE", TOKEN_PARSE, CONST_PERSISTENT);
66 }
67
register_class_PhpToken(zend_class_entry * class_entry_Stringable)68 static zend_class_entry *register_class_PhpToken(zend_class_entry *class_entry_Stringable)
69 {
70 zend_class_entry ce, *class_entry;
71
72 INIT_CLASS_ENTRY(ce, "PhpToken", class_PhpToken_methods);
73 class_entry = zend_register_internal_class_ex(&ce, NULL);
74 zend_class_implements(class_entry, 1, class_entry_Stringable);
75
76 zval property_id_default_value;
77 ZVAL_UNDEF(&property_id_default_value);
78 zend_string *property_id_name = zend_string_init("id", sizeof("id") - 1, 1);
79 zend_declare_typed_property(class_entry, property_id_name, &property_id_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
80 zend_string_release(property_id_name);
81
82 zval property_text_default_value;
83 ZVAL_UNDEF(&property_text_default_value);
84 zend_string *property_text_name = zend_string_init("text", sizeof("text") - 1, 1);
85 zend_declare_typed_property(class_entry, property_text_name, &property_text_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
86 zend_string_release(property_text_name);
87
88 zval property_line_default_value;
89 ZVAL_UNDEF(&property_line_default_value);
90 zend_string *property_line_name = zend_string_init("line", sizeof("line") - 1, 1);
91 zend_declare_typed_property(class_entry, property_line_name, &property_line_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
92 zend_string_release(property_line_name);
93
94 zval property_pos_default_value;
95 ZVAL_UNDEF(&property_pos_default_value);
96 zend_string *property_pos_name = zend_string_init("pos", sizeof("pos") - 1, 1);
97 zend_declare_typed_property(class_entry, property_pos_name, &property_pos_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
98 zend_string_release(property_pos_name);
99
100 return class_entry;
101 }
102