mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 15:30:09 -08:00
Ensure PromotionManager clears its implementation cache.
This commit is contained in:
parent
e62722ce2f
commit
1f6aa70230
|
@ -64,6 +64,7 @@ public class Abacus {
|
||||||
|
|
||||||
pluginManager.addListener(shuntingYardParser);
|
pluginManager.addListener(shuntingYardParser);
|
||||||
pluginManager.addListener(lexerTokenizer);
|
pluginManager.addListener(lexerTokenizer);
|
||||||
|
pluginManager.addListener(promotionManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,7 +6,6 @@ import org.nwapw.abacus.plugin.PluginListener
|
||||||
import org.nwapw.abacus.plugin.PluginManager
|
import org.nwapw.abacus.plugin.PluginManager
|
||||||
import java.util.function.Function
|
import java.util.function.Function
|
||||||
|
|
||||||
class PromotionManager(val abacus: Abacus) {
|
|
||||||
/**
|
/**
|
||||||
* A class that handles promotions based on priority and the
|
* A class that handles promotions based on priority and the
|
||||||
* transition paths each implementation provides.
|
* transition paths each implementation provides.
|
||||||
|
@ -72,4 +71,13 @@ class PromotionManager(val abacus: Abacus) : PluginListener {
|
||||||
}.toTypedArray(), promotedTo = highestPriority)
|
}.toTypedArray(), promotedTo = highestPriority)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onLoad(manager: PluginManager?) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onUnload(manager: PluginManager?) {
|
||||||
|
computePaths.clear()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user