asc-community / asc-community/AngouriMath

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

Open
#338 1 comment 0 reactions 0 assignees View on GitHub
Opinions wanted Proposal
Dominant language
C#
Stars
831
Forks
79
Avg merge
3h 23m
Merged PRs (30d)
309

Description

For example, I've defined my own entity in the assembly:
```cs
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
```cs
Entity expr = "double_sin(x) + x";
```
would be same as
```cs
Entity expr = new DoubleSin(x) + x;
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.