CfParser.describeLexerError

private string describeLexerError(Token tok) static @safe pure

Builds a lexer diagnostic for an ERROR token.

Some ERROR-token values are ready-made diagnostics (BOM, single-line triple-quoted strings); the rest carry the offending source text.

Parameters

tokThe ERROR token

Returns

A message describing the lexical error.