handles/parser

Types

pub type AST {
  Constant(value: String)
  Property(path: List(String))
  Block(kind: String, path: List(String), children: List(AST))
}

Constructors

  • Constant(value: String)
  • Property(path: List(String))
  • Block(kind: String, path: List(String), children: List(AST))
pub type ParseError {
  UnbalancedBlock(start: Int, end: Int, kind: String)
  UnknownBlockKind(start: Int, end: Int, kind: String)
}

Constructors

  • UnbalancedBlock(start: Int, end: Int, kind: String)
  • UnknownBlockKind(start: Int, end: Int, kind: String)

Functions

pub fn run(
  tokens: List(Token),
  valid_blocks: List(String),
) -> Result(List(AST), List(ParseError))
Search Document