Restructuring
This commit is contained in:
24
examples/function_overloading.kl
Normal file
24
examples/function_overloading.kl
Normal 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
|
||||
Reference in New Issue
Block a user