You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, 'keep' expressions (k[hl]?\d+) are being ignored because the lexer does not have the token for it defined. When debugging, parseKeep is skipped. TokenType is missing a Keep entry. (Apparently it should just be an Identifier, but still, the keep functionality does not appear to be accessible).
The text was updated successfully, but these errors were encountered:
This was pretty tricky to fix! I eventually traced it back to a couple of bugs. If the input stream ends with an identifier token, the buffer was never terminating because apparently regex.test(null) returns true, so the identifier was ending up "khnull", which obviously wouldn't match anything.
Secondly, there were a couple of key places where the parsing context was switched to parse a dice roll expression (4d6) rather than a dice expression, which includes the additional modifiers. I've fixed it, and added some regression tests as part of my latest update. So as of 1.5.0, which has been published, this should be fixed.
Thanks for your help, and let me know if you have any more trouble!
As far as I can tell, 'keep' expressions (
k[hl]?\d+
) are being ignored because the lexer does not have the token for it defined. When debugging,parseKeep
is skipped.(Apparently it should just be anTokenType
is missing aKeep
entry.Identifier
, but still, the keep functionality does not appear to be accessible).The text was updated successfully, but these errors were encountered: