}
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;
static void handleString(char*s, int len)
{
- if(as3_pass < 2) {
- // don't bother decoding strings in pass 1
- memset(&a3_lval, 0, sizeof(a3_lval));
- return;
- }
-
if(s[0]=='"') {
if(s[len-1]!='"') syntaxerror("String doesn't end with '\"'");
s++;len-=2;
s++;len-=2;
}
else syntaxerror("String incorrectly terminated");
-
a3_lval.str = string_unescape(s, len);
}
{
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);