Class BaseVisitor
- java.lang.Object
-
- io.github.applecommander.bastools.api.optimizations.BaseVisitor
-
- All Implemented Interfaces:
Visitor
- Direct Known Subclasses:
ExtractConstantValues
,MergeLines
,RemoveEmptyStatements
,RemoveRemStatements
,Renumber
,ShortenVariableNames
public class BaseVisitor extends java.lang.Object implements Visitor
Common base class for optimization visitors that allow the program tree to be rewritten. Note that#reassignments
is used to track line number movement and is automatically applied at the end of the program visit.
-
-
Field Summary
Fields Modifier and Type Field Description protected Program
newProgram
protected java.util.Map<java.lang.Integer,java.lang.Integer>
reassignments
-
Constructor Summary
Constructors Constructor Description BaseVisitor()
-
-
-
Field Detail
-
reassignments
protected java.util.Map<java.lang.Integer,java.lang.Integer> reassignments
-
newProgram
protected Program newProgram
-
-