Open github-serenity3 opened 3 years ago
Adding a single #$start
tag would be pretty simple 🤔 but you would have to redeclare any imports at the top. Are you okay with that? If you have time I would like to hop on a call with you to see how you're using AREPL and talk about your idea.
I would very much like to second the motion for this enhancement.
Often there are particular lines or blocks that I would like to ignore or skip whilst allowing execution to carry on below. This is of particular use when debugging, or working with incomplete code, since the execution stops when an error is encountered (of course). So being able to skip a line or section which causing an error, whilst continuing to be able to work on the rest of the code would be of great help!
I don't really know anything about how a REPL interpreter works, or how it has been implemented in the case of AREPL, but with regards to duplication of imports, would some kind of (per file) caching not be possible? ... Or the interpreter implemented in such a way that the session is never closed, but rather the $stop
and $start
tags trigger the in between block to be treated as a block-comment (i.e. docstring)? That way any declared imports, variables and their values are persisted and still available to the rest of the code outside of those tags.
As much as possible I want to be able to use AREPL with minimal 'pollution' of my code files (preferably none)!
Thanks.
Hi! You have the "#$end" tag, but it is useless in many cases. How can I stop parsing and start it again from some different place skipping some blocks not to be parsed.
Please make two universal tags, say "#$start" for the parser to switch on, and "#$stop" to switch off to skip parsing unwanting blocks. I remember this technique from masm32, as for listing directives [ %list / %nolist ]. So, we can put them freely to . %list directive starts listing, %nolist stops it. Then we can start it again, then stop... The best and the simplest. Think about it. It would be a simple and marvelous solution ever. And very subtle. And Universal. Sorry if i missed something, and this is already implemented or is going to be solved in the future. It could be used ерут for really large modules for testing in separate code blocks.