shiny_wheat

Types

Error type used by this module.

pub type Error {
  ParseError(lineno: Int, message: String)
}

Constructors

  • ParseError(lineno: Int, message: String)

Values

pub fn main() -> Nil
pub fn parse_program(
  text: String,
) -> Result(yielder.Yielder(String), List(Error))

Parse the program text into an interpreter that yields output.

pub fn run_collecting(
  interpreter: yielder.Yielder(String),
  cycles: Int,
) -> String

Run the Wheat interpreter, collecting all output into a string. If cycles is non-negative, it is the number of cycles to run before terminating.

pub fn run_printing(
  interpreter: yielder.Yielder(String),
  cycles: Int,
) -> Nil

Run the Wheat interpreter, printing all output to stdout. If cycles is non-negative, it is the number of cycles to run before terminating.

Search Document