// Compiles top level expressions internal virtual OpcodeBlock Compile(XPathExpr expr) { Fx.Assert(null != expr, ""); this.nestingLevel = 1; this.pushInitialContext = false; XPathExprCompiler exprCompiler = new XPathExprCompiler(this); OpcodeBlock mainBlock = exprCompiler.Compile(expr); if (this.pushInitialContext) { OpcodeBlock expandedBlock = new OpcodeBlock(); expandedBlock.Append(new PushContextNodeOpcode()); expandedBlock.Append(mainBlock); expandedBlock.Append(new PopContextNodes()); return expandedBlock; } return mainBlock; }
// Compiles top level expressions internal virtual OpcodeBlock Compile(XPathExpr expr) { Fx.Assert(null != expr, ""); this.nestingLevel = 1; this.pushInitialContext = false; XPathExprCompiler exprCompiler = new XPathExprCompiler(this); OpcodeBlock mainBlock = exprCompiler.Compile(expr); if (this.pushInitialContext) { OpcodeBlock expandedBlock = new OpcodeBlock(); expandedBlock.Append(new PushContextNodeOpcode()); expandedBlock.Append(mainBlock); expandedBlock.Append(new PopContextNodes()); return(expandedBlock); } return(mainBlock); }
OpcodeBlock CompileBlock(XPathExpr expr) { XPathExprCompiler compiler = new XPathExprCompiler(this); return compiler.Compile(expr); }
OpcodeBlock CompileBlock(XPathExpr expr) { XPathExprCompiler compiler = new XPathExprCompiler(this); return(compiler.Compile(expr)); }