public override void CaseAASourceFile(AASourceFile node) { InAASourceFile(node); { Object[] temp = new Object[node.GetUsings().Count]; node.GetUsings().CopyTo(temp, 0); for (int i = temp.Length - 1; i >= 0; i--) { ((PDecl)temp[i]).Apply(this); } } if (node.GetName() != null) { node.GetName().Apply(this); } { Object[] temp = new Object[node.GetDecl().Count]; node.GetDecl().CopyTo(temp, 0); for (int i = temp.Length - 1; i >= 0; i--) { ((PDecl)temp[i]).Apply(this); } } OutAASourceFile(node); }
public override void CaseAASourceFile(AASourceFile node) { string name = outputDir.FullName + "\\"; /* if (Options.Compiler.OneOutputFile) name += "MapScript"; else*/ name += node.GetName().Text; name += ".galaxy"; FileInfo file = new FileInfo(name); if (!file.Directory.Exists) file.Directory.Create(); stream = new StreamWriter(file.Open(FileMode.Create)); foreach (PDecl decl in node.GetDecl()) { decl.Apply(this); } Write("", true); stream.Close(); }