(token_class)
return callback
Do not produce empty tokens.
Do not produce empty tokens.
Do not produce empty tokens .
def something(token_class):
        """Do not produce empty tokens."""
        def callback(lexer, match, context):
            text = match.group()
            if not text:
                return
            yield match.start(), token_class, text
            context.pos = match.end()
        return callback
def something ( token_class ) : def callback ( lexer , match , context ) : text = match . group ( ) if not text : return yield match . start ( ) , token_class , text context . pos = match . end ( ) return callback