mirror of
https://github.com/janet-lang/janet
synced 2024-12-02 21:09:55 +00:00
28 lines
402 B
Plaintext
28 lines
402 B
Plaintext
|
# Real compiler
|
||
|
|
||
|
# Make compiler
|
||
|
(: make-compiler (fn [] {
|
||
|
'scopes []
|
||
|
'env []
|
||
|
'labels {}
|
||
|
}))
|
||
|
|
||
|
# Make default form options
|
||
|
(: make-formopts (fn [] {
|
||
|
'target nil
|
||
|
'resultUnused false
|
||
|
'canChoose true
|
||
|
'isTail false
|
||
|
}))
|
||
|
|
||
|
# Make scope
|
||
|
(: make-scope (fn [] {
|
||
|
'level 0
|
||
|
'nextSlot 0
|
||
|
'frameSize 0
|
||
|
'freeSlots []
|
||
|
'literals {}
|
||
|
'literalsArray []
|
||
|
'slotMap []
|
||
|
}))
|