Restructuring

This commit is contained in:
Krzosa Karol
2022-09-29 13:02:40 +02:00
parent 65924967aa
commit 7cc01be358
3 changed files with 184 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/*
@todo: Add function overloading
Current plan:
* allow insert_into_scope to insert multiple lambdas
* change resolve_name and search_for_decl to something
that can seek multiple lambda declarations
resolve them and return a match to hash or type
* change the order of lambda call resolution, probably would have to
hash the arguments first to match the lambda call
*/
// Add :: (a: int, b: int): int ;; return a + b
// Add :: (a: F32, b: F32): F32 ;; return a + b
main :: (): int
a: F32 = 3
b: F32 = 2
c: int = 4
d: int = 10
// e := Add(a, b)
// f := Add(c, d)
return 0