Add documentation for pascaligo parser interface as .mli

This commit is contained in:
John David Pressman 2019-10-03 13:32:43 -07:00
parent e3c581ff02
commit 51e6c441f2

View File

@ -0,0 +1,21 @@
(* This file provides an interface to the PascaLIGO parser. *)
open Trace
module Parser = Parser_pascaligo.Parser
module AST = Parser_pascaligo.AST
module ParserLog = Parser_pascaligo.ParserLog
module LexToken = Parser_pascaligo.LexToken
(** Open a PascaLIGO filename given by string and convert into an abstract syntax tree. *)
val parse_file : string -> (AST.t result)
(** Convert a given string into a PascaLIGO abstract syntax tree *)
val parse_string : string -> AST.t result
(** Parse a given string as a PascaLIGO expression and return an expression AST.
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 result