mirror of
https://github.com/tenrok/maska.git
synced 2026-05-15 11:59:38 +03:00
222f2df70a
When a token with multiple:true does not match the next character, we need to determine if it matched any previous characters or not. If it hasn't matched any characters yet, then we skip the invalid input character and remain on the same token. If it has matched 1 or more input characters, then we advance to the next token, but stay on the same input character. The old code had several issues with this. I replaced it with a simple flag (multipleMatched) that is set to true whenever a token with multiple==true matches an input character, and can then be tested when a token with multiple==true doesn't match an input character.