OxL Справочник OxL
РусскийEnglish

error invalid-char

error Стандарт: [§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✓ проверяется в CI
fn main() {
  let price = $5      // <- invalid-char
}
error
invalid-char

How to fix#

oxl✓ проверяется в 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 · Версия документации 1.0.0-beta© OxwaldLink · сгенерировано из Стандарта, исходников std и руководства