Sat May 23 08:41:37 CEST 2009
Problem: 'load doesn't mix with 'expand.
There is a simple fix for this: make 'load behave as a preprocessor
only, which means it is a reserved word that cannot occur anywhere
else in the source code. Maybe this is a bit restrictive though..
It's probably simpler to flatten the current recursive calls for load.
Now.. Do I really need the current-load-relative-directory parameter?
I'm not using 'load anywhere.. It's probably OK to dump info in the
forth search path parameter.
Hmm.. let's quick-fix it for now built on existing structure: the
first item in the forth path will be the current directory. This is
simply changed on begin/end of a loaded sequence.
Better: abstract the value of forth-path to include both current
directory and search path.
OK. it seems to work.
There's one thing that's going to bite me later though: the mode
(macro/forth) isn't saved.. Maybe this should be implemented as
parse-time state also? Just have a single struct that can be easily
dumped as an abstract transformer?
Road is open to do it properly + it should now be possible to use
'require inside 'load -ed files.