projects
/
pforth
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename files t_required-helperX to t_required_helperX
[pforth]
/
fth
/
file.fth
diff --git
a/fth/file.fth
b/fth/file.fth
index
b71edc5
..
8fe0810
100644
(file)
--- a/
fth/file.fth
+++ b/
fth/file.fth
@@
-61,6
+61,15
@@
create (LINE-TERMINATOR) \n c,
0 2r> + c! ( )
;
0 2r> + c! ( )
;
+: MULTI-LINE-COMMENT ( "comment<rparen>" -- )
+ BEGIN
+ >in @ ')' parse ( >in c-addr len )
+ nip + >in @ = ( delimiter-not-found? )
+ WHILE ( )
+ refill 0= IF EXIT THEN ( )
+ REPEAT
+;
+
}private
\ This treats \n, \r\n, and \r as line terminator. Reading is done
}private
\ This treats \n, \r\n, and \r as line terminator. Reading is done
@@
-108,4
+117,14
@@
create (LINE-TERMINATOR) \n c,
THEN
;
THEN
;
+: ( ( "comment<rparen>" -- )
+ source-id
+ CASE
+ -1 OF postpone ( ENDOF
+ 0 OF postpone ( ENDOF
+ \ for input from files
+ multi-line-comment
+ ENDCASE
+; immediate
+
privatize
privatize