mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-25 13:07:13 +00:00
debug
This commit is contained in:
parent
582ad5668e
commit
0d62ae0814
29 changed files with 99479 additions and 1166 deletions
43
tests/default_constructors.lang
Normal file
43
tests/default_constructors.lang
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
namespace Employee {
|
||||
decl gen_employee : Unit -> Employee
|
||||
def gen_employee = {
|
||||
; a = b + c
|
||||
return
|
||||
$Employee
|
||||
& name = "John"
|
||||
& role =
|
||||
($Manager
|
||||
& name = "John"
|
||||
& productivity =
|
||||
($Productivity.High
|
||||
& duration = 10.3
|
||||
& sleep_on_work = ($Productivity.SleepOnWork.No))
|
||||
& salary = 123)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
class Employee =
|
||||
& name : String
|
||||
& role :
|
||||
( | Director
|
||||
& importance : Float
|
||||
& share : Float
|
||||
| Manager
|
||||
& productivity :
|
||||
( Productivity
|
||||
| .Low
|
||||
| .Average
|
||||
| .High
|
||||
& duration : Float
|
||||
& sleep_on_work :
|
||||
(SleepOnWork
|
||||
| ..Yes
|
||||
| ..No
|
||||
))
|
||||
& salary : Int
|
||||
| Programmer
|
||||
& skills : Float
|
||||
& current_task : Optional Task
|
||||
& salary : Int)
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue