Files
clyx/clyx_repl.clx
T

23 lines
440 B
Plaintext
Raw Normal View History

2026-07-02 23:26:38 +03:00
#!/usr/bin/env clyx
# Clyx REPL implemented in Clyx itself
# Created by Luxferre in 2026, released into the public domain
:: is_exit [ lower "exit" streq ]
"Clyx REPL ready. Type \"exit\" to quit" puts cr
"loop_" "flag" + [ 1 ] defw 0 drop
1 while [
"clyx> " puts
readln
dup is_exit if [
drop
"Bye!" puts cr
"loop_" "flag" + [ 0 ] defw
] [
dup slen 0 = if [ drop ] [ i " ok" puts cr ]
]
"loop_" "flag" + i
]