def serialize(tokens):
ret = []<EOL>for tok in tokens:<EOL><INDENT>if "<STR_LIT:U+0020>" in tok:<EOL><INDENT>tok = '<STR_LIT>' % tok<EOL><DEDENT>if "<STR_LIT:;>" in tok:<EOL><INDENT>tok = tok.replace("<STR_LIT:;>", "<STR_LIT>")<EOL><DEDENT>ret.append(tok)<EOL><DEDENT>return "<STR_LIT:U+0020>".join(ret)<EOL>
Serialize tokens:
* quote whitespace-containing tokens
* escape semicolons