Recent Commits to lark:master

  • 08/07/2026 11:09

    Fix lexer_callbacks silently dropped for keyword terminals

    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.

Log in