@classmethod
def get_as_var(cls, tokens):
    """Returns context variable from `as` template tag clause if any.

         Modifies tokens inplace.

        :param tokens:
        :rtype: None|str
        """
    as_var = None
    if tokens[-2] == 'as':
        as_var = tokens[-1]
        tokens[-2:] = []
    return as_var
