WplAi.Errors.ParseError (WPL-AI v1.6.7)

Copy Markdown View Source

Error during parsing

Summary

Types

error_type()

@type error_type() ::
  :unexpected_token
  | :unexpected_eof
  | :missing_required
  | :invalid_value
  | :invalid_keyword
  | :duplicate_section
  | :invalid_structure
  | :unknown_exercise_ref

t()

@type t() :: %WplAi.Errors.ParseError{
  expected: [String.t()] | nil,
  got: String.t() | nil,
  location: WplAi.Errors.Location.t() | nil,
  message: String.t(),
  suggestions: [String.t()] | nil,
  type: error_type()
}

Functions

duplicate_section(section, location)

invalid_keyword(keyword, context, location, valid_keywords)

invalid_structure(message, location)

invalid_value(field, value, valid_values, location)

missing_required(field, section, location)

new(type, message, opts \\ [])

unexpected_eof(expected)

unexpected_token(expected, got, location)

unknown_exercise_ref(ref, location, suggestions \\ [])