CYScope scope(!localize, context);
+ $I("arguments")->Replace(context, CYIdentifierMagic);
+
parameters_->Replace(context, code_);
context.ReplaceAll(code_);
if (existing == NULL)
return internal_;
- switch (kind) {
- case CYIdentifierArgument:
- case CYIdentifierCatch:
- case CYIdentifierMagic:
- _assert(false);
- default:
- break;
- }
-
- if (existing->kind_ == CYIdentifierGlobal)
+ if (kind == CYIdentifierGlobal);
+ else if (existing->kind_ == CYIdentifierGlobal || existing->kind_ == CYIdentifierMagic)
existing->kind_ = kind;
- else if (kind == CYIdentifierGlobal)
- ;
else if (existing->kind_ == CYIdentifierLexical || kind == CYIdentifierLexical)
_assert(false); // XXX: throw new SyntaxError()
CYStatement *CYWith::Replace(CYContext &context) {
context.Replace(scope_);
+ CYScope scope(true, context);
+ scope.Damage();
context.ReplaceAll(code_);
+ scope.Close(context);
return this;
}