JaggerScript / docsProject documentation

Reference

Runtime Errors and Safety Checks

Look up syntax, contracts, layouts, algorithms, and exact behavior.

The interpreter rejects invalid runtime states immediately. Missing variables, non-instance scoped access, unknown fields, and type-incompatible field assignments raise errors instead of returning undefined values. The language has explicit type annotations but no full static checker, so invalid states must fail at the point of use.

  • Unbound local or field names produce a missing-variable error.
  • Attempting to traverse a primitive as an instance produces an instance assertion error.
  • Assigning a value whose typeStr differs from an existing field type is rejected.
  • Break is only meaningful inside loop evaluation and is represented as a control exception.
  • Console output is captured and formatted by the browser runtime wrapper.
typeStr⁡(old)≠typeStr⁡(new)⇒error\operatorname{typeStr}(old) \ne \operatorname{typeStr}(new) \Rightarrow error
Field assignment guard. Runtime field mutation preserves the declared or previously established field type.