wordbots / wordbots-core

Client-side code for Wordbots, the card game where YOU make the cards.
http://wordbots.io
MIT License
22 stars 4 forks source link

[Suggestion] Partial parsing. #1894

Open Zergla opened 6 months ago

Zergla commented 6 months ago

A lot of times, when writing long abilities, the parser will get stuck and take a long time before actually parsing the ability.

However, a lot of long abilities are a collection of independent clause, like "A then B then C then D then E". I believe a lot of this problem could be alleviated by trying to parse the thing between "then" and "and" independently (though I guess it may be hard finding which meaning of "and" did the user mean without parsing the whole thing).

Even if it isn't possible, just saving most of the text parsing between edits could help, like when I edit an ability from {long text} to {long text} then A, the parser could try to check how much the old parsing work rather than starting from the start each time.