org.oklab.compiler.syntaxtree.statement
クラス While

java.lang.Object
  上位を拡張 org.oklab.compiler.syntaxtree.Node
      上位を拡張 org.oklab.compiler.syntaxtree.statement.Statement
          上位を拡張 org.oklab.compiler.syntaxtree.statement.Condition
              上位を拡張 org.oklab.compiler.syntaxtree.statement.While

public class While
extends Condition

while文. 親クラスのConditionのコンストラクタが構文解析を行っている.

導入されたバージョン:
1.0
バージョン:
1.0
作成者:
Satoshi Okita satoshiokita@gmail.com
関連項目:
Condition

フィールドの概要
 
クラス org.oklab.compiler.syntaxtree.statement.Condition から継承されたフィールド
condition, executeStatement, leftOperand, rightOperand
 
クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド
parent
 
コンストラクタの概要
While(Node parent, SourceReader sReader)
          Creates a new instance of If
 
メソッドの概要
 boolean emitCode(CodeBufferManager code)
          バイトコードの出力を行う.
 
クラス org.oklab.compiler.syntaxtree.Node から継承されたメソッド
getReturnType, localVariableCount, parseExpression, parseFactor, parseRefferenceOrCall, parseStatement, parseTerm, setParent
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

While

public While(Node parent,
             SourceReader sReader)
      throws CompileError
Creates a new instance of If

例外:
CompileError
メソッドの詳細

emitCode

public boolean emitCode(CodeBufferManager code)
                 throws CompileError
クラス Statement の記述:
バイトコードの出力を行う.

定義:
クラス Statement 内の emitCode
パラメータ:
code - 出力先のバッファ領域.
戻り値:
Return文の時はtrueを返す.その他の文の場合はfalseを返す. これにより、その文の後に更に文を書けるかどうか判断する.
例外:
CompileError - コードを出力できなかった場合にこの例外を出力する.