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

Add a simple example without Langium #59

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Lotes
Copy link
Collaborator

@Lotes Lotes commented Feb 4, 2025

I wrote a simple handwritten expression parser.

It has:

  • print outs like print 123;
  • variable declaration like var index = 123;
  • variable usage like print index+1;
  • binary expressions, like +, -, *, / and %
  • unary expressions, like + and -

It worked good so far, even the desired validations I get for free :-) .
Currently there is not much, that can go wrong. Only operators that are not overloaded like string * string cause troubles.

Maybe one of you has more ideas, what to add on top for testing or for language features.

For sure I can add parentheses expressions or assignments in order to make the language "round & sound".

In the end I just wanted to have something framework-agnostic and I think this was proven.

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

Successfully merging this pull request may close these issues.

2 participants