For example, I've defined my own entity in the assembly:
record DoubleSin(Entity Arg) : FunctionEntity
{
public string ParsableName { get; } = "double_sin";
...
}
Then, what if the parser could look up the types, inherited from FunctionEntity whose ParsableName equals the encountered string and if there exists one, create an instance of it? So that this
Entity expr = "double_sin(x) + x";
would be same as
Entity expr = new DoubleSin(x) + x;
For example, I've defined my own entity in the assembly:
Then, what if the parser could look up the types, inherited from
FunctionEntitywhoseParsableNameequals the encountered string and if there exists one, create an instance of it? So that thiswould be same as