internal virtual OpcodeBlock Compile(XPathExpr expr) { this.nestingLevel = 1; this.pushInitialContext = false; OpcodeBlock block = new XPathExprCompiler(this).Compile(expr); if (this.pushInitialContext) { OpcodeBlock block2 = new OpcodeBlock(); block2.Append(new PushContextNodeOpcode()); block2.Append(block); block2.Append(new PopContextNodes()); return block2; } return block; }
internal virtual OpcodeBlock Compile(XPathExpr expr) { this.nestingLevel = 1; this.pushInitialContext = false; OpcodeBlock block = new XPathExprCompiler(this).Compile(expr); if (this.pushInitialContext) { OpcodeBlock block2 = new OpcodeBlock(); block2.Append(new PushContextNodeOpcode()); block2.Append(block); block2.Append(new PopContextNodes()); return(block2); } return(block); }
// 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); }
XPathExprCompiler(XPathExprCompiler xpathCompiler) { this.compiler = xpathCompiler.compiler; this.codeBlock = new OpcodeBlock(); }
OpcodeBlock CompileBlock(XPathExpr expr) { XPathExprCompiler compiler = new XPathExprCompiler(this); return(compiler.Compile(expr)); }