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 name = string wrap
type dotted_name = name list
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. | Bool of bool wrap
  4. | None_ of tok
  5. | Name of name * expr_context * resolved_name ref
  6. | Tuple of expr list_or_comprehension * expr_context
  7. | List of expr list_or_comprehension * expr_context
  8. | DictOrSet of dictorset_elt list_or_comprehension
  9. | ExprStar of expr
  10. | InterpolatedString of interpolated list
  11. | TypedExpr of expr * type_
  12. | Ellipses of tok
  13. | BoolOp of boolop wrap * expr list
  14. | BinOp of expr * operator wrap * expr
  15. | UnaryOp of unaryop wrap * expr
  16. | Compare of expr * cmpop wrap list * expr list
  17. | Call of expr * argument list
  18. | Subscript of expr * slice list * expr_context
  19. | Lambda of parameters * expr
  20. | IfExp of expr * expr * expr
  21. | Yield of expr option
  22. | Await of expr
  23. | Repr of expr
  24. | Attribute of expr * 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
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
  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. | ParamPow of name * type_ option
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 * expr
  3. | AugAssign of expr * operator wrap * expr
  4. | For of pattern * expr * stmt list * stmt list
  5. | While of expr * stmt list * stmt list
  6. | If of expr * stmt list * stmt list
  7. | With of expr * expr option * stmt list
  8. | Return of expr option
  9. | Break
  10. | Continue
  11. | Pass
  12. | Raise of (expr * expr option) option
  13. | TryExcept of stmt list * excepthandler list * stmt list
  14. | TryFinally of stmt list * stmt list
  15. | Assert of expr * expr option
  16. | Global of name list
  17. | Delete of expr list
  18. | NonLocal of name list
  19. | Async of stmt
  20. | Import of alias_dotted list
  21. | ImportFrom of dotted_name * alias list * int option
  22. | FunctionDef of name * parameters * type_ option * stmt list * decorator list
  23. | ClassDef of name * type_parent list * stmt list * decorator list
and excepthandler =
  1. | ExceptHandler of type_ option * expr option * stmt list
and decorator = expr
and alias = name * name option
and alias_dotted = dotted_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.