-
Notifications
You must be signed in to change notification settings - Fork 396
MatchAs #147
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
MatchAs #147
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
…in Match node; 3. added corresponding unit tests Co-authored-by: Lucybean-hi <[email protected]> Co-authored-by: juliawgraham <[email protected]> Co-authored-by: Erica Fu <[email protected]>
will fix errors. |
We reran all of the CI tests for this PR and it all seems to pass |
Okay will check it. |
It looks several refactoring can be still applied before merging. As this is the blocker of a broader refactoring (#155), I will process it on behalf of you. |
MatchAs is implemented and tested
Overview
All of these produce the correct latex code when a user enters a wildcard case in a python match statement. A non-empty MatchAs case will invoke an error message.
Details
Added one new function to function_codegen.py
visit_MatchAs, if there is a wildcard, create an 'otherwise' case in latex, else throw error
Added two new test cases to function_codegen_test.py
test_matchvalue_matchas_wildcard, tests if an 'otherwise' case is created in latex
test_matchvalue_matchas_nonempty, tests if an error is thrown
References
#93
Blocked by
#146