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

One closing parenthesis closes all parenthesis #340

Open
thebees86 opened this issue Aug 2, 2024 · 1 comment
Open

One closing parenthesis closes all parenthesis #340

thebees86 opened this issue Aug 2, 2024 · 1 comment
Milestone

Comments

@thebees86
Copy link

(This is a comment)
(This is a (nested comment))

One would assume that the above are both valid comments, but Satriani closes all parenthesis when it encounters one closing parenthesis, so the second comment is marked as invalid. While comments are discouraged in Rockstar, this behavior is not mentioned in the docs, and goes against the standard behavior of nested parenthesis.

A few examples from testing this on the official website are attached below.

image
image

@dylanbeattie
Copy link
Collaborator

You're right that this is not covered in the spec... I'll see if we can support nested parentheses in Rockstar 2, otherwise I'll update the docs to make it clear this isn't supported. (It requires stateful parsing which means maintaining a stack inside the parser to see how many comments deep you are, which isn't something that any other Rockstar feature currently requires, but I don't think it's that hard to implement.)

@dylanbeattie dylanbeattie added this to the 2.0 milestone Aug 5, 2024
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

2 participants