gleamunison/parser
Types
pub type SExpr {
SAtom(lexer.Token, line: Int, col: Int)
SListExpr(List(SExpr), line: Int, col: Int)
}
Constructors
-
SAtom(lexer.Token, line: Int, col: Int) -
SListExpr(List(SExpr), line: Int, col: Int)
Values
pub fn drop_comments(
tokens: List(lexer.TokenInfo),
) -> List(lexer.TokenInfo)
Strip comment tokens from a token stream. The formatter is the one consumer that keeps them; every grammar path treats them as whitespace.
pub fn parse_sexpr(
tokens: List(lexer.TokenInfo),
) -> Result(#(SExpr, List(lexer.TokenInfo)), lexer.ParseError)
pub fn parse_string(
input: String,
) -> Result(elab_types.SurfaceTerm, lexer.ParseError)
pub fn sexpr_to_term(
sexpr: SExpr,
) -> Result(elab_types.SurfaceTerm, lexer.ParseError)