forked from JavaTX/JavaCompilerCore
28 lines
687 B
Java
28 lines
687 B
Java
package de.dhbwstuttgart.syntaxtree.statement;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import org.antlr.v4.runtime.Token;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
|
import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder;
|
|
|
|
public class Block extends Statement {
|
|
public Block(List<Statement> statements, Token offset) {
|
|
super(TypePlaceholder.fresh(offset), offset);
|
|
this.statements = statements;
|
|
}
|
|
|
|
public List<Statement> statements = new ArrayList<>();
|
|
|
|
public List<Statement> getStatements() {
|
|
return statements;
|
|
}
|
|
|
|
@Override
|
|
public void accept(StatementVisitor visitor) {
|
|
visitor.visit(this);
|
|
}
|
|
}
|