Open
Description
For now, when defining a command in C# code, I need to add it to two places:
TexFormulaParser.commands
hash set.TexFormulaParser.ProcessCommand
method.
It looks like a lot of duplication comes from this, and also this system is not user-extendable.
What I imagine is the following:
- We need to declare one command dictionary, no name duplication should ever be used.
- Create a
TexCommand
class and allow the implementation to deal with parsed arguments etc. - Add an external
RegisterCommand
API for our users to define their own commands in C#.
Activity