The Lambda Lab
/
projects
/
forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unnecessary ['] primitive.
[forth.jl.git]
/
src
/
lib_1_basic.4th
diff --git
a/src/lib_1_basic.4th
b/src/lib_1_basic.4th
index
1764723
..
40851f3
100644
(file)
--- a/
src/lib_1_basic.4th
+++ b/
src/lib_1_basic.4th
@@
-40,10
+40,15
@@
: '\n' 10 ;
: BL 32 ;
: '\n' 10 ;
: BL 32 ;
-
-:
LITERAL IMMEDIATE ['] LIT , ,
;
+: CR '\n' emit ;
+:
SPACE BL emit
;
: ' BL WORD FIND DROP ;
: ' BL WORD FIND DROP ;
+: [COMPILE] IMMEDIATE ' , ;
+: ['] IMMEDIATE
+ LIT LIT , ' , ;
+
+: LITERAL IMMEDIATE ['] LIT , , ;
: CHAR BL WORD 1+ @ ;
: [CHAR] IMMEDIATE
: CHAR BL WORD 1+ @ ;
: [CHAR] IMMEDIATE
@@
-51,15
+56,6
@@
['] LIT , ,
;
['] LIT , ,
;
-: CR '\n' emit ;
-: SPACE BL emit ;
-
-: [COMPILE] IMMEDIATE
- BL WORD \ get the next word
- FIND DROP \ find it in the dictionary
- , \ and compile that
-;
-
: RECURSE IMMEDIATE
LATEST @ \ LATEST points to the word being compiled at the moment
>CFA \ get the codeword
: RECURSE IMMEDIATE
LATEST @ \ LATEST points to the word being compiled at the moment
>CFA \ get the codeword