internal static void PrintQil(object qil, XmlWriter xw, bool printComments, bool printTypes, bool printLineInfo) { QilExpression node = (QilExpression)qil; QilXmlWriter.Options none = QilXmlWriter.Options.None; if (printComments) { none |= QilXmlWriter.Options.Annotations; } if (printTypes) { none |= QilXmlWriter.Options.TypeInfo; } if (printLineInfo) { none |= QilXmlWriter.Options.LineInfo; } new QilXmlWriter(xw, none).ToXml(node); xw.Flush(); }
internal static void PrintQil(object qil, XmlWriter xw, bool printComments, bool printTypes, bool printLineInfo) { QilExpression qilExpr = (QilExpression)qil; QilXmlWriter.Options options = QilXmlWriter.Options.None; QilValidationVisitor.Validate(qilExpr); if (printComments) { options |= QilXmlWriter.Options.Annotations; } if (printTypes) { options |= QilXmlWriter.Options.TypeInfo; } if (printLineInfo) { options |= QilXmlWriter.Options.LineInfo; } QilXmlWriter qw = new QilXmlWriter(xw, options); qw.ToXml(qilExpr); xw.Flush(); }