Grammar Toolbox
Coverage: 0.00% (0/271)
Frequent Errors mapped to Diagnostics
| Error | Rule | Expected Diagnostic |
|---|---|---|
| Missing module path after space | space_decl | top-level parse error: expected module path |
| Malformed proc signature | proc_decl | signature parse error: expected ) or parameter |
| Missing const identifier | const_decl | declaration parse error: expected identifier |
| Missing at in entry declaration | entry_decl | entry parse error: expected keyword at |
| Operator placement invalid | expr | expression parse error: unexpected operator token |
Syntax Constructor Matrix
| declaration | space_decl, use_decl, export_decl, const_decl, static_decl, global_decl, type_alias_decl, opaque_type_decl, extern_type_decl, form_decl, class_decl, union_decl, bits_decl, pick_decl, flags_decl, trait_decl, associated_type_decl, impl_decl, proc_decl, extern_proc_decl, intrinsic_decl, macro_decl, comptime_decl, static_assert_decl, test_decl, bench_decl, entry_decl, compiler_decl, compiler_phase_decl, compiler_stage_decl, compiler_artifact_decl, compiler_pipeline_decl, compiler_cache_decl, compiler_target_decl, query_decl, pass_decl, backend_decl, diagnostic_decl |
|---|---|
| statement | stmt, local_const_stmt, let_stmt, set_stmt, give_stmt, try_stmt, defer_stmt, asm_stmt, unsafe_stmt, emit_stmt, assert_stmt, panic_stmt, unreachable_stmt, if_stmt, while_stmt, loop_stmt, for_stmt, break_stmt, continue_stmt, select_stmt, match_stmt, when_match_stmt, with_stmt, critical_stmt, expr_stmt |
| expression | expr, assign_expr, ternary_expr, coalesce_expr, range_expr, or_expr, and_expr, bit_or_expr, bit_xor_expr, bit_and_expr, eq_expr, rel_expr, shift_expr, add_expr, mul_expr, cast_expr, unary_expr, postfix_expr, index_expr, slice_expr, path_expr, if_expr, proc_expr, match_expr, lambda_expr, unsafe_expr, builtin_expr, sizeof_expr, alignof_expr, offsetof_expr, typeof_expr, nameof_expr, type_expr |
By Keyword
proc
proc_signature, proc_decl, proc_name, proc_modifier, proc_suffix, extern_proc_decl, proc_expr, proc_type
pick
entry
query
compiler
compiler_decl, compiler_items, compiler_item, compiler_phase_decl, compiler_stage_decl, compiler_artifact_decl, compiler_pipeline_decl, compiler_cache_decl, compiler_target_decl
Rule to Tests Traceability
Local Search
Lint your snippet (heuristic)
Railroad (key rules)
Pocket print / PDF
Open printable pocket reference
Playground examples (static)
proc_decl
proc main() -> int { give 0 }const_decl
const VERSION: string = "1.0"space_decl
space vitte/bootstrap/stage2use_decl
use vitte/ioexpr
a + b * c