mirror of
https://github.com/russolsen/sallyforth
synced 2024-12-25 21:58:18 +01:00
Set *source* during init.
This commit is contained in:
parent
f1bdf52b2b
commit
965f78f142
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,7 @@ class Forth:
|
|||
initial_defs = {
|
||||
'*prompt*': const_f('SallyForth>> '),
|
||||
'macroexpand': w_enlist,
|
||||
'*source*': const_f(__file__),
|
||||
'true': const_f(True),
|
||||
'false': const_f(False),
|
||||
'nil': const_f(None),
|
||||
|
@ -149,6 +150,7 @@ class Forth:
|
|||
return
|
||||
|
||||
if token in self.namespace:
|
||||
# print("executing ", token)
|
||||
self.namespace[token](self, 0)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue