|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.oklab.compiler.syntaxtree.Node
org.oklab.compiler.syntaxtree.statement.Statement
org.oklab.compiler.syntaxtree.statement.BlockStatement
public class BlockStatement
このクラスは、ブロックを保持する.ブロックとは{}で囲まれた部分で、メソッドの 内部などである.
Block| フィールドの概要 | |
|---|---|
private Block |
block
|
| クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド |
|---|
parent |
| コンストラクタの概要 | |
|---|---|
BlockStatement(Node parent,
SourceReader sReader)
構文木にブロックを紐付けて、 Blockに構文解析を依頼して構造を保持する. |
|
| メソッドの概要 | |
|---|---|
boolean |
emitCode(CodeBufferManager code)
Blockにバイトコード生成を依頼する. |
| クラス 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 Block block
| コンストラクタの詳細 |
|---|
public BlockStatement(Node parent,
SourceReader sReader)
throws CompileError
Blockに構文解析を依頼して構造を保持する.
parent - 親ノード.sReader - ソースコードリーダ.
CompileError - 構文解析に失敗した時に発生.| メソッドの詳細 |
|---|
public boolean emitCode(CodeBufferManager code)
throws CompileError
Blockにバイトコード生成を依頼する.
Statement 内の emitCodecode - バイトコード保持領域.
Return文の時はtrueを返す.その他の文の場合はfalseを返す.
これにより、その文の後に更に文を書けるかどうか判断する.
CompileError - バイトコード生成に失敗した時に発生.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||