Module Concrete.Statement

See TaglessFinal.Statement.

type t = private
| FunctionDef of {
location : Location.t;
name : Identifier.t;
args : Arguments.t;
body : t list;
decorator_list : Expression.t list;
returns : Expression.t option;
type_comment : string option;
}
| AsyncFunctionDef of {
location : Location.t;
name : Identifier.t;
args : Arguments.t;
body : t list;
decorator_list : Expression.t list;
returns : Expression.t option;
type_comment : string option;
}
| ClassDef of {
location : Location.t;
name : Identifier.t;
bases : Expression.t list;
keywords : Keyword.t list;
body : t list;
decorator_list : Expression.t list;
}
| Return of {
location : Location.t;
value : Expression.t option;
}
| Delete of {
location : Location.t;
targets : Expression.t list;
}
| Assign of {
location : Location.t;
targets : Expression.t list;
value : Expression.t;
type_comment : string option;
}
| AugAssign of {
location : Location.t;
target : Expression.t;
op : BinaryOperator.t;
value : Expression.t;
}
| AnnAssign of {
location : Location.t;
target : Expression.t;
annotation : Expression.t;
value : Expression.t option;
simple : bool;
}
| For of {
location : Location.t;
target : Expression.t;
iter : Expression.t;
body : t list;
orelse : t list;
type_comment : string option;
}
| AsyncFor of {
location : Location.t;
target : Expression.t;
iter : Expression.t;
body : t list;
orelse : t list;
type_comment : string option;
}
| While of {
location : Location.t;
test : Expression.t;
body : t list;
orelse : t list;
}
| If of {
location : Location.t;
test : Expression.t;
body : t list;
orelse : t list;
}
| With of {
location : Location.t;
items : WithItem.t list;
body : t list;
type_comment : string option;
}
| AsyncWith of {
location : Location.t;
items : WithItem.t list;
body : t list;
type_comment : string option;
}
| Match of {
location : Location.t;
subject : Expression.t;
cases : MatchCase.t list;
}
| Raise of {
location : Location.t;
exc : Expression.t option;
cause : Expression.t option;
}
| Try of {
location : Location.t;
body : t list;
handlers : ExceptionHandler.t list;
orelse : t list;
finalbody : t list;
}
| Assert of {
location : Location.t;
test : Expression.t;
msg : Expression.t option;
}
| Import of {
location : Location.t;
names : ImportAlias.t list;
}
| ImportFrom of {
location : Location.t;
module_ : Identifier.t option;
names : ImportAlias.t list;
level : int;
}
| Global of {
location : Location.t;
names : Identifier.t list;
}
| Nonlocal of {
location : Location.t;
names : Identifier.t list;
}
| Expr of {
location : Location.t;
value : Expression.t;
}
| Pass of {
location : Location.t;
}
| Break of {
location : Location.t;
}
| Continue of {
location : Location.t;
}
include Ppx_sexp_conv_lib.Sexpable.S with type Statement.t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val compare : t -> t -> int
val hash_fold_t : Ppx_hash_lib.Std.Hash.state -> t -> Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val make_functiondef_of_t : location:Location.t -> name:Identifier.t -> args:Arguments.t -> ?⁠body:t list -> ?⁠decorator_list:Expression.t list -> ?⁠returns:Expression.t -> ?⁠type_comment:string -> unit -> t
val make_asyncfunctiondef_of_t : location:Location.t -> name:Identifier.t -> args:Arguments.t -> ?⁠body:t list -> ?⁠decorator_list:Expression.t list -> ?⁠returns:Expression.t -> ?⁠type_comment:string -> unit -> t
val make_classdef_of_t : location:Location.t -> name:Identifier.t -> ?⁠bases:Expression.t list -> ?⁠keywords:Keyword.t list -> ?⁠body:t list -> ?⁠decorator_list:Expression.t list -> unit -> t
val make_return_of_t : location:Location.t -> ?⁠value:Expression.t -> unit -> t
val make_delete_of_t : location:Location.t -> ?⁠targets:Expression.t list -> unit -> t
val make_assign_of_t : location:Location.t -> ?⁠targets:Expression.t list -> value:Expression.t -> ?⁠type_comment:string -> unit -> t
val make_augassign_of_t : location:Location.t -> target:Expression.t -> op:BinaryOperator.t -> value:Expression.t -> unit -> t
val make_annassign_of_t : location:Location.t -> target:Expression.t -> annotation:Expression.t -> ?⁠value:Expression.t -> simple:bool -> unit -> t
val make_for_of_t : location:Location.t -> target:Expression.t -> iter:Expression.t -> ?⁠body:t list -> ?⁠orelse:t list -> ?⁠type_comment:string -> unit -> t
val make_asyncfor_of_t : location:Location.t -> target:Expression.t -> iter:Expression.t -> ?⁠body:t list -> ?⁠orelse:t list -> ?⁠type_comment:string -> unit -> t
val make_while_of_t : location:Location.t -> test:Expression.t -> ?⁠body:t list -> ?⁠orelse:t list -> unit -> t
val make_if_of_t : location:Location.t -> test:Expression.t -> ?⁠body:t list -> ?⁠orelse:t list -> unit -> t
val make_with_of_t : location:Location.t -> ?⁠items:WithItem.t list -> ?⁠body:t list -> ?⁠type_comment:string -> unit -> t
val make_asyncwith_of_t : location:Location.t -> ?⁠items:WithItem.t list -> ?⁠body:t list -> ?⁠type_comment:string -> unit -> t
val make_match_of_t : location:Location.t -> subject:Expression.t -> ?⁠cases:MatchCase.t list -> unit -> t
val make_raise_of_t : location:Location.t -> ?⁠exc:Expression.t -> ?⁠cause:Expression.t -> unit -> t
val make_try_of_t : location:Location.t -> ?⁠body:t list -> ?⁠handlers:ExceptionHandler.t list -> ?⁠orelse:t list -> ?⁠finalbody:t list -> unit -> t
val make_assert_of_t : location:Location.t -> test:Expression.t -> ?⁠msg:Expression.t -> unit -> t
val make_import_of_t : location:Location.t -> ?⁠names:ImportAlias.t list -> unit -> t
val make_importfrom_of_t : location:Location.t -> ?⁠module_:Identifier.t -> ?⁠names:ImportAlias.t list -> level:int -> unit -> t
val make_global_of_t : location:Location.t -> ?⁠names:Identifier.t list -> unit -> t
val make_nonlocal_of_t : location:Location.t -> ?⁠names:Identifier.t list -> unit -> t
val make_expr_of_t : location:Location.t -> value:Expression.t -> unit -> t
val make_pass_of_t : location:Location.t -> unit -> t
val make_break_of_t : location:Location.t -> unit -> t
val make_continue_of_t : location:Location.t -> unit -> t