package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tok = Parse_info.t
type 'a wrap = 'a * tok
type 'a bracket = tok * 'a * tok
type name = string wrap
type ident = string wrap
type qualified_name = string
type resolved_name =
  1. | Local
  2. | Param
  3. | Global of qualified_name
  4. | NotResolved
type special =
  1. | Null
  2. | Undefined
  3. | This
  4. | Super
  5. | Exports
  6. | Module
  7. | Define
  8. | Arguments
  9. | New
  10. | NewTarget
  11. | Eval
  12. | Seq
  13. | Void
  14. | Typeof
  15. | Instanceof
  16. | In
  17. | Delete
  18. | Spread
  19. | Yield
  20. | YieldStar
  21. | Await
  22. | Encaps of name option
  23. | Require
  24. | UseStrict
  25. | ArithOp of Ast_generic.arithmetic_operator
  26. | IncrDecr of Ast_generic.incr_decr * Ast_generic.prefix_postfix
type label = string wrap
type filename = string wrap
val default_entity : string
type property_name =
  1. | PN of name
  2. | PN_Computed of expr
and expr =
  1. | Bool of bool wrap
  2. | Num of string wrap
  3. | String of string wrap
  4. | Regexp of string wrap
  5. | Id of name * resolved_name ref
  6. | IdSpecial of special wrap
  7. | Nop
  8. | Assign of expr * tok * expr
  9. | Obj of obj_
  10. | Class of class_ * name option
  11. | ObjAccess of expr * tok * property_name
  12. | Arr of expr list bracket
  13. | ArrAccess of expr * expr
  14. | Fun of fun_ * name option
  15. | Apply of expr * expr list
  16. | Xml of xml
  17. | Conditional of expr * expr * expr
  18. | Ellipsis of tok
and xml = {
  1. xml_tag : ident;
  2. xml_attrs : (ident * xml_attr_value) list;
  3. xml_body : xml_body list;
}
and xml_attr_value = expr
and xml_body =
  1. | XmlText of string wrap
  2. | XmlExpr of expr
  3. | XmlXml of xml
and stmt =
  1. | VarDecl of var
  2. | Block of stmt list
  3. | ExprStmt of expr
  4. | If of tok * expr * stmt * stmt
  5. | Do of tok * stmt * expr
  6. | While of tok * expr * stmt
  7. | For of tok * for_header * stmt
  8. | Switch of tok * expr * case list
  9. | Continue of tok * label option
  10. | Break of tok * label option
  11. | Return of tok * expr
  12. | Label of label * stmt
  13. | Throw of tok * expr
  14. | Try of tok * stmt * catch option * (tok * stmt) option
and for_header =
  1. | ForClassic of vars_or_expr * expr * expr
  2. | ForIn of var_or_expr * tok * expr
and vars_or_expr = (var list, expr) Common.either
and var_or_expr = (var, expr) Common.either
and case =
  1. | Case of tok * expr * stmt
  2. | Default of tok * stmt
and catch = tok * name * stmt
and var = {
  1. v_name : name;
  2. v_kind : var_kind wrap;
  3. v_init : expr;
  4. v_resolved : resolved_name ref;
}
and var_kind =
  1. | Var
  2. | Let
  3. | Const
and fun_ = {
  1. f_props : fun_prop wrap list;
  2. f_params : parameter_binding list;
  3. f_body : stmt;
}
and parameter_binding =
  1. | ParamClassic of parameter
  2. | ParamEllipsis of tok
and parameter = {
  1. p_name : name;
  2. p_default : expr option;
  3. p_dots : tok option;
}
and fun_prop =
  1. | Generator
  2. | Async
  3. | Get
  4. | Set
and obj_ = property list bracket
and class_ = {
  1. c_extends : expr option;
  2. c_body : property list bracket;
}
and property =
  1. | Field of property_name * property_prop wrap list * expr
  2. | FieldSpread of tok * expr
  3. | FieldEllipsis of tok
and property_prop =
  1. | Static
  2. | Public
  3. | Private
  4. | Protected
type module_directive =
  1. | Import of tok * name * name option * filename
  2. | Export of name
  3. | ModuleAlias of tok * name * filename
  4. | ImportCss of filename
  5. | ImportEffect of tok * filename
type toplevel =
  1. | V of var
  2. | S of tok * stmt
  3. | M of module_directive
type program = toplevel list
type any =
  1. | Expr of expr
  2. | Stmt of stmt
  3. | Item of toplevel
  4. | Items of toplevel list
  5. | Program of program
val str_of_name : ('a * 'b) -> 'a
val tok_of_name : ('a * 'b) -> 'b
val unwrap : ('a * 'b) -> 'a
val string_of_xhp_tag : 'a -> 'a
OCaml

Innovation. Community. Security.