commit 525206b7e0cdf52e6a05926ee6d797f2663d23d4
parent 441164c5d4f122d3a25ac10ed379c063e53b662e
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Sat, 7 Jan 2023 10:32:54 -0500
cc: allow the first line to be a # directive
Previously, a "#" directive on the first line would result in a tokenization
error. I'm too lazy for a test, but you can reproduce by doing
"f<< /emul/cos/tools/blkpack.fs" on a fresh system.
Diffstat:
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/comp/c/tok.fs b/fs/comp/c/tok.fs
@@ -15,7 +15,7 @@ $400 Scratchpad :new structbind Scratchpad _pad
: _err tokdbg abort" tokenization error" ;
: _assert ( f -- ) not if _err then ;
-: cctok$ 1 to curline ;
+: cctok$ 1 to curline 1 to _firstchar ;
: ?line+ ( c -- c ) dup LF = if 1 to+ curline 1 to _firstchar then ;
\ Tokenization
diff --git a/fs/emul/cos/cvm.c b/fs/emul/cos/cvm.c
@@ -1,5 +1,3 @@
-// This unit compiles without error, but it doesn't actually work yet.
-
#define MEMSIZE $10000
#define SP_ADDR $fffa
#define RS_ADDR $ff00