more forward declarations

This commit is contained in:
agra
2026-02-24 17:37:52 +02:00
parent 97475d6cfe
commit 566121c45a
13 changed files with 867 additions and 88 deletions

View File

@@ -951,9 +951,9 @@ main :: () {
// void return, no -> annotation
}
// Bare-block shorthand (equivalent to no-arg void function):
main :: {
// same as main :: () { ... }
// No-arg void function:
main :: () {
// ...
}
```
@@ -1468,7 +1468,7 @@ compute :: (x: s32) -> s32 {
Bare blocks can be used as statements to introduce a new lexical scope. Variables declared inside a scope block are local to that block. No trailing `;` is required.
```sx
main :: {
main :: () {
x := 42;
{
x := 6; // shadows outer x