added more inner function checks
[swftools.git] / lib / as3 / tokenizer.lex
index bc4f012..9ac9607 100644 (file)
@@ -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);