public class DefaultASTFactory extends Object implements ASTFactory
ASTFactory
interface.
This is used in the test suites to create ASTs in a manner which is
decoupled from the actual AST constructors.Modifier and Type | Field and Description |
---|---|
static DefaultASTFactory |
DEFAULT |
Constructor and Description |
---|
DefaultASTFactory() |
Modifier and Type | Method and Description |
---|---|
AST |
makeDivNode(AST left,
AST right) |
AST |
makeLiteral(int value) |
AST |
makeMinusNode(AST left,
AST right) |
AST |
makePlusNode(AST left,
AST right) |
AST |
makeTimesNode(AST left,
AST right) |
AST |
makeUnaryMinusNode(AST inner) |
public static final DefaultASTFactory DEFAULT
public AST makeLiteral(int value)
makeLiteral
in interface ASTFactory
public AST makePlusNode(AST left, AST right)
makePlusNode
in interface ASTFactory
public AST makeMinusNode(AST left, AST right)
makeMinusNode
in interface ASTFactory
public AST makeTimesNode(AST left, AST right)
makeTimesNode
in interface ASTFactory
public AST makeDivNode(AST left, AST right)
makeDivNode
in interface ASTFactory
public AST makeUnaryMinusNode(AST inner)
makeUnaryMinusNode
in interface ASTFactory