From 8a46a16530b9c3d34bede50f14bb3e72111e8532 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 20 Oct 2019 15:41:34 -0500 Subject: [PATCH] core: better syntax for comment. [[ foo ]] is a string ``#[[foo]]`` is a turned-off string --- core/bootstrap/syntax.factor | 8 ++++++++ core/syntax/syntax.factor | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index b6d14df47d..c57266cef6 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -140,6 +140,14 @@ IN: bootstrap.syntax "![=====[" "![======[" + "#[[" + "#[=[" + "#[==[" + "#[===[" + "#[====[" + "#[=====[" + "#[======[" + "I[[" "I[=[" "I[==[" diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 3ae45513ba..55665766ce 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -420,6 +420,14 @@ IN: bootstrap.syntax "![=====[" [ "]=====]" parse-multiline-string0 drop ] define-core-syntax "![======[" [ "]======]" parse-multiline-string0 drop ] define-core-syntax + "#[[" [ "]]" parse-multiline-string0 drop ] define-core-syntax + "#[=[" [ "]=]" parse-multiline-string0 drop ] define-core-syntax + "#[==[" [ "]==]" parse-multiline-string0 drop ] define-core-syntax + "#[===[" [ "]===]" parse-multiline-string0 drop ] define-core-syntax + "#[====[" [ "]====]" parse-multiline-string0 drop ] define-core-syntax + "#[=====[" [ "]=====]" parse-multiline-string0 drop ] define-core-syntax + "#[======[" [ "]======]" parse-multiline-string0 drop ] define-core-syntax + "I[[" [ "]]" define-interpolate-syntax ] define-core-syntax "I[=[" [ "]=]" define-interpolate-syntax ] define-core-syntax "I[==[" [ "]==]" define-interpolate-syntax ] define-core-syntax