Tim Radvan
Tim Radvan
Like the unicode flag handling in #123, I think it would be reasonable to allow the ignoreCase `/i` flag if _all_ the RegExps use it. That would handle the case...
Not currently, no. #55 has some code from @nathan that you can use, though: https://gist.github.com/nathan/d8d1adea38a1ef3a6d6a06552da641aa
> switching to streaming halfway through your input doesn't sound like a good idea. Agreed! --- This doesn't do anything about token boundaries, does it? I recall you raised some...
As for > Should stream() automatically clone the lexer to avoid this behavior? Probably, yes. We haven't needed to you yet, but it probably would make sense for Lexers to...
Are streams compelling? Would you use them? :-)
> buffer input until we get a regex match that doesn't extend to the end of the buffer I thought you said that still isn't correct? https://github.com/tjvr/moo/issues/18#issuecomment-286163965
> for every valid token, all non-empty prefixes of that token must also parse as a single token Okay. That seems like a good way to do this. :-)
> The rule here is that for every valid token, all non-empty prefixes of that token must also parse as a single token. As long as that's true, the buffering...
I think I would prefer to merge #129, sorry!
Leaving this open, because I'd like to save your code somewhere @nathan for my own use if nothing else! :-)