Skip to content

Conversation

erica-w-fu
Copy link
Contributor

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

@erica-w-fu erica-w-fu requested a review from odashi as a code owner December 4, 2022 22:03
@google-cla
Copy link

google-cla bot commented Dec 4, 2022

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.

@odashi odashi added the feature label Dec 7, 2022
@odashi odashi added this to the v0.3 milestone Dec 7, 2022
…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]>
@odashi
Copy link
Collaborator

odashi commented Dec 9, 2022

will fix errors.

@juliawgraham
Copy link
Contributor

We reran all of the CI tests for this PR and it all seems to pass

@odashi
Copy link
Collaborator

odashi commented Dec 9, 2022

Okay will check it.

@odashi
Copy link
Collaborator

odashi commented Dec 9, 2022

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.

@odashi odashi merged commit 9e0f77f into google:main Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants