1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-06 08:38:07 +00:00

Add "\v" string esca[e sequence.

This commit is contained in:
Calvin Rose
2019-02-24 14:46:16 -05:00
parent 92a5567b4a
commit 602e30a421
3 changed files with 15 additions and 3 deletions

View File

@@ -37,13 +37,13 @@
(def should-color (or (specials sym) (core-env sym)))
(paint (if should-color :coresym :symbol) text))
~{:ws (set " \t\r\f\n\0")
~{:ws (set " \t\r\f\n\v\0")
:readermac (set "';~,")
:symchars (+ (range "09" "AZ" "az" "\x80\xFF") (set "!$%&*+-./:<?=>@^_|"))
:token (some :symchars)
:hex (range "09" "af" "AF")
:escape (* "\\" (+ (set "ntrzf0\"\\e")
(* "x" :hex :hex)
:escape (* "\\" (+ (set "ntrvzf0\"\\e")
(* "x" :hex :hex)
(error (constant "bad hex escape"))))
:comment ,(<-c :comment ~(* "#" (any (if-not (+ "\n" -1) 1))))