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

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

public class CallStatement
extends Statement

関数呼び出し文.

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

フィールドの概要
private  Call expression
          関数呼び出し(式)を格納.
 
クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド
parent
 
コンストラクタの概要
CallStatement(Node parent, Call expression, SourceReader sReader)
          関数式のインスタンス化.
 
メソッドの概要
 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
 

フィールドの詳細

expression

private Call expression
関数呼び出し(式)を格納.

コンストラクタの詳細

CallStatement

public CallStatement(Node parent,
                     Call expression,
                     SourceReader sReader)
              throws CompileError
関数式のインスタンス化. インスタンス化と同時に構文解析を行う.

パラメータ:
parent - 構文木の親ノード
expression - 関数式
sReader - トークン用リーダ.
例外:
CompileError
メソッドの詳細

emitCode

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

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