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

Can't parse switch statements inside switch statements #1

Open
rewong03 opened this issue Jul 5, 2022 · 0 comments
Open

Can't parse switch statements inside switch statements #1

rewong03 opened this issue Jul 5, 2022 · 0 comments

Comments

@rewong03
Copy link
Collaborator

rewong03 commented Jul 5, 2022

dump_to_ast.py can parse top level switch statements but it fails if switch statements are nested inside other switch statements. In general switch statements are a pain to parse, because single-token keywords like "case", "default", "break", etc. aren't recognized as root tokens, so you manually have to traverse through the tokens to identify them. Check out this test for an example of a nested switch which isn't properly parsed

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

No branches or pull requests

1 participant