/// <summary>
/// Construct QIL from a rooted graph of QilNodes with a specific factory.
/// </summary>
public QilExpression(QilNodeType nodeType, QilNode root, QilFactory factory) : base(nodeType) {
this.factory = factory;
this.isDebug = factory.False();
XmlWriterSettings settings = new XmlWriterSettings();
settings.ConformanceLevel = ConformanceLevel.Auto;
this.defWSet = factory.LiteralObject(settings);
this.wsRules = factory.LiteralObject(new List<WhitespaceRule>());
this.funList = factory.FunctionList();
this.gloVars = factory.GlobalVariableList();
this.gloParams = factory.GlobalParameterList();
this.rootNod = root;
}