mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
grammar refactoring: build_visitor fixed & visitors tested
This commit is contained in:
parent
3c2d496a85
commit
e4802896bd
35 changed files with 118128 additions and 91770 deletions
|
|
@ -1,12 +1,9 @@
|
|||
decl test_lambdas : Unit -> Unit
|
||||
def test_lambdas = {
|
||||
const lambda1 = \x -> x * x
|
||||
// const lambda2 = \(x : #Hash) -> x.hash // ??
|
||||
const lambda2 = \x -> x.hash
|
||||
const lambda3 = \x y -> x + y
|
||||
|
||||
// TODO: type LambdaType = Int -> Int // ?? type keyword ??
|
||||
// const typed_lambda = \x -> x + 1
|
||||
|
||||
const lambda4 = \x -> {
|
||||
; IO.print x
|
||||
const y = x + x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue