Module org.kink_lang.kink
Class DeparenOptimizer
java.lang.Object
org.kink_lang.kink.internal.program.itree.SkeltonItreeVisitor<Itree>
org.kink_lang.kink.internal.program.itreeoptimize.BaseOptimizer
org.kink_lang.kink.internal.program.itreeoptimize.DeparenOptimizer
- All Implemented Interfaces:
Function<Itree,
,Itree> UnaryOperator<Itree>
,ItreeVisitor<Itree>
Reduces a one step seq to an expression, removing the parentheses.
This optimizer itself does no good for performance, but it enables further optimizations.
-
Constructor Summary
-
Method Summary
Methods inherited from class org.kink_lang.kink.internal.program.itreeoptimize.BaseOptimizer
apply
Methods inherited from class org.kink_lang.kink.internal.program.itree.SkeltonItreeVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Constructor Details
-
DeparenOptimizer
public DeparenOptimizer()
-
-
Method Details
-
visit
Description copied from interface:ItreeVisitor
Visits a seq itree.- Specified by:
visit
in interfaceItreeVisitor<Itree>
- Overrides:
visit
in classSkeltonItreeVisitor<Itree>
- Parameters:
seq
- the seq itree.- Returns:
- the result.
-