package ppxx

  1. Overview
  2. Docs

Expressions

val var : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> string -> Ast_405.Parsetree.expression

Create a variable AST of the given name like "x"

val id : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> string -> Ast_405.Parsetree.expression

Create an longident AST of the given name, such as "Printf.printf".

val lident : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> Ast_405.Longident.t -> Ast_405.Parsetree.expression

Create an longident AST.

val unit : unit -> Ast_405.Parsetree.expression
val string : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> string -> Ast_405.Parsetree.expression

Create a string AST

val int : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> int -> Ast_405.Parsetree.expression

Create an int AST

val bool : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> bool -> Ast_405.Parsetree.expression

Create a bool AST

val option : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> Ast_405.Parsetree.expression option -> Ast_405.Parsetree.expression

Create Some e or None

val parse : string -> Ast_405.Parsetree.expression

Parse the given string as an expression and returns the corresponding AST

val object' : ?loc:Ast_405.Location.t -> ?attrs:Ast_405.Ast_helper.attrs -> Ast_405.Parsetree.class_field list -> Ast_405.Parsetree.expression

Create object method m1 = e1 .. method mn = en end.

val assert_false : unit -> Ast_405.Parsetree.expression

Create assert false

override's default is false

Imported from Ast_helper

val is_simple_ext : string -> Ast_405.Parsetree.expression -> bool

is_simple_ext <str> e Returns true if e is %<str>.

OCaml

Innovation. Community. Security.