diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-13 15:09:21 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-13 15:09:21 +0100 |
| commit | a4bb44e2a004d04cbee3ceb2d90aa7461dabecf4 (patch) | |
| tree | 248b956a9fc08c67c0cfeb01f3a0f95c0fd4825f /example/example_02_nectar/example.nc | |
| parent | fe55f67bf7a5aeba365d7af1d681cef1d9ed7a3c (diff) | |
[FEAT] Update and add Nectar compliant snippet with CL paradigm in mind.compiler_kit-osx-tweaks-fixes
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'example/example_02_nectar/example.nc')
| -rw-r--r-- | example/example_02_nectar/example.nc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/example/example_02_nectar/example.nc b/example/example_02_nectar/example.nc index 46cbd25..fdaadcd 100644 --- a/example/example_02_nectar/example.nc +++ b/example/example_02_nectar/example.nc @@ -1,10 +1,15 @@ -extern sleep; -extern putchar; +extern exit; -const main() { - sleep(1); - putchar(0, '!'); +trait foo { + let exit(); +}; + +let foo.exit() { + exit(0); +} - let foo := 42; - return foo; +const main() { + let self := 0; + foo.exit(); + return 0; } |
