mirror of
https://github.com/janet-lang/janet
synced 2025-01-12 00:20:26 +00:00
Add simple example repl. Will eventually add
support for error handling, macros and other compile time transformations. This will eventually become the full language.
This commit is contained in:
parent
058780085b
commit
4fd398ac97
@ -16,7 +16,12 @@
|
||||
"Create a parser"
|
||||
(export! "p" (parser))
|
||||
|
||||
"Run a simple repl. Does not handle errors and other
|
||||
such details."
|
||||
(while 1
|
||||
(write stdout ">> ")
|
||||
(: line (readline))
|
||||
(print "Read line: " line)
|
||||
)
|
||||
(while line
|
||||
(: line (parse-charseq p line))
|
||||
(if (parse-hasvalue p)
|
||||
(print ((compile (parse-consume p)))))))
|
||||
|
Loading…
Reference in New Issue
Block a user