package pyre-ast

  1. Overview
  2. Docs

See TaglessFinal.Expression.

type t = private
  1. | BoolOp of {
    1. location : Location.t;
    2. op : BooleanOperator.t;
    3. values : t list;
    }
  2. | NamedExpr of {
    1. location : Location.t;
    2. target : t;
    3. value : t;
    }
  3. | BinOp of {
    1. location : Location.t;
    2. left : t;
    3. op : BinaryOperator.t;
    4. right : t;
    }
  4. | UnaryOp of {
    1. location : Location.t;
    2. op : UnaryOperator.t;
    3. operand : t;
    }
  5. | Lambda of {
    1. location : Location.t;
    2. args : Arguments.t;
    3. body : t;
    }
  6. | IfExp of {
    1. location : Location.t;
    2. test : t;
    3. body : t;
    4. orelse : t;
    }
  7. | Dict of {
    1. location : Location.t;
    2. keys : t option list;
    3. values : t list;
    }
  8. | Set of {
    1. location : Location.t;
    2. elts : t list;
    }
  9. | ListComp of {
    1. location : Location.t;
    2. elt : t;
    3. generators : Comprehension.t list;
    }
  10. | SetComp of {
    1. location : Location.t;
    2. elt : t;
    3. generators : Comprehension.t list;
    }
  11. | DictComp of {
    1. location : Location.t;
    2. key : t;
    3. value : t;
    4. generators : Comprehension.t list;
    }
  12. | GeneratorExp of {
    1. location : Location.t;
    2. elt : t;
    3. generators : Comprehension.t list;
    }
  13. | Await of {
    1. location : Location.t;
    2. value : t;
    }
  14. | Yield of {
    1. location : Location.t;
    2. value : t option;
    }
  15. | YieldFrom of {
    1. location : Location.t;
    2. value : t;
    }
  16. | Compare of {
    1. location : Location.t;
    2. left : t;
    3. ops : ComparisonOperator.t list;
    4. comparators : t list;
    }
  17. | Call of {
    1. location : Location.t;
    2. func : t;
    3. args : t list;
    4. keywords : Keyword.t list;
    }
  18. | FormattedValue of {
    1. location : Location.t;
    2. value : t;
    3. conversion : int;
    4. format_spec : t option;
    }
  19. | JoinedStr of {
    1. location : Location.t;
    2. values : t list;
    }
  20. | Constant of {
    1. location : Location.t;
    2. value : Constant.t;
    3. kind : string option;
    }
  21. | Attribute of {
    1. location : Location.t;
    2. value : t;
    3. attr : Identifier.t;
    4. ctx : ExpressionContext.t;
    }
  22. | Subscript of {
    1. location : Location.t;
    2. value : t;
    3. slice : t;
    4. ctx : ExpressionContext.t;
    }
  23. | Starred of {
    1. location : Location.t;
    2. value : t;
    3. ctx : ExpressionContext.t;
    }
  24. | Name of {
    1. location : Location.t;
    2. id : Identifier.t;
    3. ctx : ExpressionContext.t;
    }
  25. | List of {
    1. location : Location.t;
    2. elts : t list;
    3. ctx : ExpressionContext.t;
    }
  26. | Tuple of {
    1. location : Location.t;
    2. elts : t list;
    3. ctx : ExpressionContext.t;
    }
  27. | Slice of {
    1. location : Location.t;
    2. lower : t option;
    3. upper : t option;
    4. step : t option;
    }
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t -> t -> int
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : Base.Hash.state -> t -> Base.Hash.state
val hash : t -> Base.Hash.hash_value
val make_boolop_of_t : location:Location.t -> op:BooleanOperator.t -> ?values:t list -> unit -> t
val make_namedexpr_of_t : location:Location.t -> target:t -> value:t -> unit -> t
val make_binop_of_t : location:Location.t -> left:t -> op:BinaryOperator.t -> right:t -> unit -> t
val make_unaryop_of_t : location:Location.t -> op:UnaryOperator.t -> operand:t -> unit -> t
val make_lambda_of_t : location:Location.t -> args:Arguments.t -> body:t -> unit -> t
val make_ifexp_of_t : location:Location.t -> test:t -> body:t -> orelse:t -> unit -> t
val make_dict_of_t : location:Location.t -> ?keys:t option list -> ?values:t list -> unit -> t
val make_set_of_t : location:Location.t -> ?elts:t list -> unit -> t
val make_listcomp_of_t : location:Location.t -> elt:t -> ?generators:Comprehension.t list -> unit -> t
val make_setcomp_of_t : location:Location.t -> elt:t -> ?generators:Comprehension.t list -> unit -> t
val make_dictcomp_of_t : location:Location.t -> key:t -> value:t -> ?generators:Comprehension.t list -> unit -> t
val make_generatorexp_of_t : location:Location.t -> elt:t -> ?generators:Comprehension.t list -> unit -> t
val make_await_of_t : location:Location.t -> value:t -> unit -> t
val make_yield_of_t : location:Location.t -> ?value:t -> unit -> t
val make_yieldfrom_of_t : location:Location.t -> value:t -> unit -> t
val make_compare_of_t : location:Location.t -> left:t -> ?ops:ComparisonOperator.t list -> ?comparators:t list -> unit -> t
val make_call_of_t : location:Location.t -> func:t -> ?args:t list -> ?keywords:Keyword.t list -> unit -> t
val make_formattedvalue_of_t : location:Location.t -> value:t -> conversion:int -> ?format_spec:t -> unit -> t
val make_joinedstr_of_t : location:Location.t -> ?values:t list -> unit -> t
val make_constant_of_t : location:Location.t -> value:Constant.t -> ?kind:string -> unit -> t
val make_attribute_of_t : location:Location.t -> value:t -> attr:Identifier.t -> ctx:ExpressionContext.t -> unit -> t
val make_subscript_of_t : location:Location.t -> value:t -> slice:t -> ctx:ExpressionContext.t -> unit -> t
val make_starred_of_t : location:Location.t -> value:t -> ctx:ExpressionContext.t -> unit -> t
val make_name_of_t : location:Location.t -> id:Identifier.t -> ctx:ExpressionContext.t -> unit -> t
val make_list_of_t : location:Location.t -> ?elts:t list -> ctx:ExpressionContext.t -> unit -> t
val make_tuple_of_t : location:Location.t -> ?elts:t list -> ctx:ExpressionContext.t -> unit -> t
val make_slice_of_t : location:Location.t -> ?lower:t -> ?upper:t -> ?step:t -> unit -> t
OCaml

Innovation. Community. Security.