~tieong/notjinja2

e3a1089f0b806620f90d7a45fe08a5acb993b2d4 — Thomas Ieong 1 year, 7 months ago 1923b0e
Check that the buffer is empty
1 files changed, 3 insertions(+), 2 deletions(-)

M notjinja2.py
M notjinja2.py => notjinja2.py +3 -2
@@ 53,6 53,7 @@ class Template:
        self.add_line("return output")
        self.dedent()

        assert not self.buffer
        assert self.INDENT == 0

    def do_dots(self, token):


@@ 85,7 86,7 @@ class Template:
        return data

    def parse_loop(self, tokens):
        for count, token in enumerate(tokens):
        for token in tokens:
            if token in ("{%", "%}"):
                pass
            elif token == "for":


@@ 98,7 99,7 @@ class Template:
                self.buffer.append(token)

    def parse_conditionals(self, tokens):
        for count, token in enumerate(tokens):
        for token in tokens:
            if token in ("{%", "%}"):
                pass
            elif iskeyword(token) and token in ("if", "in"):