

def get_var(self):
    (token, negate) = self.get_token('Reached end of statement, still expecting a variable.')
    if (isinstance(token, basestring) and (token in OPERATORS)):
        raise self.error_class(('Expected variable, got operator (%s).' % token))
    var = self.create_var(token)
    if negate:
        return Or(var, negate=True)
    return var

dataset/ETHPy150Open aehlke/manabi/apps/utils/templatetags/smartif.py IfParser.get_var/original