io.shmilyhe.convert.ast.Program Maven / Gradle / Ivy
package io.shmilyhe.convert.ast;
import java.util.ArrayList;
import java.util.List;
import io.shmilyhe.convert.ast.statement.Statement;
/**
* Abstract Syntax Tree
*
*/
public class Program {
private String name;
protected List body;
public String getName() {
return name;
}
public Program setName(String name) {
this.name = name;
return this;
}
public List getBody() {
return body;
}
public Program setBody(List body) {
this.body = body;
return this;
}
public Program addStatement(Statement stat){
if(body==null){
body=new ArrayList<>();
}
body.add(stat);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy