Changelog

Release history for the Chasm compiler and language.

v1.2.1

Module-qualified call syntax

Calls like utils.fn(args) now work correctly. Previously the module prefix triggered an E001 "undefined variable" error. The semantic pass now detects namespace-qualified calls when the receiver is not in the symbol table, and codegen discards the prefix and emits a plain chasm_fn(ctx, args) call.


v1.2.0

LSP enhancements

  • Import-aware completions, typing utils. shows all public functions from the imported file
  • Go-to-definition across imports, jump to the definition in the source file, even across module boundaries
  • Snippets, tick, init, draw, struct, attr, fn, defp, for, forin, case, if, ifelse, while, enum, import, game
  • Formatter, chasm fmt <file>, also available via textDocument/formatting and format-on-save in the VS Code extension
  • CodeLens, ▶ Run appears above on_tick, on_init, on_draw, and main functions
  • Extension 0.3.0, LSP server 1.2.0

v1.1.0

Raylib runtime fixes and clean compiler errors

  • Fixed extra ) bug in codegen's array seeding loop
  • Added missing chasm_range, array_fixed helpers to engine/raylib/chasm_rt.h, they existed in the standalone runtime but were absent from the engine header
  • #ifndef CHASM_ARRAY_FIXED_HELPERS_DEFINED guard added to prevent redefinition when both headers are included
  • filterCCErrors in the CLI: clang output is now reformatted as Chasm-style diagnostics pointing to the .chasm source line rather than the generated .c file

v1.0.0

Arena-backed arrays and complete lifetime enforcement

  • array_fixed(N), fixed-capacity arrays allocated from the matching arena (frame/script/persistent). No heap allocation. The backing memory is a bump-allocated block from the arena; capacity is fixed at declaration time.
  • array_fixed(N, default), all N slots pre-filled with the default value at initialization. len starts at N so every slot is immediately readable without a push loop.
  • Typed struct arrays, array_new(Type, cap) and array_fixed(cap, StructLiteral{}) create typed arrays where .get returns the struct directly and .set/.push accept the struct by value.
  • expr_lifetime propagation added for all expression forms: calls, method calls, binops, struct literals, and pipe chains all carry the correct lifetime through to assignment checks.
  • builtin_ret completed with full coverage: cos, sin, sqrt, atan2, clamp, to_int/to_float/to_bool, rgb/rgba, color_lerp, color_mix, all bit ops, all vec2_* functions, smooth_step, move_toward, angle_diff, and more.
  • The shape_shooter example game was rewritten to use array_fixed for bullets and enemies.

v0.9.0

Rich compiler diagnostics

  • Error codes E001–E008 following Rust's diagnostic style
  • All errors collected in a single pass, the compiler no longer stops at the first error
  • Each error rendered with a source snippet, caret underline pointing to the exact token, and an optional = help: hint
  • E008: lifetime violation, the compiler now detects when a shorter-lived value flows into a longer-lived attribute and reports the exact lifetimes involved with a promotion hint
  • Levenshtein distance used for "did you mean?" suggestions on E005 (undefined function) and E007 (unknown field)
  • chasm_eprint and chasm_exit added to the runtime; eprint and exit available in Chasm code