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

bug: repeated string_content nodes #242

Closed
calebdw opened this issue May 16, 2024 · 0 comments · Fixed by #245
Closed

bug: repeated string_content nodes #242

calebdw opened this issue May 16, 2024 · 0 comments · Fixed by #245
Labels

Comments

@calebdw
Copy link
Collaborator

calebdw commented May 16, 2024

Describe the bug

@amaanq,

See related comment: #237 (comment)

Creating an issue so it doesn't get lost---the new string_content regex is creating a parse tree with repeated nodes (should just be a single node, see below for examples).

Perhaps this should be moved to the scanner? It solves the precedence and parse issues in one go...

Steps To Reproduce/Bad Parse Tree

'#([\w().,;]|[`]{1})$#'

              (string
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (string_content))

'#^([\w().,;]|\\\--[\w]|[]{1})#'

              (string
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (string_content)
                (escape_sequence)
                (string_content)
                (string_content))

Expected Behavior/Parse Tree

'#([\w().,;]|[`]{1})$#'

              (string
                (string_content))

'#^([\w().,;]|\\\--[\w]|[]{1})#'

              (string
                (string_content)
                (escape_sequence)
                (string_content))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant