while.java

来自「tinyos最新版」· Java 代码 · 共 68 行

JAVA
68
字号
// Autogenerated AST nodepackage org.python.parser.ast;import org.python.parser.SimpleNode;import java.io.DataOutputStream;import java.io.IOException;public class While extends stmtType {    public exprType test;    public stmtType[] body;    public stmtType[] orelse;    public While(exprType test, stmtType[] body, stmtType[] orelse) {        this.test = test;        this.body = body;        this.orelse = orelse;    }    public While(exprType test, stmtType[] body, stmtType[] orelse,    SimpleNode parent) {        this(test, body, orelse);        this.beginLine = parent.beginLine;        this.beginColumn = parent.beginColumn;    }    public String toString() {        StringBuffer sb = new StringBuffer("While[");        sb.append("test=");        sb.append(dumpThis(this.test));        sb.append(", ");        sb.append("body=");        sb.append(dumpThis(this.body));        sb.append(", ");        sb.append("orelse=");        sb.append(dumpThis(this.orelse));        sb.append("]");        return sb.toString();    }    public void pickle(DataOutputStream ostream) throws IOException {        pickleThis(14, ostream);        pickleThis(this.test, ostream);        pickleThis(this.body, ostream);        pickleThis(this.orelse, ostream);    }    public Object accept(VisitorIF visitor) throws Exception {        return visitor.visitWhile(this);    }    public void traverse(VisitorIF visitor) throws Exception {        if (test != null)            test.accept(visitor);        if (body != null) {            for (int i = 0; i < body.length; i++) {                if (body[i] != null)                    body[i].accept(visitor);            }        }        if (orelse != null) {            for (int i = 0; i < orelse.length; i++) {                if (orelse[i] != null)                    orelse[i].accept(visitor);            }        }    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?