19 lines
901 B
Plaintext
19 lines
901 B
Plaintext
|
We can just put all "builtins" into a file, then ship together with SLC and let it use them.
|
||
|
|
||
|
I think this is cleaner than adding syntax that makes the parser and interpreter just unnecessarily more complex...
|
||
|
|
||
|
So there does not need to be the following 4 variations:
|
||
|
|
||
|
: regularword
|
||
|
:: compileword
|
||
|
:builtin regularword
|
||
|
::builtin compileword
|
||
|
|
||
|
^^ if I somehoe let the interpreter know what the builtins are and define them all together in a differen parser state...
|
||
|
|
||
|
So the parser would in that mode prefix everything with the prefix - and in the symbol table of course enter the real C builtins
|
||
|
with the prefix too. Also in the calls / code of these, we would prefix everything to look up well in the symbol table so the code
|
||
|
for builtins can be totally unprefixed and all.
|
||
|
|
||
|
This really helps to simplify the parser-statemachine in my opinion - also the interpreter state machine should be unaffected!
|