Bf.ParseError exception (bf v2.1.0)

Copy Markdown View Source

Returned by Bf.parse/1 and raised by Bf.parse!/1 when a program's brackets don't match.

reason is :unmatched_open for a [ without a matching ], and :unmatched_close for a ] without a matching [. line and column point at that bracket. Both start at 1, and columns count graphemes.

Summary

Types

t()

@type t() :: %Bf.ParseError{
  __exception__: term(),
  column: pos_integer(),
  line: pos_integer(),
  reason: :unmatched_open | :unmatched_close
}