d11wtq wrote:Queries (it still doesn't sound right to call them that

) would be best split over multiple lines to make them more readable but the parser doesn't care either way.
Yeah I kinda forgot that it was possible to do, because that would really add to the functionality.
As you could have
Code: Select all
GET A FROM B
IF A == C THEN SAY "e;A"e;
NOW DO THIS AND THIS
IF B == C THEN SAY "e;C"e;
for instance (but regex-style of course) (as this is more or less the way regex works when split over many lines)
a little option which could be good to include if you ask me would be some kind of template which you can insert, (custom of course) for instance you want to check if the next characters are "HELLO" or "WORLD", then you could have a tag instead e.g. "[HW]" which would be replaced "HW" => "'HELLO' OR 'WORLD'" so that you could easily reuse or make it more easily read. Also easily having "ISNAME" => "... something neat ..." to make it more readable.
In the way that you could make even more human readable and shorter regex by allowing the user to specify such tags by the use of an array or such. (Often you want to check if it is a quote, or an escaped quote, having to copy that 5 times makes you frustrated)
Just an experimental thought, which likely can have some areas which would prove difficult to solve properly. But, that would certainly be a feature I would like.
However, this could also be done by extending the class which would perhaps be more adviseable, in other words, having your regex class, extending it to take extended regex with tags that would be taken out and replaced with their respective content and then parsed. (as this would also remove certain troublesome functionality from the core)
As usual, just a thought
