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

Initial Evaluator implementation #31

Merged
merged 29 commits into from
Mar 1, 2023
Merged

Initial Evaluator implementation #31

merged 29 commits into from
Mar 1, 2023

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Feb 27, 2023

This change adds the initial implementation for the evaluator. This does not yet include any state tracking and just introduces handling for literals, array creation and indexing, tuples, ranges, and fail expressions. It demonstrates a pattern for execution, testing and error reporting that can be expanded upon in later PRs.

@swernli
Copy link
Collaborator Author

swernli commented Feb 28, 2023

I went ahead and included conditional expressions in this PR, that way the next PR can focus on introducing stateful expressions like variable bindings.

compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/tests.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/tests.rs Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
swernli and others added 2 commits February 28, 2023 10:19
Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com>
compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Show resolved Hide resolved
compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/val.rs Outdated Show resolved Hide resolved
compiler/qsc_eval/src/lib.rs Show resolved Hide resolved
Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com>
compiler/qsc_eval/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com>
@swernli swernli merged commit 7c88ba6 into main Mar 1, 2023
@swernli swernli deleted the swernli/eval branch March 1, 2023 20:24
@swernli swernli mentioned this pull request Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants