]> git.saurik.com Git - cycript.git/blobdiff - Output.cpp
Move lexer hacks for \n=> and \n{ into Lex* rules.
[cycript.git] / Output.cpp
index 5244b5bd8cf4e14277343b4857b051f80121fecf..22e2149dd85a47702d2b6348bb70fb42132b67db 100644 (file)
@@ -396,11 +396,6 @@ void CYFor::Output(CYOutput &out, CYFlags flags) const {
     code_->Single(out, CYRight(flags), CYCompactShort);
 }
 
-void CYForDeclarations::Output(CYOutput &out, CYFlags flags) const {
-    out << "var" << ' ';
-    declarations_->Output(out, CYRight(flags));
-}
-
 void CYForLexical::Output(CYOutput &out, CYFlags flags) const {
     out << (constant_ ? "const" : "let") << ' ';
     declaration_->Output(out, CYRight(flags));
@@ -413,6 +408,13 @@ void CYForIn::Output(CYOutput &out, CYFlags flags) const {
     code_->Single(out, CYRight(flags), CYCompactShort);
 }
 
+void CYForInitialized::Output(CYOutput &out, CYFlags flags) const {
+    out << "for" << ' ' << '(' << "var" << ' ';
+    declaration_->Output(out, CYNoIn | CYNoRightHand);
+    out << ' ' << "in" << ' ' << *set_ << ')';
+    code_->Single(out, CYRight(flags), CYCompactShort);
+}
+
 void CYForInComprehension::Output(CYOutput &out) const {
     out << "for" << ' ' << '(';
     declaration_->Output(out, CYNoIn | CYNoRightHand);