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-h_program-lang/Ast_generic/index.html
Module Ast_generic
type tok = Parse_info.t
type 'a wrap = 'a * tok
type ident = string wrap
type dotted_ident = ident list
type qualifier = dotted_ident
type resolved_name =
| Local of gensym
| Param of gensym
| EnclosedVar of gensym
| Global of dotted_ident
| ImportedModule of dotted_ident
| Macro
| EnumConstant
and expr =
| L of literal
| Container of container_operator * expr list
| Tuple of expr list
| Record of field list
| Constructor of name * expr list
| Lambda of function_definition
| AnonClass of class_definition
| Nop
| Name of name * id_info
| IdSpecial of special wrap
| Call of expr * arguments
| Xml of xml
| Assign of expr * expr
| AssignOp of expr * arithmetic_operator wrap * expr
| LetPattern of pattern * expr
| ObjAccess of expr * ident
| ArrayAccess of expr * expr
| Conditional of expr * expr * expr
| MatchPattern of expr * action list
| Yield of expr
| Await of expr
| Cast of type_ * expr
| Seq of expr list
| Ref of expr
| DeRef of expr
| Ellipses of tok
| OtherExpr of other_expr_operator * any list
and special =
| This
| Super
| Self
| Parent
| Eval
| Typeof
| Instanceof
| Sizeof
| New
| Concat
| Spread
| ArithOp of arithmetic_operator
| IncrDecr of incr_decr * prefix_postfix
and xml = any list
and arguments = argument list
and other_expr_operator =
| OE_Exports
| OE_Module
| OE_Define
| OE_Arguments
| OE_NewTarget
| OE_Delete
| OE_YieldStar
| OE_Encaps
| OE_Require
| OE_UseStrict
| OE_ObjAccess_PN_Computed
| OE_Imag
| OE_Is
| OE_IsNot
| OE_In
| OE_NotIn
| OE_Invert
| OE_Slice
| OE_SliceIndex
| OE_SliceRange
| OE_CompForIf
| OE_CompFor
| OE_CompIf
| OE_CmpOps
| OE_Repr
| OE_NameOrClassType
| OE_ClassLiteral
| OE_NewQualifiedClass
| OE_GetRefLabel
| OE_ArrayInitDesignator
| OE_GccConstructor
| OE_Unpack
| OE_FieldAccessQualified
| OE_RecordWith
| OE_StmtExpr
and stmt =
| ExprStmt of expr
| DefStmt of definition
| DirectiveStmt of directive
| Block of stmt list
| If of expr * stmt * stmt
| While of expr * stmt
| DoWhile of stmt * expr
| For of for_header * stmt
| Switch of expr * case_and_body list
| Return of expr
| Continue of expr option
| Break of expr option
| Label of label * stmt
| Goto of label
| Throw of expr
| Try of stmt * catch list * finally option
| Assert of expr * expr option
| OtherStmtWithStmt of other_stmt_with_stmt_operator * expr * stmt
| OtherStmt of other_stmt_operator * any list
and finally = stmt
and label = ident
and pattern =
| PatLiteral of literal
| PatConstructor of name * pattern list
| PatRecord of field_pattern list
| PatVar of ident * id_info
| PatTuple of pattern list
| PatList of pattern list
| PatKeyVal of pattern * pattern
| PatUnderscore of tok
| PatDisj of pattern * pattern
| PatTyped of pattern * type_
| PatWhen of pattern * expr
| PatAs of pattern * ident * id_info
| OtherPat of other_pattern_operator * any list
and type_arguments = type_argument list
and attribute =
| Static
| Volatile
| Extern
| Public
| Private
| Protected
| Abstract
| Final
| Var
| Let
| Mutable
| Const
| Generator
| Async
| Recursive
| MutuallyRecursive
| Ctor
| Dtor
| Getter
| Setter
| Variadic
| NamedAttr of ident * any list
| OtherAttribute of other_attribute_operator * any list
and definition = entity * definition_kind
and entity = {
name : ident;
attrs : attribute list;
type_ : type_ option;
tparams : type_parameter list;
info : id_info;
}
and definition_kind =
| FuncDef of function_definition
| VarDef of variable_definition
| TypeDef of type_definition
| ClassDef of class_definition
| ModuleDef of module_definition
| MacroDef of macro_definition
| Signature of type_
and type_parameter = ident * type_parameter_constraints
and type_parameter_constraints = type_parameter_constraint list
and parameters = parameter list
and parameter =
| ParamClassic of parameter_classic
| ParamPattern of pattern
| OtherParam of other_parameter_operator * any list
and type_definition_kind =
| OrType of or_type_element list
| AndType of field list
| AliasType of type_
| Exception of ident * type_ list
| OtherTypeKind of other_type_kind_operator * any list
and field =
| FieldVar of entity * variable_definition
| FieldMethod of entity * function_definition
| FieldDynamic of expr * attribute list * expr
| FieldSpread of expr
| FieldStmt of stmt
and class_definition = {
ckind : class_kind;
cextends : type_ list;
cimplements : type_ list;
cbody : field list;
}
and module_definition_kind =
| ModuleAlias of name
| ModuleStruct of dotted_ident option * item list
| OtherModule of other_module_operator * any list
and directive =
| ImportFrom of module_name * alias list
| ImportAs of module_name * ident option
| OtherDirective of other_directive_operator * any list
and program = item list
exception Error of string * Parse_info.t
val error : Parse_info.t -> string -> 'a
val gensym_counter : int ref
val empty_name_info : name_info
val empty_id_info : unit -> id_info
val basic_param : ident -> parameter_classic
val empty_var : unit -> variable_definition
val entity_to_param : entity -> parameter_classic
val opt_to_name : (string * Parse_info.t) option -> string * Parse_info.t
val is_boolean_operator : arithmetic_operator -> bool
val vardef_to_assign :
(entity * variable_definition) ->
resolved_name option ->
expr
val funcdef_to_lambda :
(entity * function_definition) ->
resolved_name option ->
expr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>