mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-09 08:55:20 +00:00
Ensure PromotionManager clears its implementation cache.
This commit is contained in:
@@ -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()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user