Actually I hadn't considered that, but it's a really interesting idea. I was planning on adding checks at various points in the parser, but if I were to put something in the lexer I'd only have to put it once. In fact if it were to trap with a character that wasn't allowed in the input (like /xFF) it wouldn't actually slow down execution at all.
I'm thinking something like node's implementation where Espruino entered a debug> console mode with a few basic commands available. They do breaks very explicitly by having the user write debugger.
... problem is, if I do add debugging then the next step to have a nice graphical debugger in the Web IDE (eg, the ability to hover over variables as @alexanderbrevig suggested), and that's something I don't see myself having time for.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Actually I hadn't considered that, but it's a really interesting idea. I was planning on adding checks at various points in the parser, but if I were to put something in the lexer I'd only have to put it once. In fact if it were to trap with a character that wasn't allowed in the input (like
/xFF
) it wouldn't actually slow down execution at all.I'm thinking something like node's implementation where Espruino entered a
debug>
console mode with a few basic commands available. They do breaks very explicitly by having the user writedebugger
.... problem is, if I do add debugging then the next step to have a nice graphical debugger in the Web IDE (eg, the ability to hover over variables as @alexanderbrevig suggested), and that's something I don't see myself having time for.