-
-
Notifications
You must be signed in to change notification settings - Fork 0
Diagnostics And Formatting
E0xxx source and lexing
E1xxx parsing
E2xxx names
E3xxx types
E4xxx ownership
E5xxx exhaustiveness and effects
E6xxx lowering and backend
E7xxx runtime and toolchain
Status: structured diagnostics, source spans, plain/interactive rendering, summaries, stable code families, LSP conversion, and the canonical formatter are implemented. Not every reserved family has an implemented compiler phase yet.
Errors use E codes and warnings use W codes. Each code is five ASCII characters and has one
meaning. Diagnostics can carry help and related source context. Earlier phase failures suppress
later cascades where the later message would only restate the same defect.
Warnings do not make pudu check fail. Error-severity diagnostics do. The repository CI verifies
that a diagnostic code is not reused for unrelated meanings.
| Code | Meaning |
|---|---|
E1056 |
if let pattern cannot fail. |
E1057 |
let … else pattern cannot fail. |
E1058 |
while let pattern cannot fail. |
E3011 |
Propagation carrier does not match the enclosing function. |
E3036 |
let … else fallback can continue. |
W3003 |
A match only re-propagates the same carrier and can use ?. |
W5001 |
A match arm is unreachable. |
The complete registry lives in the compiler and grammar; this page is not an exhaustive code catalog.
pudu fmt Source.pudu
pudu fmt --check Source.pudu
pudu fmt --stdout Source.puduCanonical style uses two-space indentation, braces on declaration/control lines, no semicolons, and lexical import ordering with the standard library first. Formatter output is idempotent.
The formatter works from the token stream and preserves the token sequence: it moves whitespace but does not rewrite program meaning. Lexically invalid input is returned unchanged.
Macro calls expose one current style defect: the grammar writes name!(argument), while the
formatter inserts a space as name !(argument). Both forms check, but the documented compact form
does not pass pudu fmt --check. The macro example is therefore checked for syntax and excluded
from the formatter-clean example set until the formatter and grammar agree.
- Modules And Imports
- Values, Bindings, And Blocks
- Types And Inference
- Records, Sums, And Tuples
- Functions Generics And Traits
- Pattern Language
- Control Flow And Patterns
- Iteration And Loops
- Failure And Propagation
- Numbers And Collections
- Sets Maps And Sequences
- Keyed Structures
- Trees And Hierarchies
- Standard Library
- Output Formatting And Testing
- Tasks And Scopes
- Compile-Time Evaluation
- Typed Macros
- References And Unsafe
- Worked Programs