Caster
Caster copied to clipboard
Loading of top-level rules other than MappingRule from the user directory
Caster currently complains and ignores a rule returned from the get_rule function, unless it is a subclass of MappingRule.
CompoundRule is really useful as a top-level rule when constructing nested rule references such as the following example. _spelling.txt
I would like to be able to have a top-level CompoundRule loaded from the user directory, to keep such custom rules neatly separated from the caster source code directory, while retaining the functionality such as hot-reloading, enabling/disabling via voice commands, etc.
@LexiconCode Is there anything fundamental about caster that requires MappingRule
s to be the only type of dragonfly
rule? Or could we just change the validation checkers?
@LexiconCode Is there anything fundamental about caster that requires
MappingRule
s to be the only type ofdragonfly
rule? Or could we just change the validation checkers?
I imagine it would take more than just simply bypass the validator's especially if CCR is involved. Being able to load dragonfly grammars like _spelling.py
from the user directory would be an alternative method.