php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_ast.c File Reference
#include "zend_ast.h"
#include "zend_API.h"
#include "zend_operators.h"
#include "zend_language_parser.h"
#include "zend_smart_str.h"
#include "zend_exceptions.h"
#include "zend_constants.h"
#include "zend_enum.h"

Go to the source code of this file.

Macros

#define zend_ast_export_name_list(s, l, i)
 
#define zend_ast_export_catch_name_list(s, l, i)
 
#define BINARY_OP(_op, _p, _pl, _pr)
 
#define PREFIX_OP(_op, _p, _pl)
 
#define FUNC_OP(_op)
 
#define POSTFIX_OP(_op, _p, _pl)
 
#define APPEND_NODE_1(_op)
 
#define APPEND_STR(_op)
 
#define APPEND_DEFAULT_VALUE(n)
 

Functions

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_znode (znode *node)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_with_lineno (zval *zv, uint32_t lineno)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_ex (zval *zv, zend_ast_attr attr)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval (zval *zv)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_from_str (zend_string *str)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_from_long (zend_long lval)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_constant (zend_string *name, zend_ast_attr attr)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_class_const_or_name (zend_ast *class_name, zend_ast *name)
 
ZEND_API zend_astzend_ast_create_decl (zend_ast_kind kind, uint32_t flags, uint32_t start_lineno, zend_string *doc_comment, zend_string *name, zend_ast *child0, zend_ast *child1, zend_ast *child2, zend_ast *child3, zend_ast *child4)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_0 (zend_ast_kind kind)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_1 (zend_ast_kind kind, zend_ast *child)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_2 (zend_ast_kind kind, zend_ast *child1, zend_ast *child2)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_3 (zend_ast_kind kind, zend_ast *child1, zend_ast *child2, zend_ast *child3)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_4 (zend_ast_kind kind, zend_ast *child1, zend_ast *child2, zend_ast *child3, zend_ast *child4)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_5 (zend_ast_kind kind, zend_ast *child1, zend_ast *child2, zend_ast *child3, zend_ast *child4, zend_ast *child5)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_va (zend_ast_kind kind, zend_ast_attr attr, va_list *va)
 
ZEND_API zend_astzend_ast_create_n (unsigned kind,...)
 
ZEND_API zend_astzend_ast_create_ex_n (zend_ast_kind kind, unsigned attr,...)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_0 (zend_ast_kind kind)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_1 (zend_ast_kind kind, zend_ast *child)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_2 (zend_ast_kind kind, zend_ast *child1, zend_ast *child2)
 
zend_astzend_ast_create_concat_op (zend_ast *op0, zend_ast *op1)
 
ZEND_API zend_ast *ZEND_FASTCALL zend_ast_list_add (zend_ast *ast, zend_ast *op)
 
ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner (zval *result, zend_ast *ast, zend_class_entry *scope, bool *short_circuited_ptr, zend_ast_evaluate_ctx *ctx)
 
ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_ex (zval *result, zend_ast *ast, zend_class_entry *scope, bool *short_circuited_ptr, zend_ast_evaluate_ctx *ctx)
 
ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate (zval *result, zend_ast *ast, zend_class_entry *scope)
 
ZEND_API zend_ast_ref *ZEND_FASTCALL zend_ast_copy (zend_ast *ast)
 
ZEND_API void ZEND_FASTCALL zend_ast_destroy (zend_ast *ast)
 
ZEND_API void ZEND_FASTCALL zend_ast_ref_destroy (zend_ast_ref *ast)
 
ZEND_API void zend_ast_apply (zend_ast *ast, zend_ast_apply_func fn, void *context)
 
ZEND_API ZEND_COLD zend_stringzend_ast_export (const char *prefix, zend_ast *ast, const char *suffix)
 
zend_ast *ZEND_FASTCALL zend_ast_with_attributes (zend_ast *ast, zend_ast *attr)
 

Variables

ZEND_API zend_ast_process_t zend_ast_process = NULL
 

Macro Definition Documentation

◆ APPEND_DEFAULT_VALUE

#define APPEND_DEFAULT_VALUE ( n)
Value:
do { \
p = n; \
goto append_default_value; \
} while (0)
zend_long n
Definition ffi.c:4979
p
Definition session.c:1105

Definition at line 1823 of file zend_ast.c.

◆ APPEND_NODE_1

#define APPEND_NODE_1 ( _op)
Value:
do { \
op = _op; \
goto append_node_1; \
} while (0)

Definition at line 1813 of file zend_ast.c.

◆ APPEND_STR

#define APPEND_STR ( _op)
Value:
do { \
op = _op; \
goto append_str; \
} while (0)

Definition at line 1818 of file zend_ast.c.

◆ BINARY_OP

#define BINARY_OP ( _op,
_p,
_pl,
_pr )
Value:
do { \
op = _op; \
p = _p; \
pl = _pl; \
pr = _pr; \
goto binary_op; \
} while (0)

Definition at line 1786 of file zend_ast.c.

◆ FUNC_OP

#define FUNC_OP ( _op)
Value:
do { \
op = _op; \
goto func_op; \
} while (0)

Definition at line 1801 of file zend_ast.c.

◆ POSTFIX_OP

#define POSTFIX_OP ( _op,
_p,
_pl )
Value:
do { \
op = _op; \
p = _p; \
pl = _pl; \
goto postfix_op; \
} while (0)

Definition at line 1806 of file zend_ast.c.

◆ PREFIX_OP

#define PREFIX_OP ( _op,
_p,
_pl )
Value:
do { \
op = _op; \
p = _p; \
pl = _pl; \
goto prefix_op; \
} while (0)

Definition at line 1794 of file zend_ast.c.

◆ zend_ast_export_catch_name_list

#define zend_ast_export_catch_name_list ( s,
l,
i )
Value:
zend_ast_export_name_list_ex(s, l, i, "|")
char s[4]
Definition cdf.c:77

Definition at line 1487 of file zend_ast.c.

◆ zend_ast_export_name_list

#define zend_ast_export_name_list ( s,
l,
i )
Value:
zend_ast_export_name_list_ex(s, l, i, ", ")

Definition at line 1486 of file zend_ast.c.

Function Documentation

◆ zend_ast_apply()

ZEND_API void zend_ast_apply ( zend_ast * ast,
zend_ast_apply_func fn,
void * context )

Definition at line 1217 of file zend_ast.c.

◆ zend_ast_copy()

ZEND_API zend_ast_ref *ZEND_FASTCALL zend_ast_copy ( zend_ast * ast)

Definition at line 1149 of file zend_ast.c.

◆ zend_ast_create_0()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_0 ( zend_ast_kind kind)

Definition at line 136 of file zend_ast.c.

◆ zend_ast_create_1()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_1 ( zend_ast_kind kind,
zend_ast * child )

Definition at line 148 of file zend_ast.c.

◆ zend_ast_create_2()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_2 ( zend_ast_kind kind,
zend_ast * child1,
zend_ast * child2 )

Definition at line 167 of file zend_ast.c.

◆ zend_ast_create_3()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_3 ( zend_ast_kind kind,
zend_ast * child1,
zend_ast * child2,
zend_ast * child3 )

Definition at line 189 of file zend_ast.c.

◆ zend_ast_create_4()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_4 ( zend_ast_kind kind,
zend_ast * child1,
zend_ast * child2,
zend_ast * child3,
zend_ast * child4 )

Definition at line 214 of file zend_ast.c.

◆ zend_ast_create_5()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_5 ( zend_ast_kind kind,
zend_ast * child1,
zend_ast * child2,
zend_ast * child3,
zend_ast * child4,
zend_ast * child5 )

Definition at line 242 of file zend_ast.c.

◆ zend_ast_create_class_const_or_name()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_class_const_or_name ( zend_ast * class_name,
zend_ast * name )

Definition at line 102 of file zend_ast.c.

◆ zend_ast_create_concat_op()

zend_ast * zend_ast_create_concat_op ( zend_ast * op0,
zend_ast * op1 )

Definition at line 459 of file zend_ast.c.

◆ zend_ast_create_constant()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_constant ( zend_string * name,
zend_ast_attr attr )

Definition at line 91 of file zend_ast.c.

◆ zend_ast_create_decl()

ZEND_API zend_ast * zend_ast_create_decl ( zend_ast_kind kind,
uint32_t flags,
uint32_t start_lineno,
zend_string * doc_comment,
zend_string * name,
zend_ast * child0,
zend_ast * child1,
zend_ast * child2,
zend_ast * child3,
zend_ast * child4 )

Definition at line 112 of file zend_ast.c.

◆ zend_ast_create_ex_n()

ZEND_API zend_ast * zend_ast_create_ex_n ( zend_ast_kind kind,
unsigned attr,
... )

Definition at line 301 of file zend_ast.c.

◆ zend_ast_create_list_0()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_0 ( zend_ast_kind kind)

Definition at line 310 of file zend_ast.c.

◆ zend_ast_create_list_1()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_1 ( zend_ast_kind kind,
zend_ast * child )

Definition at line 324 of file zend_ast.c.

◆ zend_ast_create_list_2()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_list_2 ( zend_ast_kind kind,
zend_ast * child1,
zend_ast * child2 )

Definition at line 348 of file zend_ast.c.

◆ zend_ast_create_n()

ZEND_API zend_ast * zend_ast_create_n ( unsigned kind,
... )

Definition at line 293 of file zend_ast.c.

◆ zend_ast_create_va()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_va ( zend_ast_kind kind,
zend_ast_attr attr,
va_list * va )

Definition at line 273 of file zend_ast.c.

◆ zend_ast_create_znode()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_znode ( znode * node)

Definition at line 45 of file zend_ast.c.

◆ zend_ast_create_zval()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval ( zval * zv)

Definition at line 75 of file zend_ast.c.

◆ zend_ast_create_zval_ex()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_ex ( zval * zv,
zend_ast_attr attr )

Definition at line 71 of file zend_ast.c.

◆ zend_ast_create_zval_from_long()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_from_long ( zend_long lval)

Definition at line 85 of file zend_ast.c.

◆ zend_ast_create_zval_from_str()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_from_str ( zend_string * str)

Definition at line 79 of file zend_ast.c.

◆ zend_ast_create_zval_with_lineno()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_create_zval_with_lineno ( zval * zv,
uint32_t lineno )

Definition at line 67 of file zend_ast.c.

◆ zend_ast_destroy()

ZEND_API void ZEND_FASTCALL zend_ast_destroy ( zend_ast * ast)

Definition at line 1163 of file zend_ast.c.

◆ zend_ast_evaluate()

ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate ( zval * result,
zend_ast * ast,
zend_class_entry * scope )

Definition at line 1061 of file zend_ast.c.

◆ zend_ast_evaluate_ex()

ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_ex ( zval * result,
zend_ast * ast,
zend_class_entry * scope,
bool * short_circuited_ptr,
zend_ast_evaluate_ctx * ctx )

Definition at line 544 of file zend_ast.c.

◆ zend_ast_evaluate_inner()

ZEND_API zend_result ZEND_FASTCALL zend_ast_evaluate_inner ( zval * result,
zend_ast * ast,
zend_class_entry * scope,
bool * short_circuited_ptr,
zend_ast_evaluate_ctx * ctx )

Definition at line 567 of file zend_ast.c.

◆ zend_ast_export()

ZEND_API ZEND_COLD zend_string * zend_ast_export ( const char * prefix,
zend_ast * ast,
const char * suffix )

Definition at line 2679 of file zend_ast.c.

◆ zend_ast_list_add()

ZEND_API zend_ast *ZEND_FASTCALL zend_ast_list_add ( zend_ast * ast,
zend_ast * op )

Definition at line 476 of file zend_ast.c.

◆ zend_ast_ref_destroy()

ZEND_API void ZEND_FASTCALL zend_ast_ref_destroy ( zend_ast_ref * ast)

Definition at line 1211 of file zend_ast.c.

◆ zend_ast_with_attributes()

zend_ast *ZEND_FASTCALL zend_ast_with_attributes ( zend_ast * ast,
zend_ast * attr )

Definition at line 2690 of file zend_ast.c.

Variable Documentation

◆ zend_ast_process

ZEND_API zend_ast_process_t zend_ast_process = NULL

Definition at line 29 of file zend_ast.c.