Skip to content

feat: implementation of while loops, ignore operator, scopes and selector #73

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

Merged
merged 29 commits into from
May 26, 2025

Conversation

vanilla-extracts
Copy link
Owner

@vanilla-extracts vanilla-extracts commented May 24, 2025

Selector operator

> [1, 2, 3].0
1

While loops

while CONDITION
do STUFF

Ignore operator and block

{
  x = x+1;
  x
}

returns the value of x AFTER having done the first operation

together for example

x = 0;
while x<5
do {
  x=x+1;
  x
}

returns

1
2
3
4
5

@vanilla-extracts vanilla-extracts self-assigned this May 24, 2025
@vanilla-extracts vanilla-extracts added the enhancement New feature or request label May 24, 2025
@vanilla-extracts vanilla-extracts changed the title feat: implementation of while loops feat: implementation of while loops, ignore operator, and block May 25, 2025
@vanilla-extracts
Copy link
Owner Author

@leana8959 I put the implementation of the ; (ignore) operator here.
Currently the ; operator is an INFIX operator

Ignore {
  lhs: Ast
  rhs: Ast
}

Which at interpretation executes lhs and returns rhs.

precedence: make everything on a 100 basis to be able to insert things
everything works but not assignment, why?
@vanilla-extracts vanilla-extracts changed the title feat: implementation of while loops, ignore operator, and block feat: implementation of while loops, ignore operator, scopes and selector May 26, 2025
@vanilla-extracts vanilla-extracts merged commit 48d4d2f into mistress May 26, 2025
16 checks passed
@vanilla-extracts vanilla-extracts deleted the while_loops branch May 26, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants