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 dotted_name = name list
type module_name = dotted_name * tok list option
type resolved_name =
  1. | LocalVar
  2. | Parameter
  3. | GlobalVar
  4. | ClassField
  5. | ImportedModule of dotted_name
  6. | ImportedEntity of dotted_name
  7. | NotResolved
type expr =
  1. | Num of number
  2. | Str of string wrap
  3. | EncodedStr of string wrap * string
  4. | Bool of bool wrap
  5. | None_ of tok
  6. | Name of name * expr_context * resolved_name ref
  7. | Tuple of expr list_or_comprehension * expr_context
  8. | List of expr list_or_comprehension * expr_context
  9. | DictOrSet of dictorset_elt list_or_comprehension
  10. | ExprStar of expr
  11. | InterpolatedString of interpolated list
  12. | TypedExpr of expr * type_
  13. | Ellipsis of tok
  14. | TypedMetavar of name * tok * type_
  15. | BoolOp of boolop wrap * expr list
  16. | BinOp of expr * operator wrap * expr
  17. | UnaryOp of unaryop wrap * expr
  18. | Compare of expr * cmpop wrap list * expr list
  19. | Call of expr * argument list
  20. | Subscript of expr * slice list * expr_context
  21. | Lambda of parameters * expr
  22. | IfExp of expr * expr * expr
  23. | Yield of tok * expr option * bool
  24. | Await of tok * expr
  25. | Repr of expr bracket
  26. | Attribute of expr * tok * name * expr_context
and number =
  1. | Int of string wrap
  2. | LongInt of string wrap
  3. | Float of string wrap
  4. | Imag of string wrap
and boolop =
  1. | And
  2. | Or
and operator =
  1. | Add
  2. | Sub
  3. | Mult
  4. | Div
  5. | Mod
  6. | Pow
  7. | FloorDiv
  8. | LShift
  9. | RShift
  10. | BitOr
  11. | BitXor
  12. | BitAnd
  13. | MatMult
and unaryop =
  1. | Invert
  2. | Not
  3. | UAdd
  4. | USub
and cmpop =
  1. | Eq
  2. | NotEq
  3. | Lt
  4. | LtE
  5. | Gt
  6. | GtE
  7. | Is
  8. | IsNot
  9. | In
  10. | NotIn
and interpolated = expr
and 'a list_or_comprehension =
  1. | CompList of 'a list bracket
  2. | CompForIf of 'a comprehension
and 'a comprehension = 'a * for_if list
and for_if =
  1. | CompFor of expr * expr
  2. | CompIf of expr
and dictorset_elt =
  1. | KeyVal of expr * expr
  2. | Key of expr
  3. | PowInline of expr
and expr_context =
  1. | Load
  2. | Store
  3. | Del
  4. | AugLoad
  5. | AugStore
  6. | Param
and slice =
  1. | Slice of expr option * expr option * expr option
  2. | Index of expr
and parameters = parameter list
and parameter =
  1. | ParamClassic of name * type_ option * expr option
  2. | ParamStar of name * type_ option
  3. | ParamSingleStar of tok
  4. | ParamPow of name * type_ option
  5. | ParamEllipsis of tok
and argument =
  1. | Arg of expr
  2. | ArgKwd of name * expr
  3. | ArgStar of expr
  4. | ArgPow of expr
  5. | ArgComp of expr * for_if list
and type_ = expr
and type_parent = argument
type pattern = expr
type stmt =
  1. | ExprStmt of expr
  2. | Assign of expr list * tok * expr
  3. | AugAssign of expr * operator wrap * expr
  4. | For of tok * pattern * tok * expr * stmt list * stmt list
  5. | While of tok * expr * stmt list * stmt list
  6. | If of tok * expr * stmt list * stmt list
  7. | With of tok * expr * expr option * stmt list
  8. | Return of tok * expr option
  9. | Break of tok
  10. | Continue of tok
  11. | Pass of tok
  12. | Raise of tok * (expr * expr option) option
  13. | TryExcept of tok * stmt list * excepthandler list * stmt list
  14. | TryFinally of tok * stmt list * tok * stmt list
  15. | Assert of tok * expr * expr option
  16. | Global of tok * name list
  17. | Delete of tok * expr list
  18. | NonLocal of tok * name list
  19. | Print of tok * expr option * expr list * bool
  20. | Exec of tok * expr * expr option * expr option
  21. | Async of tok * stmt
  22. | ImportAs of tok * module_name * name option
  23. | ImportAll of tok * module_name * tok
  24. | ImportFrom of tok * module_name * alias list
  25. | FunctionDef of name * parameters * type_ option * stmt list * decorator list
  26. | ClassDef of name * type_parent list * stmt list * decorator list
and excepthandler =
  1. | ExceptHandler of tok * pattern option * name option * stmt list
and decorator = expr
and alias = name * name option
type program = stmt list
type any =
  1. | Expr of expr
  2. | Stmt of stmt
  3. | Stmts of stmt list
  4. | Program of program
  5. | DictElem of dictorset_elt
val str_of_name : ('a * 'b) -> 'a
val context_of_expr : expr -> expr_context option
OCaml

Innovation. Community. Security.