public AssertNode(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if ((fields & COMPILE_IMMEDIATE) != 0) { assertion = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx); } }
public IfNode setElseBlock(char[] block, int cursor, int offset, ParserContext ctx) { elseBlock = (ExecutableStatement) subCompileExpression(block, cursor, offset, ctx); return this; }
public DoUntilNode(char[] condition, char[] block, ParserContext pCtx) { expectType(this.condition = (ExecutableStatement) subCompileExpression(this.name = condition, pCtx), Boolean.class, ((fields & COMPILE_IMMEDIATE) != 0)); this.compiledBlock = (ExecutableStatement) subCompileExpression(this.block = block, pCtx); }
public Invert(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if ((fields & COMPILE_IMMEDIATE) != 0) { expectType(pCtx, this.stmt = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx), Integer.class, true); } }
public Invert(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if ((fields & COMPILE_IMMEDIATE) != 0) { expectType(pCtx, this.stmt = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx), Integer.class, true); } }
public Substatement(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if (((this.fields = fields) & COMPILE_IMMEDIATE) != 0) { this.egressType = (this.statement = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx)) .getKnownEgressType(); } }
public Substatement(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if (((this.fields = fields) & COMPILE_IMMEDIATE) != 0) { this.egressType = (this.statement = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx)) .getKnownEgressType(); } }
public ReturnNode(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if ((fields & COMPILE_IMMEDIATE) != 0) { setAccessor((Accessor) subCompileExpression(expr, start, offset, pCtx)); } }
public WhileNode(char[] expr, int start, int offset, int blockStart, int blockEnd, int fields, ParserContext pCtx) { super(pCtx); expectType(pCtx, this.condition = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx), Boolean.class, ((fields & COMPILE_IMMEDIATE) != 0)); if (pCtx != null) { pCtx.pushVariableScope(); } this.compiledBlock = (ExecutableStatement) subCompileExpression(expr, blockStart, blockEnd, pCtx); if (pCtx != null) { pCtx.popVariableScope(); } }
private void subCompile(String ex) { if (colType == null) { subCompileExpression(ex.toCharArray(), pCtx); } else { Class r = ((ExecutableStatement) subCompileExpression(ex.toCharArray(), pCtx)).getKnownEgressType(); if (!colType.isAssignableFrom(r) && (isStrongType() || !DataConversion.canConvert(r, colType))) { throw new CompileException("expected type: " + colType.getName() + "; but found: " + r.getName()); } } }
public UntilNode(char[] expr, int start, int offset, int blockStart, int blockOffset, int fields, ParserContext pCtx) { super(pCtx); expectType(pCtx, this.condition = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx), Boolean.class, ((fields & COMPILE_IMMEDIATE) != 0)); if (pCtx != null) { pCtx.pushVariableScope(); } this.compiledBlock = (ExecutableStatement) subCompileExpression(expr, blockStart, blockOffset, pCtx); if (pCtx != null) { pCtx.popVariableScope(); } }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { if (statement == null) statement = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx); factory.createVariable(name, ctx = statement.getValue(ctx, thisValue, factory), egressType); return ctx; }
private void subCompile(int start, int offset) { if (colType == null) { subCompileExpression(property, start, offset, pCtx); } else { Class r = ((ExecutableStatement) subCompileExpression(property, start, offset, pCtx)).getKnownEgressType(); if (r != null && !isAssignableFrom(colType, r) && (isStrongType() || !DataConversion.canConvert(r, colType))) { throw new CompileException("expected type: " + colType.getName() + "; but found: " + r.getName(), property, cursor); } } }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { if (statement == null) statement = (ExecutableStatement) subCompileExpression(stmt); factory.createVariable(name, ctx = statement.getValue(ctx, thisValue, factory), egressType); return ctx; }
public Negation(char[] expr, int start, int offset, int fields, ParserContext pCtx) { super(pCtx); this.expr = expr; this.start = start; this.offset = offset; if ((fields & COMPILE_IMMEDIATE) != 0) { if (((this.stmt = (ExecutableStatement) subCompileExpression(expr, start, offset, pCtx)).getKnownEgressType() != null) && (!ParseTools.boxPrimitive(stmt.getKnownEgressType()).isAssignableFrom(Boolean.class))) { throw new CompileException("negation operator cannot be applied to non-boolean type", expr, start); } } }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { if (statement == null) { statement = (ExecutableStatement) subCompileExpression(expr, this.start, this.offset, pCtx); acc = (CompiledAccExpression) compileSetExpression(property.toCharArray(), statement.getKnownEgressType(), pCtx); } acc.setValue(ctx, thisValue, factory, ctx = statement.getValue(ctx, thisValue, factory)); return ctx; }
public OperativeAssign(String variableName, char[] expr, int operation, int fields, ParserContext pCtx) { this.varName = variableName; this.operation = operation; this.name = expr; if ((fields & COMPILE_IMMEDIATE) != 0) { egressType = (statement = (ExecutableStatement) subCompileExpression(expr, pCtx)).getKnownEgressType(); if (pCtx.isStrongTyping()) { knownInType = ParseTools.__resolveType(egressType); } } }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { if (statement == null) { statement = (ExecutableStatement) subCompileExpression(expr, this.start, this.offset, pCtx); acc = (CompiledAccExpression) compileSetExpression(property.toCharArray(), statement.getKnownEgressType(), pCtx); } acc.setValue(ctx, thisValue, factory, ctx = statement.getValue(ctx, thisValue, factory)); return ctx; }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { if (accessor == null) { setAccessor((Accessor) subCompileExpression(expr, start, offset, pCtx)); } factory.setTiltFlag(true); return accessor.getValue(ctx, thisValue, new StackDemarcResolverFactory(factory)); }
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); } }