package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tok = Parse_info.info
type 'a wrap = 'a * tok
type name = 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. | And
  26. | Or
  27. | Not
  28. | BitNot
  29. | BitAnd
  30. | BitOr
  31. | BitXor
  32. | Lsr
  33. | Asr
  34. | Lsl
  35. | Equal
  36. | PhysEqual
  37. | Lower
  38. | Greater
  39. | Plus
  40. | Minus
  41. | Mul
  42. | Div
  43. | Mod
  44. | Expo
  45. | 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 * expr
  9. | Obj of obj_
  10. | Class of class_ * name option
  11. | ObjAccess of expr * property_name
  12. | Arr of expr list
  13. | ArrAccess of expr * expr
  14. | Fun of fun_ * name option
  15. | Apply of expr * expr list
  16. | Conditional of expr * expr * expr
and stmt =
  1. | VarDecl of var
  2. | Block of stmt list
  3. | ExprStmt of expr
  4. | If of expr * stmt * stmt
  5. | Do of stmt * expr
  6. | While of expr * stmt
  7. | For of for_header * stmt
  8. | Switch of expr * case list
  9. | Continue of label option
  10. | Break of label option
  11. | Return of expr
  12. | Label of label * stmt
  13. | Throw of expr
  14. | Try of stmt * catch option * stmt option
and for_header =
  1. | ForClassic of vars_or_expr * expr * expr
  2. | ForIn of var_or_expr * expr
and vars_or_expr = (var list, expr) Common.either
and var_or_expr = (var, expr) Common.either
and case =
  1. | Case of expr * stmt
  2. | Default of stmt
and catch = name * stmt
and var = {
  1. v_name : name;
  2. v_kind : var_kind;
  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 list;
  2. f_params : parameter list;
  3. f_body : stmt;
}
and parameter = {
  1. p_name : name;
  2. p_default : expr option;
  3. p_dots : bool;
}
and fun_prop =
  1. | Generator
  2. | Async
  3. | Get
  4. | Set
and obj_ = property list
and class_ = {
  1. c_extends : expr option;
  2. c_body : property list;
}
and property =
  1. | Field of property_name * property_prop list * expr
  2. | FieldSpread of expr
and property_prop =
  1. | Static
  2. | Public
  3. | Private
  4. | Protected
type module_directive =
  1. | Import of name * name * filename
  2. | Export of name
  3. | ModuleAlias of name * filename
  4. | ImportCss of filename
  5. | ImportEffect of 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. | Top of toplevel
  4. | Program of program
val str_of_name : ('a * 'b) -> 'a
val tok_of_name : ('a * 'b) -> 'b
val unwrap : ('a * 'b) -> 'a
OCaml

Innovation. Community. Security.