syntax

Module unescape

Expand description

Utilities for validating string and char literals and turning them into values they represent.

Enums§

  • Errors and warnings that can occur during string unescaping. They mostly relate to malformed escape sequences, but there are a few that are about other problems.
  • Used for mixed utf8 string literals, i.e. those that allow both unicode chars and high bytes.
  • What kind of literal do we parse.

Functions§

  • Takes a contents of a byte literal (without quotes), and returns an unescaped byte or an error.
  • Takes a contents of a char literal (without quotes), and returns an unescaped char or an error.
  • Takes the contents of a mixed-utf8 literal (without quotes) and produces a sequence of escaped characters or errors.
  • Takes the contents of a unicode-only (non-mixed-utf8) literal (without quotes) and produces a sequence of escaped characters or errors.