'Test a token against a token expression.  This can either be a
token type or ``\'token_type:token_value\'``.  This can only test
against string values and types.'

def test(self, expr):

    if (self.type == expr):
        return True
    elif (':' in expr):
        return (expr.split(':', 1) == [self.type, self.value])
    return False
