mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
print & read builtin functions, fixes. execution of programs partially works
This commit is contained in:
parent
27f643dfbc
commit
2556efcaba
16 changed files with 537 additions and 215 deletions
|
|
@ -76,11 +76,11 @@ namespace var Ord {
|
|||
|
||||
//
|
||||
|
||||
typeclass Show =
|
||||
& var show : -> String
|
||||
|
||||
typeclass Read =
|
||||
& var read : String -> Read
|
||||
// typeclass Print =
|
||||
// & var print : -> String
|
||||
//
|
||||
// typeclass Read =
|
||||
// & var read : String -> Read
|
||||
|
||||
typeclass Debug =
|
||||
& debug : -> String
|
||||
|
|
@ -132,6 +132,7 @@ decl ( -- ) : Int -> Int -> Int_0
|
|||
// }
|
||||
|
||||
decl print : String -> Unit
|
||||
decl read : -> String
|
||||
|
||||
decl func : String -> Int
|
||||
def func : s = {
|
||||
|
|
@ -140,5 +141,6 @@ def func : s = {
|
|||
}
|
||||
|
||||
exec main {
|
||||
for i in 0--10 do func: "abacaba"
|
||||
for i in (,0 ,1 ,2 ,3) do func: "abacaba"
|
||||
; print: ({ return read: })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue