Skip to content

Look up for types in the assembly to be able to parse them from a string? #338

Description

@WhiteBlackGoose

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Opinions wantedWe are interested in your opinion about the topicProposalContribute to the project by proposing some improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions