X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java index 6b131d3..7050649 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Block.java @@ -1,5 +1,8 @@ package net.sourceforge.phpdt.internal.compiler.ast; +import net.sourceforge.phpdt.internal.compiler.ast.AstNode; + + /** * A Block is * { @@ -8,14 +11,27 @@ package net.sourceforge.phpdt.internal.compiler.ast; * @author Matthieu Casanova */ public class Block extends Statement { + + /** An array of statements inside the block. */ public Statement[] statements; + /** + * Create a block. + * @param statements the statements + * @param sourceStart starting offset + * @param sourceEnd ending offset + */ + public Block(Statement[] statements,int sourceStart, int sourceEnd) { + super(sourceStart, sourceEnd); + this.statements = statements; + } + public boolean isEmptyBlock() { return statements == null; } public String toString(int tab) { - final String s = tabString(tab); + final String s = AstNode.tabString(tab); final StringBuffer buff = new StringBuffer(s); if (this.statements == null) { buff.append("{\n"); //$NON-NLS-1$