private int runInternal( CompilingEnvironment environment, ByteCodeWriter writer, List<Value> statement, ICompiler compiler, int position) throws ByteScriptSyntaxException { int start = position; boolean needsScopePush = false; LinkedList<Value> params = new LinkedList<Value>(); if (statement.get(position).getValueAsString().equals("{")) { position += CompileUtil.getMatchingParas(position, statement, params, "{", "}"); needsScopePush = true; } else { position += CompileUtil.getUntilMatch(position, statement, params, ";"); } if (needsScopePush) { writer.writePushStack(false); } try { compiler.compile(params, writer, environment, 0); } catch (Exception ex) { throw new ByteScriptSyntaxException("unable to compile sub scope of else statement", ex); } if (needsScopePush) { writer.writePopStack(false); } return position - start; }