Skip to content

Refactor C#-defined command system #157

Open
@ForNeVeR

Description

For now, when defining a command in C# code, I need to add it to two places:

  1. TexFormulaParser.commands hash set.
  2. 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:

  1. We need to declare one command dictionary, no name duplication should ever be used.
  2. Create a TexCommand class and allow the implementation to deal with parsed arguments etc.
  3. Add an external RegisterCommand API for our users to define their own commands in C#.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions