|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.oklab.compiler.syntaxtree.Node
org.oklab.compiler.syntaxtree.statement.Statement
org.oklab.compiler.syntaxtree.statement.Substitute
public class Substitute
代入文.
| フィールドの概要 | |
|---|---|
private Variable |
destination
格納先変数.代入文の左辺. |
private Expression |
source
代入文の右辺. |
| クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド |
|---|
parent |
| コンストラクタの概要 | |
|---|---|
Substitute(Node parent,
Variable destination,
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 |
| フィールドの詳細 |
|---|
private Variable destination
private Expression source
| コンストラクタの詳細 |
|---|
public Substitute(Node parent,
Variable destination,
SourceReader sReader)
throws CompileError
parent - 親ノード.destination - 代入先.sReader - ソースコードリーダ.
CompileError - 構文解析に失敗したらこの例外を投げる.| メソッドの詳細 |
|---|
public boolean emitCode(CodeBufferManager code)
throws CompileError
Statement の記述:
Statement 内の emitCodecode - 出力先のバッファ領域.
Return文の時はtrueを返す.その他の文の場合はfalseを返す.
これにより、その文の後に更に文を書けるかどうか判断する.
CompileError - コードを出力できなかった場合にこの例外を出力する.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||