1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00

Add step 0

This commit is contained in:
sogaiu 2021-04-23 01:45:27 +09:00
parent 9111882f56
commit f625d1bca7
3 changed files with 26 additions and 1 deletions

View File

@ -33,7 +33,7 @@ wasm_MODE = wasmtime
#
IMPLS = ada ada.2 awk bash basic bbc-basic c chuck clojure coffee common-lisp cpp crystal cs d dart \
elisp elixir elm erlang es6 factor fantom forth fsharp go groovy gnu-smalltalk \
elisp elixir elm erlang es6 factor fantom fennel forth fsharp go groovy gnu-smalltalk \
guile haskell haxe hy io janet java js jq julia kotlin livescript logo lua make mal \
matlab miniMAL nasm nim objc objpascal ocaml perl perl6 php picolisp pike plpgsql \
plsql powershell prolog ps python python.2 r racket rexx rpython ruby rust scala scheme skew \
@ -123,6 +123,7 @@ erlang_STEP_TO_PROG = impls/erlang/$($(1))
es6_STEP_TO_PROG = impls/es6/$($(1)).mjs
factor_STEP_TO_PROG = impls/factor/$($(1))/$($(1)).factor
fantom_STEP_TO_PROG = impls/fantom/lib/fan/$($(1)).pod
fenne_STEP_TO_PROG = impls/fennel/$($(1)).fnl
forth_STEP_TO_PROG = impls/forth/$($(1)).fs
fsharp_STEP_TO_PROG = impls/fsharp/$($(1)).exe
go_STEP_TO_PROG = impls/go/$($(1))

3
impls/fennel/run Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
exec fennel $(dirname $0)/${STEP:-stepA_mal}.fnl "${@}"

View File

@ -0,0 +1,21 @@
(fn READ [code-str]
code-str)
(fn EVAL [ast]
ast)
(fn PRINT [ast]
ast)
(fn rep [code-str]
(PRINT (EVAL (READ code-str))))
(var done false)
(while (not done)
(io.write "user> ")
(io.flush)
(let [input (io.read)]
(if (not input)
(set done true)
(print (rep input)))))