public WithAccessor(ParserContext pCtx, String property, char[] expr, int start, int offset, Class ingressType) { pCtx.setBlockSymbols(true); withExpressions = WithNode.compileWithExpressions(expr, start, offset, property, ingressType, pCtx); pCtx.setBlockSymbols(false); }
public int doBefore(ASTNode node, VariableResolverFactory factory) { ((WithNode) node).getNestedStatement().getValue(null, factory); System.out.println("fired update interceptor -- before"); result.firedBefore = true; return 0; }
return new DoUntilNode(expr, condStart, condOffset, blockStart, blockOffset, pCtx); default: return new WithNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
private void calculateModificationMask(KnowledgeHelper knowledgeHelper, WithNode node) { Class<?> nodeClass = node.getEgressType(); InternalRuleBase ruleBase = (InternalRuleBase)knowledgeHelper.getWorkingMemory().getRuleBase(); TypeDeclaration typeDeclaration = ruleBase.getTypeDeclaration(nodeClass);
return new DoUntilNode(expr, condStart, condOffset, blockStart, blockOffset, pCtx); default: return new WithNode(expr, condStart, condOffset, blockStart, blockOffset, fields, pCtx);
public WithAccessor(ParserContext pCtx, String property, char[] expr, int start, int offset, Class ingressType) { pCtx.setBlockSymbols(true); withExpressions = WithNode.compileWithExpressions(expr, start, offset, property, ingressType, pCtx); pCtx.setBlockSymbols(false); }
return new DoUntilNode(subArray(condStart, condEnd), subArray(blockStart, blockEnd), pCtx); default: return new WithNode(subArray(condStart, condEnd), subArray(blockStart, blockEnd), fields, pCtx);
public int doBefore(ASTNode node, VariableResolverFactory factory) { ((WithNode) node).getNestedStatement().getValue(null, factory); factory.createVariable("mod", "FOOBAR!"); return 0; }
public WithAccessor(String property, char[] block, Class ingressType, boolean strict) { ParserContext pCtx = getCurrentThreadParserContext(); pCtx.setBlockSymbols(true); withExpressions = WithNode.compileWithExpressions(block, property, ingressType, pCtx); // withExpressions = new ExecutablePairs[pvp.length]; // // for (int i = 0; i < pvp.length; i++) { // withExpressions[i] = new ExecutablePairs(pvp[i].getParm(), // (ExecutableStatement) subCompileExpression(pvp[i].getValue().toCharArray()), ingressType, pCtx); // } pCtx.setBlockSymbols(false); }
public int doBefore(ASTNode node, VariableResolverFactory factory) { ((WithNode) node).getNestedStatement().getValue(null, factory); factory.createVariable("mod", "FOOBAR!"); return 0; }
public WithNode(char[] expr, char[] block, int fields, ParserContext pCtx) { nestParm = createStringTrimmed(this.name = expr); this.block = block; if ((fields & COMPILE_IMMEDIATE) != 0) { pCtx.setBlockSymbols(true); egressType = (nestedStatement = (ExecutableStatement) subCompileExpression(nestParm.toCharArray(), pCtx)).getKnownEgressType(); withExpressions = compileWithExpressions(block, nestParm, egressType, pCtx); pCtx.setBlockSymbols(false); } }
public WithNode(char[] expr, int start, int offset, int blockStart, int blockOffset, int fields, ParserContext pCtx) { super(pCtx); nestParm = createStringTrimmed(this.expr = expr, this.start = start, this.offset = offset); this.blockStart = blockStart; this.blockOffset = blockOffset; if ((fields & COMPILE_IMMEDIATE) != 0) { pCtx.setBlockSymbols(true); egressType = (compiledBlock = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx)).getKnownEgressType(); withExpressions = compileWithExpressions(expr, blockStart, blockOffset, nestParm, egressType, pCtx); pCtx.setBlockSymbols(false); } }
public WithNode(char[] expr, int start, int offset, int blockStart, int blockOffset, int fields, ParserContext pCtx) { super(pCtx); nestParm = createStringTrimmed(this.expr = expr, this.start = start, this.offset = offset); this.blockStart = blockStart; this.blockOffset = blockOffset; if ((fields & COMPILE_IMMEDIATE) != 0) { pCtx.setBlockSymbols(true); egressType = (compiledBlock = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx)).getKnownEgressType(); withExpressions = compileWithExpressions(expr, blockStart, blockOffset, nestParm, egressType, pCtx); pCtx.setBlockSymbols(false); } }
this.returnType = ctx != null ? ctx.getClass() : null; for (WithNode.ParmValuePair aPvp : WithNode.compileWithExpressions(expr, start, cursor++ - start, root, ingressType, pCtx)) { assert debug("DUP"); mv.visitInsn(DUP);
this.returnType = ctx != null ? ctx.getClass() : null; for (WithNode.ParmValuePair aPvp : WithNode.compileWithExpressions(expr, start, cursor++ - start, root, ingressType, pCtx)) { assert debug("DUP"); mv.visitInsn(DUP);
this.returnType = ctx != null ? ctx.getClass() : null; for (WithNode.ParmValuePair aPvp : WithNode.compileWithExpressions(subset(expr, start, cursor++ - start), root, ingressType, pCtx)) { assert debug("DUP"); mv.visitInsn(DUP);