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>
- Loading branch information