Skip to content

Conversation

@watermarkhu
Copy link
Contributor

Fixes #45
Fixes #47
Fixes #52
Fixes #64

Switch statements are syntactically the same as if/elseif/else.

switch if
switch keyword if keyword
switch declaration if declaration
- if statements
case keyword elseif keyword
case declaration elseif declaration
case statements elseif statements
otherwise keyword else keyword
otherwise statements else statements
end keyword end keyword

This PR copies the implementation from #82 and replaces the tokens with the ones for switch.

Copy link
Member

@dklilley dklilley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this out quickly, and it works well!

@dklilley dklilley self-assigned this Jun 19, 2024
@dklilley dklilley added the CLA signed Indicates that the requester has signed the Contributor License Agreement label Jun 19, 2024
@dklilley dklilley merged commit 91205a3 into mathworks:master Jun 19, 2024
@dklilley
Copy link
Member

Thanks for making these changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA signed Indicates that the requester has signed the Contributor License Agreement

Projects

None yet

2 participants