OxL Reference

error invalid-char

error Standard: [§1.6]

What it means#

The lexer met a character that cannot start any token: it is not whitespace, not part of an identifier (§1.3), not a literal (§1.5), and not one of the operators and delimiters listed in §1.6. Stray symbols such as $ or a control character are typical causes.

Example#

oxl✓ checked in CI
fn main() {
  let price = $5      // <- invalid-char
}
error
invalid-char

How to fix#

oxl✓ checked in CI
fn main() {
  let price = 5
}

Remove the character or replace it with the intended operator, identifier or literal. A keyword can be used as an identifier through the r# prefix (§1.3), but $ cannot.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides