From 4227ac0ce06ccfae242e05eaa34398a062a3cb10 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Sun, 12 Dec 2021 16:11:32 +0900 Subject: [PATCH] Add escaped single and double quotes --- bootstrap.fs | 2 ++ test/core.fs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/bootstrap.fs b/bootstrap.fs index 3fa2d9e..aa1598b 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -1177,6 +1177,8 @@ decimal \ set default to decimal 'v' of 11 endof 'f' of 12 endof 'r' of 13 endof + [char] ' of [char] ' endof + [char] " of [char] " endof '\\' of '\\' endof drop -1 endcase diff --git a/test/core.fs b/test/core.fs index 8d77ca5..7ff3170 100644 --- a/test/core.fs +++ b/test/core.fs @@ -614,6 +614,9 @@ T{ char HELLO -> 48 }T T{ '\n' -> 0xa }T T{ '\0' -> 0 }T T{ 'a' -> 61 }T +T{ '"' -> 22 }T +T{ '\"' -> 22 }T +T{ '\'' -> 27 }T T{ : gc1 [char] X ; -> }T T{ : gc2 [char] HELLO ; -> }T T{ gc1 -> 58 }T