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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement break handling in switch statements #439

Closed
Lan2u opened this issue Jun 1, 2020 · 2 comments · Fixed by #451
Closed

Implement break handling in switch statements #439

Lan2u opened this issue Jun 1, 2020 · 2 comments · Fixed by #451
Assignees
Labels
enhancement New feature or request execution Issues or PRs related to code execution
Milestone

Comments

@Lan2u
Copy link

Lan2u commented Jun 1, 2020

Currently, the Switch Executable implementation at doesn't support break statements as part of a switch statement.

Example code

let a = "A";
let b = "B";
let c = "hi";
switch (c) {
    case 'hi':
        a = 'hi';
        break;
    case 'hi':
        b = 'hi';
        break;
}
console.log(a);
console.log(b);

The expected output is:
'hi'
'B'

Note that the code above won't work until issue #301 is also resolved.

@Lan2u Lan2u added the enhancement New feature or request label Jun 1, 2020
@Lan2u Lan2u mentioned this issue Jun 1, 2020
13 tasks
@HalidOdat HalidOdat added the execution Issues or PRs related to code execution label Jun 2, 2020
@Lan2u
Copy link
Author

Lan2u commented Jun 2, 2020

I can do this as an extension to PR #422

@Razican
Copy link
Member

Razican commented Jun 2, 2020

I can do this as an extension to PR #422

Sure, go ahead!

@Razican Razican added this to the v0.9.0 milestone Jun 6, 2020
@Razican Razican linked a pull request Jun 6, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants