Commits
Add break_statement and continue_statement as valid match arm
value choices so 3 -> break parses without needing { break }.
- Add never to primitive type builtins
- Allow newlines in string_content for multi-line string interpolation
- Regenerate parser.c and grammar.json from updated grammar.js
- Update extension.toml rev to current HEAD
Amp-Thread-ID: https://ampcode.com/threads/T-019ed906-3b88-7585-b154-f69c6db00a7a
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed812-5fec-706b-8286-d09c9a1dd761
Co-authored-by: Amp <amp@ampcode.com>
When merging branch types, if one branch is Never (e.g. a catch
handler ending with break/continue) the result must be the other
branch's type, not Never. The previous code returned right when
left was compatible with right, which could return Never when
merging Any with Never.
- Add type to primitive types and type rules (break/continue)
- Clarify break/continue are statements with type never, work inside
catch/match/if nested blocks within loops
- Document multi-line string interpolation
- Document positional struct literals including single-value form
- Document CLI syntax for program arguments
- Bug 4: Add --args CLI support for passing program arguments
- Bug 5: Allow multi-line expressions in interpolated strings (lexer)
- Bug 6: Support positional struct init with single parameter
- Bug 1&2: Introduce Type::Never for break/continue to avoid void type errors
- Bug 3: Fix break/continue control flow in catch blocks via Never type coercion
Add comprehensive tests for break/continue in loops, catch blocks,
match arms, if branches, positional structs, and multi-line strings.
Amp-Thread-ID: https://ampcode.com/threads/T-019ed66e-a80d-773d-b086-e09c74a35d3e
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed66e-a80d-773d-b086-e09c74a35d3e
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed66e-a80d-773d-b086-e09c74a35d3e
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed66e-a80d-773d-b086-e09c74a35d3e
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed26e-0803-7795-9354-49626a50fe4a
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed26e-0803-7795-9354-49626a50fe4a
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed26e-0803-7795-9354-49626a50fe4a
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed26e-0803-7795-9354-49626a50fe4a
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed235-c9f9-76a3-9b9e-3d7d4df47212
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed1e4-38b3-7638-b274-18262a210521
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed1dc-efc8-736c-86e6-145750d5657b
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed174-ad71-77b1-a2a3-8b4c5628b72d
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed186-541e-72a9-9677-50bf38551b3f
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed17b-88a7-77ef-902a-60754aff2294
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ed174-ad71-77b1-a2a3-8b4c5628b72d
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ecca7-ac50-7571-94a9-bdf8edb1c37b
Co-authored-by: Amp <amp@ampcode.com>
- Add field to ForeignFunctionDecl AST
- Parse before individual foreign function declarations
- Remove from parse_public_statement
- Typechecker/validator/interpreter treat functions as module-level bindings
- Update public_decl_names to check foreign function public flags
- Add dlsym(NULL, ...) fallback for pkg-config failure
- Add tests for pub foreign functions and cross-module imports
- Update spec and examples
- Update examples, spec, and tests to use raylib::init_window()
instead of raylib.init_window()
- Parser already supports :: for field access identically to .
- Change Param.name to Option<String> to support optional names
- Foreign function parameters no longer require names
- Regular function and closure parameters still require names
- Update parser, typechecker, validator, and interpreter
- Add parser tests for unnamed foreign params
- Update spec and examples
- Change foreign block syntax to match struct declarations:
suwi_name: fn [symbol_name](params) -> return_type
- The foreign block now creates a namespace struct value
- Functions are accessed via package.suwi_name(...)
- Update spec, examples, and tests for new syntax
- Replace per-function foreign declarations with foreign blocks:
foreign <package> { fn <name>(...) -> <type> [= "<symbol>"] }
- Use pkg-config for runtime library resolution instead of --link CLI flags
- Remove --link flag from CLI
- Update spec and examples to reflect new syntax
- Add `wait` as a keyword and unary expression operator.
- Remove the old `handle::wait()` postfix syntax from the parser.
- Update runtime tests to use the new syntax.
- Update spec, language guide, and coroutine example to reflect the change.
Delete the original language.md and runtime.md specifications and replace
them with a single, accurate docs/spec.md that reflects the actual
implementation. Update AGENTS.md to reference the new spec.
- Add type to primitive types and type rules (break/continue)
- Clarify break/continue are statements with type never, work inside
catch/match/if nested blocks within loops
- Document multi-line string interpolation
- Document positional struct literals including single-value form
- Document CLI syntax for program arguments
- Bug 4: Add --args CLI support for passing program arguments
- Bug 5: Allow multi-line expressions in interpolated strings (lexer)
- Bug 6: Support positional struct init with single parameter
- Bug 1&2: Introduce Type::Never for break/continue to avoid void type errors
- Bug 3: Fix break/continue control flow in catch blocks via Never type coercion
Add comprehensive tests for break/continue in loops, catch blocks,
match arms, if branches, positional structs, and multi-line strings.
- Add field to ForeignFunctionDecl AST
- Parse before individual foreign function declarations
- Remove from parse_public_statement
- Typechecker/validator/interpreter treat functions as module-level bindings
- Update public_decl_names to check foreign function public flags
- Add dlsym(NULL, ...) fallback for pkg-config failure
- Add tests for pub foreign functions and cross-module imports
- Update spec and examples
- Change Param.name to Option<String> to support optional names
- Foreign function parameters no longer require names
- Regular function and closure parameters still require names
- Update parser, typechecker, validator, and interpreter
- Add parser tests for unnamed foreign params
- Update spec and examples