Skip to content

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
@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.

2 participants