mirror of
https://github.com/kanaka/mal.git
synced 2024-09-21 10:37:58 +03:00
034e82adc5
See http://skew-lang.org/ for details on the Skew language. Currently Mal only compiles to Javascript, as there are some issues with the C# backend for Skew (https://github.com/evanw/skew/issues/19). Tested with Skew 0.7.42.
25 lines
372 B
Plaintext
25 lines
372 B
Plaintext
def READ(str string) string {
|
|
return str
|
|
}
|
|
|
|
def EVAL(ast string, env StringMap<string>) string {
|
|
return ast
|
|
}
|
|
|
|
def PRINT(exp string) string {
|
|
return exp
|
|
}
|
|
|
|
def REP(str string) string {
|
|
return PRINT(EVAL(READ(str), {}))
|
|
}
|
|
|
|
@entry
|
|
def main {
|
|
var line string
|
|
while (line = readLine("user> ")) != null {
|
|
if line == "" { continue }
|
|
printLn(REP(line))
|
|
}
|
|
}
|