1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-24 17:27:18 +00:00

Update and ascii-sort string escapes in peg

This commit is contained in:
sogaiu 2023-07-08 17:54:00 +09:00
parent 026c64fa01
commit 5a5e70b001

View File

@ -367,7 +367,7 @@
(set "!$%&*+-./:<?=>@^_|")) (set "!$%&*+-./:<?=>@^_|"))
:token (some :symchars) :token (some :symchars)
:hex (range "09" "af" "AF") :hex (range "09" "af" "AF")
:escape (* "\\" (+ (set "ntrvzf0e\"\\") :escape (* "\\" (+ (set `"'0?\abefnrtvz`)
(* "x" :hex :hex) (* "x" :hex :hex)
(error (constant "bad hex escape")))) (error (constant "bad hex escape"))))
:comment (/ '(* "#" (any (if-not (+ "\n" -1) 1))) (constant :comment)) :comment (/ '(* "#" (any (if-not (+ "\n" -1) 1))) (constant :comment))