From e11e1f782e8318e4f97465ec2acaa4396fd6f4c8 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Fri, 1 Jan 2021 20:35:09 +0900 Subject: [PATCH] Wrote multiline comment --- core.fs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/core.fs b/core.fs index c21af69..d872fed 100644 --- a/core.fs +++ b/core.fs @@ -682,6 +682,28 @@ alias-builtin xor ^ latest @ >cfa , ; immediate +\ === Multiline Comment === +: '(' [ key ( ] literal ; +: ')' [ key ) ] literal ; + +: ( + 1 \ depth counter + begin + key + dup '(' = if + drop 1+ \ increase depth + else + ')' = if + 1- \ decrease depth + then + then + dup 0= until + drop +; immediate + +( + Now we can use multiline comment with ( nests. ) +) bye