-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support Tree-sitter MATLAB switch statement #561
Labels
CI
continuous integration and automated workflows
Code2FN
lang/MATLAB
Used for work related to MATLAB frontend
Comments
jastier
added
Code2FN
CI
continuous integration and automated workflows
lang/MATLAB
Used for work related to MATLAB frontend
labels
Oct 10, 2023
jastier
added a commit
that referenced
this issue
Nov 1, 2023
## MATLAB conditional logic added to CAST parser This PR fixes the if statement handler in `matlab_to_cast.py`. We now fully support `if elseif else` conditional logic of arbitrary depth in MATLAB. - One `if` statement is always included - Zero or more `elseif` clauses can be included - Zero or one `else` clause can be included ## Relevant issues Completes issue #593 Partially completes issue #561 --------- Co-authored-by: Joseph Astier <[email protected]> Co-authored-by: Vincent Raymond <[email protected]>
github-actions bot
added a commit
that referenced
this issue
Nov 1, 2023
## MATLAB conditional logic added to CAST parser This PR fixes the if statement handler in `matlab_to_cast.py`. We now fully support `if elseif else` conditional logic of arbitrary depth in MATLAB. - One `if` statement is always included - Zero or more `elseif` clauses can be included - Zero or one `else` clause can be included ## Relevant issues Completes issue #593 Partially completes issue #561 --------- Co-authored-by: Joseph Astier <[email protected]> Co-authored-by: Vincent Raymond <[email protected]> a66fba6
PR #634 resolves this issue and is up for review. |
jastier
added a commit
that referenced
this issue
Nov 13, 2023
## MATLAB switch statement support This PR adds Tree-sitter coverage of MATLAB switch statements. CI tests are also included. ``` matlab switch x case 1 n = 1; j = 1; case {3, three, 'three'} n = 3; case {{1, 2, 3,}, {7, 8, 9}} n = 6; otherwise n = 0; end ``` ## Relevant features - Switch statements are translated into CAST conditional logic - Multiple argument cases are reduced to single list inclusion test - Case arguments may be of differing datatypes (string, number, identifier) ## Related issues - Resolves issue #561 --------- Co-authored-by: Joseph Astier <[email protected]>
github-actions bot
added a commit
that referenced
this issue
Nov 13, 2023
## MATLAB switch statement support This PR adds Tree-sitter coverage of MATLAB switch statements. CI tests are also included. ``` matlab switch x case 1 n = 1; j = 1; case {3, three, 'three'} n = 3; case {{1, 2, 3,}, {7, 8, 9}} n = 6; otherwise n = 0; end ``` ## Relevant features - Switch statements are translated into CAST conditional logic - Multiple argument cases are reduced to single list inclusion test - Case arguments may be of differing datatypes (string, number, identifier) ## Related issues - Resolves issue #561 --------- Co-authored-by: Joseph Astier <[email protected]> 391786e
PR #634 has been merged into main, issue resolved and closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI
continuous integration and automated workflows
Code2FN
lang/MATLAB
Used for work related to MATLAB frontend
Support Tree-sitter parsing and unit testing of the MATLAB switch statement
Support CAST generation and validation testing of this code snippet:
The text was updated successfully, but these errors were encountered: