1
0
mirror of https://github.com/janet-lang/janet synced 2025-04-26 12:43:11 +00:00
janet/src/webclient/webinit.janet
2018-12-08 14:17:03 -05:00

11 lines
372 B
Plaintext

# Copyright 2017-2018 (C) Calvin Rose
(print (string "Janet " janet/version "-" janet/build " Copyright (C) 2017-2018 Calvin Rose"))
(fiber/new (fn webrepl []
(repl (fn get-line [buf p]
(def [line] (parser/where p))
(def prompt (string "janet:" line ":" (parser/state p) "> "))
(repl-yield prompt buf)
(yield)
buf))))