-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MATLAB switch statement support (#634)
## 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 <jastier@arizona.edu> 391786e
- Loading branch information
1 parent
0284c9c
commit 1cf0b48
Showing
1,109 changed files
with
123,986 additions
and
123,380 deletions.
There are no files selected for viewing
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
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
735 changes: 406 additions & 329 deletions
735
api/python/skema/program_analysis/CAST/matlab/matlab_to_cast.html
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.