Fix lexer_callbacks silently dropped for keyword terminals When two or more terminals each absorb a same-priority keyword (producing an UnlessCallback) and also have a lexer_callbacks entry, every user callback except the last silently never fired. BasicLexer built each CallChain with 'lambda t: t.type == type_', which closes over the loop variable, so all conditions ended up comparing against the last terminal's name. Bind type_ per iteration. Fixes #1618.
Recent Commits to lark:master
-
Fix lexer_callbacks silently dropped for keyword terminals