X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Ftokenizer.lex;h=9ac960747dc3ed7343309b3089d38635e0210875;hb=cf2ede9f5b6da1f0d143c3fb825b88a3bb183811;hp=bc4f01248265ed1d3763defc33378849f7b6c4a4;hpb=0fd17f47ee30d90181e51f30fc17a6c31646137e;p=swftools.git diff --git a/lib/as3/tokenizer.lex b/lib/as3/tokenizer.lex index bc4f012..9ac9607 100644 --- a/lib/as3/tokenizer.lex +++ b/lib/as3/tokenizer.lex @@ -259,8 +259,15 @@ static int do_unescape(const char*s, const char*end, char*n) } break; } - default: - syntaxerror("unknown escape sequence: \"\\%c\"", *s); + default: { + if(o) { + o[len+0] = '\\'; + o[len+1] = *s; + } + s++; + len+=2; + break; + } } } if(o) o[len]=0; @@ -521,6 +528,10 @@ void tokenizer_register_namespace(const char*id) { trie_put(&namespaces, id); } +void tokenizer_unregister_namespace(const char*id) +{ + trie_remove(namespaces, id); +} static inline tokenizer_is_namespace(const char*id) { return trie_lookup(namespaces, id);