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

java.lang.Object
  上位を拡張 org.oklab.compiler.syntaxtree.Node
      上位を拡張 org.oklab.compiler.syntaxtree.statement.Statement
          上位を拡張 org.oklab.compiler.syntaxtree.statement.Condition
直系の既知のサブクラス:
If, While

public abstract class Condition
extends Statement

ifやwhileなどの分岐の基盤となるクラス. 条件文と条件を満たした時に実行する文を含む.

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

フィールドの概要
protected  int condition
           
protected  Statement executeStatement
           
protected  Expression leftOperand
           
protected  Expression rightOperand
           
 
クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド
parent
 
コンストラクタの概要
Condition(Node parent, SourceReader sReader)
          条件式の構文解析を行い問題がなければ、インスタンスを生成する.問題がある場合は 例外を投げる.
 
メソッドの概要
 
クラス org.oklab.compiler.syntaxtree.statement.Statement から継承されたメソッド
emitCode
 
クラス 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
 

フィールドの詳細

condition

protected int condition

rightOperand

protected Expression rightOperand

leftOperand

protected Expression leftOperand

executeStatement

protected Statement executeStatement
コンストラクタの詳細

Condition

public Condition(Node parent,
                 SourceReader sReader)
          throws CompileError
条件式の構文解析を行い問題がなければ、インスタンスを生成する.問題がある場合は 例外を投げる.

パラメータ:
parent - 親ノード.
sReader - ソースコードリーダ.
例外:
CompileError - 条件文の構造が正しくない場合この例外が発生する.