Skip to content

Internal documentation — Work in progress

This page has not been confirmed as accurate or approved for publication. Current documentation version: 0.1.0-internal.1.

Diagnostics

Implemented: lexical failures use parser::parse_error with source spans and focused messages. Current examples include malformed numeric literals, invalid digit separators, incomplete scientific exponents, unknown characters, unknown or malformed escapes, and unterminated strings, interpolation, or block comments.

Run the deliberate error example:

bin/sagan examples/tokenizer_error.sagan

The diagnostic identifies the invalid source region for 1e.

Planned: syntax diagnostics from the parser and semantic diagnostics for names, types, interfaces, mutation, and control flow. Their formats and recovery behavior are not defined.