diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-11 13:01:22 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-11 13:01:22 +0100 |
| commit | e89a65fe2ea7911fa20502818e0af6d702d68be8 (patch) | |
| tree | 4da2952c00681a6faf538781bd3811a980a1f307 /todo | |
| parent | a1e0b7c7fb6e1dc066e61cc302f17466777a488b (diff) | |
| download | sylt-e89a65fe2ea7911fa20502818e0af6d702d68be8.tar.gz | |
Variables and scoping
Diffstat (limited to 'todo')
| -rw-r--r-- | todo | 53 |
1 files changed, 53 insertions, 0 deletions
@@ -0,0 +1,53 @@ + - [x] Better error messages + - [x] Rustify the thingy + - [x] Return errors from runtime +---[-]-REPR---- + - [x] Pass files + + - [?] Globals + - [x] Variables + - [x] Scoping + - [ ] Jumps + - [ ] Type annotations + - [ ] If + - [ ] Listor + - [ ] For + - [ ] Prepass, for typeing + - [ ] Typing + - [ ] Functions + + +global_names = {"name" => idx} +gloabls [(type var1), (type var2), (type var3)...] + +==== q.tdy ==== +use z +// Is this a closure? Yes. +f := () -> { + print a +} + +f := () -> { +} + +<Var> <Typ> + +a int := a + 1 +a int := 3 +a := 3 + +let <Var>:<Typ> + +a : int = 123 +a := z.a + +==== z.tdy ==== +use q // Will we need imports? Yes. + +q.f() // What does this print? 123. q has a different scope. + +g := () -> { + print a +} + +a := q.a // Compilation error |
