A proof-of-concept Python code rewriter, transforming JavaScript-like tagged template strings (tag"foo{1+2}bar") to plain function calls (tag(["foo", "bar"], [1+2])).
Note that the code requires tagged version 0.0.2 or higher.
You can use ./encoder.py file to transform STDIN input to STDOUT:
$ python3 encoder.py < example_input.py
The output looks something like this:
from mylibrary import mytag
mytag (['<div>','</div>'],[(mytag (['<span/>'],[]))])
htm-pyx- didn't know about tokenize (will be using that in the future).mytag"<div/>"syntax.