-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat: add support for nested if and foreach #960
Draft
matteo-cristino
wants to merge
32
commits into
master
Choose a base branch
from
fix/if
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d a single if A small improvement have been done also since now after the first failing if the following one are no more executed
matteo-cristino
added
SKIP_JS
Add this label to PR for skip JS checks in CI
SKIP_RUST
Add this label to PR for skip RUST checks in CI
SKIP_PY
Add this label to PR for skip PY checks in CI
SKIP_GO
Add this label to PR for skip GO checks in CI
labels
Nov 9, 2024
now parser detect also opened but not closed if branching
This is a first draft, more test and improvements are needed
matteo-cristino
changed the title
feat: support nested if separated by other statements and a way to end a single if
feat: add support for nested if and foreach and a way to end a single if
Nov 13, 2024
skip also test for foreach zip, this will need a separated statement
skip all statements in the last (already not valid) loop
⚠ This is a breaking change! ⚠ Try also to simplify end events, to be see if this is a good choice or bring in some bugs! Time for testing
matteo-cristino
changed the title
feat: add support for nested if and foreach and a way to end a single if
feat: add support for nested if and foreach
Nov 14, 2024
…he if condition will not make the contract to fail fix also some more transitions
…se list, prime numbers, factorial) this can maybe serve as docs if we want to have a page in the docs where we challenge people with zencode exercises
checks are done only on the first loop and store some more data in iter object to avoid some calculations at each step
… when exeeding it add also tests for it
unfortunately this do not improve performance, but anyway code is cleaner for sure
…s to save lookup times
…ll to garbage collector (#969) * refactor: try to improve performance * ITER stack built at parse time * avoid string/regexp checks in manage functions by doing it in the parse part and just do a lookup in the latter * run manage functions only when needed * feat: on zencode run perform garbage collection only if memory being used is more than MAXMEM MAXMEM default value is 1024MB, but can be changed using the maxmem conf * fix: typo in default value of maxmem * docs: update config page remove some old and not anymore present config and add scope and maxmem, try also to improve description of other config.
* docs: add foreach to zenroom documentation * docs(foreach): rename some section title and add section on how to create the material in this page * docs(if): exlpain the new way in which the if and endif work
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚧 breaking changes:
EndIf
now closes only the last opened branchingIf
branch correctly propagate, only failing assertion in the if condition are captured and add to the stackForeach
now does not run anymore in parallel (zip), but as nested foreach✨ major features:
if
andforeach
maxmem
(default 1GB)