Hi Graham,
-from ptl_compile import compile_template, PTL_EXT +from quixote.ptl.ptl_compile import compile_template, PTL_EXT
Just checked in.
def parse(buf, filename='<string>'): + for ext_proc in _external_preprocessors: + buf = ext_proc(buf)
.... This change would not cause any problems as far as I know, but I wonder if this will suffice. As you know, but others may not, the ptl compiler uses a simple source code transformation to convert templates into something that can be parsed by the python parser, and then the compiler applies some transformations to the parse tree to get the desired template behavior. It seems like your block structured code extension could follow the same pattern if you registered a parse tree transformer in addition to the preprocessor. I would think that this would make it easier to support block headers with multiple lines, comments, triple-quoted strings, and the like. Have you thought about that and decided against it? _______________________________________________ Quixote-users mailing list [email protected] http://mail.mems-exchange.org/mailman/listinfo/quixote-users
