mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-05 22:48:42 +00:00
trying to fix basic types local types
This commit is contained in:
parent
25583d3edd
commit
24ff9a30d8
8 changed files with 132 additions and 54 deletions
|
|
@ -1,9 +1,9 @@
|
|||
basic (Float : #Ord #Div #Show)
|
||||
basic (Int : #Ord #IDiv #Show)
|
||||
basic (String : #Ord #Show #CharContainer)
|
||||
basic (Char : #Ord #Show)
|
||||
basic (Bool : #Ord #Show)
|
||||
basic (Unit : #Show)
|
||||
basic (String : #Ord #Show #CharContainer #Copy)
|
||||
basic (Char : #Ord #Show #Copy)
|
||||
basic (Bool : #Ord #Show #Copy)
|
||||
basic (Unit : #Show #Copy)
|
||||
|
||||
//
|
||||
|
||||
|
|
@ -197,13 +197,16 @@ decl random : -> Int // TODO
|
|||
|
||||
//
|
||||
|
||||
decl ret_one : -> Int
|
||||
def ret_one = 1
|
||||
|
||||
decl ( -- ) : Int -> Int -> Int_0
|
||||
def ( -- ) : begin end = {
|
||||
var current = begin
|
||||
return (while current < end do {
|
||||
//; current += 1
|
||||
; current += 1
|
||||
bring current
|
||||
//bring current - 1
|
||||
bring 1
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +218,7 @@ def func : s i = {
|
|||
}
|
||||
|
||||
exec main {
|
||||
for i in 0--9 do func: "abacaba" i
|
||||
for i in 0--9 do func: "abacaba" (i - 1)
|
||||
; print: ({
|
||||
if true then bring scan: else { ; print: "aaa" }
|
||||
bring "nothing"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue