raise ParseError("Extra {%% end %%} block on line %d" % line)
return body
- elif operator in ("extends", "include", "set", "import", "comment"):
+ elif operator in ("extends", "include", "set", "import", "from",
+ "comment"):
if operator == "comment":
continue
if operator == "extends":
if not suffix:
raise ParseError("extends missing file path on line %d" % line)
block = _ExtendsBlock(suffix)
- elif operator == "import":
+ elif operator in ("import", "from"):
if not suffix:
raise ParseError("import missing statement on line %d" % line)
block = _Statement(contents)