Home
last modified time | relevance | path

Searched refs:token (Results 26 – 50 of 226) sorted by relevance

12345678910

/php-src/ext/dom/lexbor/lexbor/css/syntax/
H A Danb.c20 const lxb_css_syntax_token_t *token,
95 token = lxb_css_syntax_parser_token(parser); in lxb_css_syntax_anb_state()
96 if (token == NULL) { in lxb_css_syntax_anb_state()
101 || (token->type != LXB_CSS_SYNTAX_TOKEN__END)) in lxb_css_syntax_anb_state()
103 (void) lxb_css_syntax_anb_fail(parser, token); in lxb_css_syntax_anb_state()
138 switch (token->type) { in lxb_css_syntax_anb_handler()
176 ident = lxb_css_syntax_token_ident(token); in lxb_css_syntax_anb_handler()
220 ident = lxb_css_syntax_token_ident(token); in lxb_css_syntax_anb_state_ident()
288 switch (token->type) { in lxb_css_syntax_anb_state_ident_data()
355 if (token->type != LXB_CSS_SYNTAX_TOKEN_NUMBER) { in lxb_css_syntax_anb_state_ident_data()
[all …]
H A Dtoken.c65 lxb_css_syntax_token_t *token; in lxb_css_syntax_token_consume() local
101 length = token->length + 1; in lxb_css_syntax_token_string_dup()
122 str->length = token->length; in lxb_css_syntax_token_string_dup()
159 token->cloned = true; in lxb_css_syntax_token_string_make()
168 lxb_css_syntax_token_t *token; in lxb_css_syntax_token_cached_create() local
171 if (token == NULL) { in lxb_css_syntax_token_cached_create()
182 token->cloned = false; in lxb_css_syntax_token_cached_create()
184 return token; in lxb_css_syntax_token_cached_create()
194 if (token->cloned) { in lxb_css_syntax_token_string_free()
294 switch (token->type) { in lxb_css_syntax_token_serialize()
[all …]
H A Dtokenizer.c281 lxb_css_syntax_token_t *token; in lxb_css_syntax_tokenizer_token() local
308 token->cloned = false; in lxb_css_syntax_tokenizer_token()
309 return token; in lxb_css_syntax_tokenizer_token()
344 if (token == NULL) { in lxb_css_syntax_tokenizer_token()
348 token->offset = tkz->offset; in lxb_css_syntax_tokenizer_token()
364 token->cloned = false; in lxb_css_syntax_tokenizer_token()
366 return token; in lxb_css_syntax_tokenizer_token()
374 token->cloned = false; in lxb_css_syntax_tokenizer_token()
388 return token; in lxb_css_syntax_tokenizer_token()
452 if (token == NULL) { in lxb_css_syntax_tokenizer_lookup_colon()
[all …]
H A Dparser.h33 const lxb_css_syntax_token_t *token,
41 const lxb_css_syntax_token_t *token,
48 const lxb_css_syntax_token_t *token,
55 const lxb_css_syntax_token_t *token,
62 const lxb_css_syntax_token_t *token,
69 const lxb_css_syntax_token_t *token,
76 const lxb_css_syntax_token_t *token,
94 const lxb_css_syntax_token_t *token,
99 const lxb_css_syntax_token_t *token,
/php-src/ext/dom/lexbor/lexbor/html/tree/insertion_mode/
H A Din_frameset.c13 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_in_frameset() argument
15 if (token->type & LXB_HTML_TOKEN_TYPE_CLOSE) { in lxb_html_tree_insertion_mode_in_frameset()
16 if (token->tag_id == LXB_TAG_FRAMESET) in lxb_html_tree_insertion_mode_in_frameset()
22 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_in_frameset()
45 switch (token->tag_id) { in lxb_html_tree_insertion_mode_in_frameset()
49 comment = lxb_html_tree_insert_comment(tree, token, NULL); in lxb_html_tree_insertion_mode_in_frameset()
58 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_in_frameset()
63 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_in_frameset()
68 element = lxb_html_tree_insert_html_element(tree, token); in lxb_html_tree_insertion_mode_in_frameset()
101 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_in_frameset()
[all …]
H A Dbefore_html.c14 lxb_html_token_t *token);
18 lxb_html_token_t *token);
30 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_before_html() argument
32 if (token->type & LXB_HTML_TOKEN_TYPE_CLOSE) { in lxb_html_tree_insertion_mode_before_html()
36 return lxb_html_tree_insertion_mode_before_html_open(tree, token); in lxb_html_tree_insertion_mode_before_html()
43 switch (token->tag_id) { in lxb_html_tree_insertion_mode_before_html_open()
45 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_before_html_open()
52 comment = lxb_html_tree_insert_comment(tree, token, in lxb_html_tree_insertion_mode_before_html_open()
94 if (token->text_start == token->text_end) { in lxb_html_tree_insertion_mode_before_html_open()
110 switch (token->tag_id) { in lxb_html_tree_insertion_mode_before_html_closed()
[all …]
H A Dafter_body.c13 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_after_body() argument
15 switch (token->tag_id) { in lxb_html_tree_insertion_mode_after_body()
22 comment = lxb_html_tree_insert_comment(tree, token, html_node); in lxb_html_tree_insertion_mode_after_body()
31 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_after_body()
36 if (token->type & LXB_HTML_TOKEN_TYPE_CLOSE) in lxb_html_tree_insertion_mode_after_body()
39 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_after_body()
49 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_body()
60 lxb_html_token_t ws_token = *token; in lxb_html_tree_insertion_mode_after_body()
68 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_body()
74 lxb_html_tree_parse_error(tree, token, LXB_HTML_RULES_ERROR_UNTO); in lxb_html_tree_insertion_mode_after_body()
H A Dafter_after_frameset.c12 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_after_after_frameset() argument
14 switch (token->tag_id) { in lxb_html_tree_insertion_mode_after_after_frameset()
18 comment = lxb_html_tree_insert_comment(tree, token, in lxb_html_tree_insertion_mode_after_after_frameset()
29 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_after_frameset()
40 return lxb_html_tree_insertion_mode_in_head(tree, token); in lxb_html_tree_insertion_mode_after_after_frameset()
43 lxb_html_token_t ws_token = *token; in lxb_html_tree_insertion_mode_after_after_frameset()
51 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_after_frameset()
57 lxb_html_tree_parse_error(tree, token, LXB_HTML_RULES_ERROR_UNTO); in lxb_html_tree_insertion_mode_after_after_frameset()
H A Dafter_frameset.c12 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_after_frameset() argument
14 switch (token->tag_id) { in lxb_html_tree_insertion_mode_after_frameset()
18 comment = lxb_html_tree_insert_comment(tree, token, NULL); in lxb_html_tree_insertion_mode_after_frameset()
27 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_after_frameset()
32 if (token->type & LXB_HTML_TOKEN_TYPE_CLOSE) { in lxb_html_tree_insertion_mode_after_frameset()
38 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_frameset()
41 return lxb_html_tree_insertion_mode_in_head(tree, token); in lxb_html_tree_insertion_mode_after_frameset()
56 tree->status = lxb_html_token_make_text(token, &str, in lxb_html_tree_insertion_mode_after_frameset()
82 lxb_html_tree_parse_error(tree, token, LXB_HTML_RULES_ERROR_UNTO); in lxb_html_tree_insertion_mode_after_frameset()
H A Dafter_after_body.c12 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_after_after_body() argument
14 switch (token->tag_id) { in lxb_html_tree_insertion_mode_after_after_body()
18 comment = lxb_html_tree_insert_comment(tree, token, in lxb_html_tree_insertion_mode_after_after_body()
29 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_after_body()
40 lxb_html_token_t ws_token = *token; in lxb_html_tree_insertion_mode_after_after_body()
48 return lxb_html_tree_insertion_mode_in_body(tree, token); in lxb_html_tree_insertion_mode_after_after_body()
54 lxb_html_tree_parse_error(tree, token, LXB_HTML_RULES_ERROR_UNTO); in lxb_html_tree_insertion_mode_after_after_body()
H A Dinitial.c109 lxb_html_token_t *token);
135 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_initial() argument
137 switch (token->tag_id) { in lxb_html_tree_insertion_mode_initial()
141 comment = lxb_html_tree_insert_comment(tree, token, in lxb_html_tree_insertion_mode_initial()
156 tree->status = lxb_html_token_data_skip_ws_begin(token); in lxb_html_tree_insertion_mode_initial()
161 if (token->text_start == token->text_end) { in lxb_html_tree_insertion_mode_initial()
170 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_initial()
187 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_initial_doctype() argument
209 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_initial_doctype()
214 token, is_html); in lxb_html_tree_insertion_mode_initial_doctype()
[all …]
H A Din_table_text.c17 lxb_html_token_t *token) in lxb_html_tree_insertion_mode_in_table_text() argument
23 if (token->tag_id == LXB_TAG__TEXT) { in lxb_html_tree_insertion_mode_in_table_text()
24 if (token->null_count != 0) { in lxb_html_tree_insertion_mode_in_table_text()
25 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_in_table_text()
38 if (token->null_count != 0) { in lxb_html_tree_insertion_mode_in_table_text()
39 lxb_html_tree_parse_error(tree, token, in lxb_html_tree_insertion_mode_in_table_text()
42 tree->status = lxb_html_token_make_text_drop_null(token, text, in lxb_html_tree_insertion_mode_in_table_text()
46 tree->status = lxb_html_token_make_text(token, text, in lxb_html_tree_insertion_mode_in_table_text()
79 lxb_html_tree_parse_error(tree, token, LXB_HTML_RULES_ERROR_CHINTATE); in lxb_html_tree_insertion_mode_in_table_text()
/php-src/ext/tokenizer/tests/
H A DPhpToken_methods.phpt25 $token = $tokens[5];
34 var_dump($token->is(T_CLASS));
35 var_dump($token->is('class'));
41 $token->is(3.141);
46 $token->is([3.141]);
51 unset($token->id);
52 unset($token->text);
54 $token->is(T_FUNCTION);
59 $token->is('function');
64 $token->is([T_FUNCTION]);
[all …]
H A DPhpToken_constructor.phpt8 $token = new PhpToken(300, 'function');
9 var_dump($token);
10 $token = new PhpToken(300, 'function', 10);
11 var_dump($token);
12 $token = new PhpToken(300, 'function', 10, 100);
13 var_dump($token);
/php-src/ext/dom/lexbor/lexbor/html/tokenizer/
H A Dstate.h56 tkz->token->tag_id = tag->tag_id; \
69 tkz->token->attr_last->name = data; \
99 (tkz->token->end = v_end)
109 (tkz->token->end = tkz->last)
129 (tkz->token->attr_last->name_end = v_end)
132 (tkz->token->attr_last->name_end = tkz->last)
142 (tkz->token->attr_last->value_end = v_end)
145 (tkz->token->attr_last->value_end = tkz->last)
148 tkz->token = tkz->callback_token_done(tkz, tkz->token, \
159 if (tkz->token->begin != tkz->token->end) { \
[all …]
/php-src/ext/dom/lexbor/lexbor/html/
H A Dtoken.h64 lxb_html_token_attr_remove(lxb_html_token_t *token,
68 lxb_html_token_attr_delete(lxb_html_token_t *token,
72 lxb_html_token_make_text(lxb_html_token_t *token, lexbor_str_t *str,
80 lxb_html_token_make_text_replace_null(lxb_html_token_t *token,
84 lxb_html_token_data_skip_ws_begin(lxb_html_token_t *token);
87 lxb_html_token_data_skip_one_newline_begin(lxb_html_token_t *token);
90 lxb_html_token_data_split_ws_begin(lxb_html_token_t *token,
94 lxb_html_token_doctype_parse(lxb_html_token_t *token,
106 lxb_html_token_clean(lxb_html_token_t *token) in lxb_html_token_clean() argument
108 memset(token, 0, sizeof(lxb_html_token_t)); in lxb_html_token_clean()
[all …]
/php-src/ext/dom/lexbor/lexbor/css/selectors/
H A Dstate.h20 const lxb_css_syntax_token_t *token,
25 const lxb_css_syntax_token_t *token,
30 const lxb_css_syntax_token_t *token,
35 const lxb_css_syntax_token_t *token,
40 const lxb_css_syntax_token_t *token,
45 const lxb_css_syntax_token_t *token, void *ctx);
49 const lxb_css_syntax_token_t *token, void *ctx);
53 const lxb_css_syntax_token_t *token, void *ctx);
58 const lxb_css_syntax_token_t *token,
63 const lxb_css_syntax_token_t *token,
[all …]
/php-src/sapi/phpdbg/
H A Dphpdbg_parser.y42 %token END 0 "end of command"
43 %token T_EVAL "eval"
44 %token T_RUN "run"
45 %token T_SHELL "shell"
46 %token T_IF "if (condition)"
50 %token T_COLON ": (colon)"
53 %token T_SEPARATOR "# (pound sign)"
55 %token T_DIGITS "digits (numbers)"
57 %token T_ADDR "address"
58 %token T_OPCODE "opcode"
[all …]
/php-src/Zend/
H A Dzend_highlight.c80 zval token; in zend_highlight() local
117 ZVAL_UNDEF(&token); in zend_highlight()
141 if (Z_TYPE(token) == IS_STRING) { in zend_highlight()
151 zval_ptr_dtor_str(&token); in zend_highlight()
155 ZVAL_UNDEF(&token); in zend_highlight()
169 zval token; in zend_strip() local
183 ZVAL_UNDEF(&token); in zend_strip()
194 ZVAL_UNDEF(&token); in zend_strip()
202 if (Z_TYPE(token) == IS_STRING) { in zend_strip()
213 zval_ptr_dtor_str(&token); in zend_strip()
[all …]
H A Dzend_language_parser.y96 %token <ast> T_INLINE_HTML
186 %token END 0 "end of file"
187 %token T_ATTRIBUTE "'#['"
188 %token T_PLUS_EQUAL "'+='"
189 %token T_MINUS_EQUAL "'-='"
208 %token T_SPACESHIP "'<=>'"
209 %token T_SL "'<<'"
210 %token T_SR "'>>'"
211 %token T_INC "'++'"
212 %token T_DEC "'--'"
[all …]
/php-src/ext/dom/lexbor/lexbor/css/
H A Dparser.h21 #define lxb_css_parser_token_m(parser, token) \ argument
23 token = lxb_css_syntax_parser_token(parser); \
24 if (token == NULL) { \
30 #define lxb_css_parser_token_next_m(parser, token) \ argument
32 token = lxb_css_syntax_token_next((parser)->tkz); \
240 const lxb_css_syntax_token_t *token);
473 const lxb_css_syntax_token_t *token) in lxb_css_parser_offset_set() argument
476 if (token == NULL) { in lxb_css_parser_offset_set()
481 parser->pos = lxb_css_syntax_token_base(token)->begin in lxb_css_parser_offset_set()
482 + lxb_css_syntax_token_base(token)->length; in lxb_css_parser_offset_set()
[all …]
H A Dstate.c14 const lxb_css_syntax_token_t *token, void *ctx) in lxb_css_state_success() argument
16 switch (token->type) { in lxb_css_state_success()
33 const lxb_css_syntax_token_t *token, void *ctx) in lxb_css_state_failed() argument
35 if (token->type == LXB_CSS_SYNTAX_TOKEN__END) { in lxb_css_state_failed()
48 const lxb_css_syntax_token_t *token, void *ctx) in lxb_css_state_stop() argument
/php-src/ext/dom/lexbor/lexbor/html/tree/
H A Derror.c12 lxb_html_token_t *token, lxb_html_tree_error_id_t id) in lxb_html_tree_error_add() argument
24 entry->line = token->line; in lxb_html_tree_error_add()
25 entry->column = token->column; in lxb_html_tree_error_add()
26 entry->length = token->end - token->begin; in lxb_html_tree_error_add()
/php-src/ext/opcache/tests/jit/
H A Dgh15101.phpt14 function test($context, $token) {
15 if ($token instanceof DoctypeToken) {
16 $this->processDoctypeToken($context, $token);
19 private function processDoctypeToken(TreeBuilderContext $context, DoctypeToken $token): void
21 $publicId = $token->publicIdentifier;
22 $systemId = $token->systemIdentifier;
23 $name = $token->name;
71 foreach ([$doc, $t] as $token) {
72 $a->test($doc, $token);
/php-src/ext/phar/
H A Dmakestub.php6 foreach (token_get_all($s) as $token) {
7 if (is_array($token)) {
8 if ($token[0] == T_COMMENT) {
9 $token[1] = '';
11 if ($token[0] == T_WHITESPACE) {
12 $n = str_repeat("\n", substr_count($token[1], "\n"));
13 $token[1] = strlen($n) ? $n : ' ';
15 $news .= $token[1];
17 $news .= $token;

Completed in 157 milliseconds

12345678910