I'd 100% skip the line numbers and GOTO/GOSUB and build those two things. I grew up PDP BASIC and then VAX BASIC and the procedural aspect is what made it a great platform to write code. the line number/GOTO stuff is great for nostalgia, but a dead end for good coding practices.
PROCEDURE printfoo(bar%)
PRINT "foo: " + bar%
RETURN
FUNCTION double(number%)
RETURN number% * 2
ENDFUNC
' Prints "foo: 8"
printfoo(double(4))Personally I think SUB ... END SUB and FUNCTION ... END FUNCTION are the clearest syntax.
Unfortunately it then requires an editor, otherwise how do you overwrite/change a line?
With modern UI, there's pretty much no reason to do that, of course; with a retro style UI, there might be some marginal use.
(Also, supporting line numbers and line-oriented GOTO/GOSUB means you can directly use any of the libraries or classic code in that style; unwinding GOSUB/RETURN into named subs is trivial enough if it is otherwise clean, but unwinding GOTO-heavy code without having a working starting point isn't pleasant.)
Although, to be honest, in the spirit of making this a true "retro-computer", the idea of compiling the code into a custom bytecode is incredibly tempting. It'd be super fun to build, and also... that'd enable a DISASM command of some kind to dump arbitrary memory, as well as PEEK/POKE! Tons of work though.
You know your project better than I do but unless there's something I don't understand going on, it really shouldn't be that hard.
You can also keep both backends around and just build a basic VM evaluator and start compiling simple expressions at a time to the VM version. I don't want to give you suggestions if you already know all that but also happy to chat if you are looking for a good plan. :D