2020-01-14 01:27:35 +01:00
|
|
|
(** This file provides an interface to the PascaLIGO parser. *)
|
2019-10-03 13:32:43 -07:00
|
|
|
|
|
|
|
module AST = Parser_pascaligo.AST
|
|
|
|
|
2020-01-14 01:27:35 +01:00
|
|
|
(** Open a PascaLIGO filename given by string and convert into an
|
|
|
|
abstract syntax tree. *)
|
|
|
|
val parse_file : string -> AST.t Trace.result
|
2019-10-03 13:32:43 -07:00
|
|
|
|
|
|
|
(** Convert a given string into a PascaLIGO abstract syntax tree *)
|
2020-01-14 01:27:35 +01:00
|
|
|
val parse_string : string -> AST.t Trace.result
|
2019-10-03 13:32:43 -07:00
|
|
|
|
2020-01-14 01:27:35 +01:00
|
|
|
(** Parse a given string as a PascaLIGO expression and return an
|
|
|
|
expression AST.
|
2019-10-03 13:32:43 -07:00
|
|
|
|
2020-01-14 01:27:35 +01:00
|
|
|
This is intended to be used for interactive interpreters, or other
|
|
|
|
scenarios where you would want to parse a PascaLIGO expression
|
|
|
|
outside of a contract. *)
|
|
|
|
val parse_expression : string -> AST.expr Trace.result
|