mirror of
https://github.com/nineties/planckforth
synced 2024-12-25 21:58:22 +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 ,
|
||||
; 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
|
||||
|
|
Loading…
Reference in a new issue