Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error in Functions #140

Open
Alisis33 opened this issue Jun 5, 2022 · 3 comments
Open

Syntax error in Functions #140

Alisis33 opened this issue Jun 5, 2022 · 3 comments
Assignees

Comments

@Alisis33
Copy link

Alisis33 commented Jun 5, 2022

The evaluator not throw a exeption it too many parameters ar given.

Sin(1,2,3,4)

(Similar to Sign error 1 * ---+-+-2)

@Alisis33
Copy link
Author

There are more such bugs...

I was very surprised to see that the evaluator not uses a parser.
I think it would greatly profit from one.
You can manage syntax way easier, and jump around the tree for loops etc.
The code now is to complex for me to help with bugfixes.

(It must not be a 1 file project, you could manage code easier if it would be splitted (node lexer parser definitions etc.) You can combine them easy with a regex for a 1 file version)

@Alisis33
Copy link
Author

I see now #58...

I coded such a parser once, only for math expresions. But it was at the beginning of my c# lerning, so the code is terrible and I can not but it in to public.

But I can sey, your project would greatly benefit from a tree parser.
I don't even know how you get it done without. I found this project in the hope I could replace my old code.

Hope you can upgrade it. You will need then less code and coplexity.

@lofcz
Copy link
Contributor

lofcz commented Jun 19, 2022

@Alisis33 feel free to check https://github.com/WattleScript/wattlescript. Currently I'm working on gradual typing, help is welcome :)
Syntax is described in wiki proposals & tests
EE is great (and I love one file/minimal dependencies way it works) but due to its nature it doesn't scale well.

@codingseb in case you'd be interested we would definitely welcome your contributions as well <3

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

No branches or pull requests

3 participants