Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default case to switch statements #126

Merged
merged 3 commits into from
Oct 27, 2023
Merged

Add default case to switch statements #126

merged 3 commits into from
Oct 27, 2023

Conversation

kaidesu
Copy link
Member

@kaidesu kaidesu commented Oct 27, 2023

What does this implement or fix?

Added

  • Added ability to define a default case to switch statements
  • Added parser tests for switch statements
switch(value) {
  case true {
    // handle true case
  }

  case false {
    // handle false case
  }

  default {
    // handle default case
  }
}

Additional Notes

Thanks to @skx and skx/monkey#71 for an example on an implementation 馃憤馃徎

@kaidesu kaidesu merged commit 270e246 into 1.0 Oct 27, 2023
1 check passed
@kaidesu kaidesu deleted the feature/switch-default branch October 27, 2023 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant