package pfff
Tools and APIs for program analysis, code visualization, refactoring
Install
Dune Dependency
Authors
Maintainers
Sources
0.39.5.tar.gz
md5=e23dbd320a8681b74315162a02bf97a7
sha512=2998432bcd6d9a459331d733c4446d35459d42787fcf2fd332d3ec5131a4d358bb8f060b45d38696bcd584e1eaa8c1b21b82d7d3005e83c1ecefd22fec842ee7
doc/pfff-lang_php/Cst_php/index.html
Module Cst_php
type tok = Parse_info.t
and info = tok
and 'a wrap = 'a * tok
and 'a comma_list = ('a, tok) Common.either list
and 'a comma_list_dots = ('a, tok, tok) Common.either3 list
type qualified_ident = qualified_ident_element list
type hint_type =
| Hint of name * type_args option
| HintArray of tok
| HintQuestion of tok * hint_type
| HintTuple of hint_type comma_list paren
| HintCallback of (tok * hint_type comma_list_dots paren * (tok * tok option * hint_type) option) paren
| HintShape of tok * (string_const_expr * tok * hint_type) comma_list paren
| HintTypeConst of hint_type * tok * hint_type
| HintVariadic of tok * hint_type option
and type_args = hint_type comma_list single_angle
and type_params = type_param comma_list single_angle
and class_name = hint_type
and expr =
| Id of name
| IdVar of dname * Scope_php.phpscope ref
| This of tok
| Call of expr * argument comma_list paren
| ObjGet of expr * tok * expr
| ClassGet of class_name_reference * tok * expr
| ArrayGet of expr * expr option bracket
| HashGet of expr * expr brace
| BraceIdent of expr brace
| Deref of tok * expr
| Sc of scalar
| Binary of expr * binaryOp wrap * expr
| Unary of unaryOp wrap * expr
| Assign of lvalue * tok * expr
| AssignOp of lvalue * assignOp wrap * expr
| Postfix of rw_variable * fixOp wrap
| Infix of fixOp wrap * rw_variable
| CondExpr of expr * tok * expr option * tok * expr
| AssignList of tok * list_assign comma_list paren * tok * expr
| ArrayLong of tok * array_pair comma_list paren
| ArrayShort of array_pair comma_list bracket
| Collection of name * array_pair comma_list brace
| New of tok * class_name_reference * argument comma_list paren option
| Clone of tok * expr
| AssignRef of lvalue * tok * tok * lvalue
| AssignNew of lvalue * tok * tok * tok * class_name_reference * argument comma_list paren option
| Cast of castOp wrap * expr
| CastUnset of tok * expr
| InstanceOf of expr * tok * class_name_reference
| Eval of tok * expr paren
| Lambda of lambda_def
| ShortLambda of short_lambda_def
| Exit of tok * expr option paren option
| At of tok * expr
| Print of tok * expr
| BackQuote of tok * encaps list * tok
| Include of tok * expr
| IncludeOnce of tok * expr
| Require of tok * expr
| RequireOnce of tok * expr
| Empty of tok * lvalue paren
| Isset of tok * lvalue comma_list paren
| XhpHtml of xhp_html
| Yield of tok * array_pair
| YieldBreak of tok * tok
| Await of tok * expr
| SgrepExprDots of tok
| ParenExpr of expr paren
and constant =
| Int of string wrap
| Double of string wrap
| String of string wrap
| PreProcess of cpp_directive wrap
| XdebugClass of name * class_stmt list
| XdebugResource
and fixOp = Ast_generic.incr_decr
and castOp = ptype
and xhp_attribute = xhp_attr_name * tok * xhp_attr_value
and xhp_attr_name = string wrap
and lvalue = expr
and class_name_reference = expr
and rw_variable = lvalue
and r_variable = lvalue
and w_variable = lvalue
and static_scalar = expr
and string_const_expr = expr
and stmt =
| ExprStmt of expr * tok
| EmptyStmt of tok
| Block of stmt_and_def list brace
| If of tok * expr paren * stmt * if_elseif list * if_else option
| IfColon of tok * expr paren * tok * stmt_and_def list * new_elseif list * new_else option * tok * tok
| While of tok * expr paren * colon_stmt
| Do of tok * stmt * tok * expr paren * tok
| For of tok * tok * for_expr * tok * for_expr * tok * for_expr * tok * colon_stmt
| Switch of tok * expr paren * switch_case_list
| Foreach of tok * tok * expr * tok option * tok * foreach_pattern * tok * colon_stmt
| Break of tok * expr option * tok
| Continue of tok * expr option * tok
| Return of tok * expr option * tok
| Throw of tok * expr * tok
| Try of tok * stmt_and_def list brace * catch list * finally list
| Echo of tok * expr comma_list * tok
| Globals of tok * global_var comma_list * tok
| StaticVars of tok * static_var comma_list * tok
| InlineHtml of string wrap
| Use of tok * use_filename * tok
| Unset of tok * lvalue comma_list paren * tok
| Declare of tok * declare comma_list paren * colon_stmt
| FuncDefNested of func_def
| ClassDefNested of class_def
and for_expr = expr comma_list
and foreach_pattern =
| ForeachVar of foreach_variable
| ForeachArrow of foreach_pattern * tok * foreach_pattern
| ForeachList of tok * list_assign comma_list paren
and catch = tok * (class_name * dname) paren * stmt_and_def list brace
and finally = tok * stmt_and_def list brace
and declare = ident * static_scalar_affect
and new_elseif = tok * expr paren * tok * stmt_and_def list
and new_else = tok * tok * stmt_and_def list
and stmt_and_def = stmt
and func_def = {
f_attrs : attributes option;
f_tok : tok;
f_type : function_type;
f_modifiers : modifier wrap list;
f_ref : is_ref;
f_name : ident;
f_tparams : type_params option;
f_params : parameter comma_list_dots paren;
f_return_type : (tok * tok option * hint_type) option;
f_body : stmt_and_def list brace;
}
and parameter = {
p_attrs : attributes option;
p_modifier : modifier wrap option;
p_soft_type : tok option;
p_type : hint_type option;
p_ref : is_ref;
p_name : dname;
p_default : static_scalar_affect option;
p_variadic : tok option;
}
and is_ref = tok option
and lambda_def = lexical_vars option * func_def
and lexical_vars = tok * lexical_var comma_list paren
and short_lambda_def = {
sl_modifiers : modifier wrap list;
sl_params : short_lambda_params;
sl_tok : tok option;
sl_body : short_lambda_body;
}
and short_lambda_params =
| SLSingleParam of parameter
| SLParams of parameter comma_list_dots paren
| SLParamsOmitted
and class_def = {
c_attrs : attributes option;
c_type : class_type;
c_name : ident;
c_tparams : type_params option;
c_extends : extend option;
c_implements : interface option;
c_enum_type : enum_type option;
c_body : class_stmt list brace;
}
and extend = tok * class_name
and interface = tok * class_name comma_list
and class_stmt =
| ClassConstants of tok option * tok * hint_type option * class_constant comma_list * tok
| ClassVariables of class_var_modifier * hint_type option * class_variable comma_list * tok
| Method of method_def
| XhpDecl of xhp_decl
| UseTrait of tok * class_name comma_list * (tok, trait_rule list brace) Common.either
| TraitConstraint of tok * trait_constraint_kind wrap * hint_type * tok
| ClassType of type_def
and class_constant = ident * static_scalar_affect option
and class_variable = dname * static_scalar_affect option
and method_def = func_def
and xhp_decl =
| XhpAttributesDecl of tok * xhp_attribute_decl comma_list * tok
| XhpChildrenDecl of tok * xhp_children_decl * tok
| XhpCategoriesDecl of tok * xhp_category_decl comma_list * tok
and xhp_attribute_decl =
| XhpAttrInherit of xhp_tag wrap
| XhpAttrDecl of xhp_attribute_type * xhp_attr_name * xhp_value_affect option * tok option
and xhp_value_affect = tok * static_scalar
and xhp_children_decl =
| XhpChild of xhp_tag wrap
| XhpChildCategory of xhp_tag wrap
| XhpChildAny of tok
| XhpChildEmpty of tok
| XhpChildPcdata of tok
| XhpChildSequence of xhp_children_decl * tok * xhp_children_decl
| XhpChildAlternative of xhp_children_decl * tok * xhp_children_decl
| XhpChildMul of xhp_children_decl * tok
| XhpChildOption of xhp_children_decl * tok
| XhpChildPlus of xhp_children_decl * tok
| XhpChildParen of xhp_children_decl paren
and type_def = {
t_tok : tok;
t_name : ident;
t_tparams : type_params option;
t_tconstraint : (tok * hint_type) option;
t_tokeq : tok;
t_kind : type_def_kind;
t_sc : tok;
}
and static_var = dname * static_scalar_affect option
and static_scalar_affect = tok * static_scalar
and namespace_use_rule =
| ImportNamespace of qualified_ident
| AliasNamespace of qualified_ident * tok * ident
and attribute =
| Attribute of string wrap
| AttributeWithArgs of string wrap * static_scalar comma_list paren
and attributes = attribute comma_list angle
and toplevel =
| StmtList of stmt list
| FuncDef of func_def
| ClassDef of class_def
| ConstantDef of constant_def
| TypeDef of type_def
| NamespaceDef of tok * qualified_ident * tok
| NamespaceBracketDef of tok * qualified_ident option * toplevel list brace
| NamespaceUse of tok * namespace_use_rule comma_list * tok
| NotParsedCorrectly of tok list
| FinalDef of tok
and program = toplevel list
type entity =
| FunctionE of func_def
| ClassE of class_def
| ConstantE of constant_def
| TypedefE of type_def
| StmtListE of stmt list
| MethodE of method_def
| ClassConstantE of class_constant
| ClassVariableE of class_variable * modifier list
| XhpAttrE of xhp_attribute_decl
| MiscE of tok list
type any =
| Expr of expr
| Stmt2 of stmt
| StmtAndDefs of stmt_and_def list
| Toplevel of toplevel
| Program of program
| Entity of entity
| Argument of argument
| Arguments of argument comma_list
| Parameter of parameter
| Parameters of parameter comma_list_dots paren
| Body of stmt_and_def list brace
| ClassStmt of class_stmt
| ClassConstant2 of class_constant
| ClassVariable of class_variable
| ListAssign of list_assign
| ColonStmt2 of colon_stmt
| Case2 of case
| XhpAttribute of xhp_attribute
| XhpAttrValue of xhp_attr_value
| XhpHtml2 of xhp_html
| XhpChildrenDecl2 of xhp_children_decl
| Info of tok
| InfoList of tok list
| Ident2 of ident
| Hint2 of hint_type
val noScope : unit -> Scope_code.t ref
val fakeInfo :
?next_to:(Parse_info.token_location * int) option ->
string ->
Parse_info.token_mutable
val uncomma : ('a, 'b) Common.either list -> 'a list
val uncomma_dots : ('a, 'b, 'b) Common.either3 list -> 'a list
val unargs : (argument, 'a) Common.either list -> expr list * w_variable list
val unmodifiers : class_var_modifier -> modifier list
val map_comma_list :
('a -> 'b) ->
('a, 'c) Common.either list ->
('b, 'c) Common.either list
val al_info : Parse_info.token_mutable -> Parse_info.token_mutable
val str_of_ident : ident -> string
val str_of_dname : dname -> string
val info_of_qualified_ident : qualified_ident_element list -> tok
exception TodoNamespace of tok
val str_of_name : name -> string
val str_of_name_namespace : name -> string
val str_of_class_name : hint_type -> string
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>