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

Add a @switch command to the control flow #313

Open
bob2517-whiteline opened this issue Jan 31, 2023 · 1 comment
Open

Add a @switch command to the control flow #313

bob2517-whiteline opened this issue Jan 31, 2023 · 1 comment
Assignees
Labels
docs to do Documentation still needs doing before this can get released enhancement New feature or request

Comments

@bob2517-whiteline
Copy link

Would be good to have this, and it would be more performant. Needs to work with break, continue, exit, etc.

@bob2517 bob2517 self-assigned this Mar 12, 2023
@bob2517 bob2517 added enhancement New feature or request proposal I've got a great idea! labels Mar 12, 2023
@bob2517
Copy link
Member

bob2517 commented Sep 30, 2023

Initial example syntax for this CSS-ified:

@switch ($var|expr) {
    @case 'Joan' {
    }
    @case $something, 'text', $somethingElse, jsExpression {
        @break;
    }
    @case 'Dave' {
    }
    @default {
    }
}

This statement would operate mostly like the JS switch statement. We shouldn't need additional case statements for the same result flow with a comma-delimited syntax.

@bob2517 bob2517 added this to the 2.16.0 milestone Jan 21, 2024
@bob2517 bob2517 added in progress This issue is currently being worked on docs to do Documentation still needs doing before this can get released and removed proposal I've got a great idea! labels Jan 21, 2024
@bob2517 bob2517 removed the in progress This issue is currently being worked on label Mar 3, 2024
@bob2517 bob2517 removed this from the 2.16.0 milestone Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs to do Documentation still needs doing before this can get released enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants