mirror of
https://github.com/nineties/planckforth
synced 2024-12-27 21:58:35 +01:00
Wrote multiline comment
This commit is contained in:
parent
462362f192
commit
e11e1f782e
1 changed files with 22 additions and 0 deletions
22
core.fs
22
core.fs
|
@ -682,6 +682,28 @@ alias-builtin xor ^
|
||||||
latest @ >cfa ,
|
latest @ >cfa ,
|
||||||
; immediate
|
; 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
|
bye
|
||||||
|
|
Loading…
Reference in a new issue