Skip to content

Commit 23fe58c

Browse files
authoredDec 22, 2022
Remove _zend_ast_decl->lex_pos (#10046)
This struct member was only written to, but never read.
1 parent 08fb7f9 commit 23fe58c

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed
 

‎Zend/zend_ast.c

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ ZEND_API zend_ast *zend_ast_create_decl(
121121
ast->start_lineno = start_lineno;
122122
ast->end_lineno = CG(zend_lineno);
123123
ast->flags = flags;
124-
ast->lex_pos = LANG_SCNG(yy_text);
125124
ast->doc_comment = doc_comment;
126125
ast->name = name;
127126
ast->child[0] = child0;

‎Zend/zend_ast.h

-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ typedef struct _zend_ast_decl {
208208
uint32_t start_lineno;
209209
uint32_t end_lineno;
210210
uint32_t flags;
211-
unsigned char *lex_pos;
212211
zend_string *doc_comment;
213212
zend_string *name;
214213
zend_ast *child[5];

‎Zend/zend_language_parser.y

-1
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,6 @@ inline_function:
12501250
T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags
12511251
{ $$ = zend_ast_create_decl(ZEND_AST_ARROW_FUNC, $2 | $12, $1, $3,
12521252
zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $5, NULL, $11, $7, NULL);
1253-
((zend_ast_decl *) $$)->lex_pos = $10;
12541253
CG(extra_fn_flags) = $9; }
12551254
;
12561255

0 commit comments

Comments
 (0)