This pull-request moves PRINT from our core-interpreter (eval/eval.go) into a built-in (eval/builtins.go), which will close #41.
This required some changes, because registering a built-in requires that you specify the number of arguments that they will consume - and PRINT consumes everything up to:
End of line.
Or : (for inside an IF statement).
There is a regression though, which needs to be handled, print should output " " when it sees a COMMA, but the commas are consumed by the argument-buildup.
I'll merge this when that is handled, even if badly.
This pull-request moves PRINT from our core-interpreter (
eval/eval.go
) into a built-in (eval/builtins.go
), which will close #41.This required some changes, because registering a built-in requires that you specify the number of arguments that they will consume - and
PRINT
consumes everything up to::
(for inside anIF
statement).There is a regression though, which needs to be handled, print should output " " when it sees a COMMA, but the commas are consumed by the argument-buildup.
I'll merge this when that is handled, even if badly.