-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
(CPP) Declaring multiple variables with parentheticals treated as invalid #3148
Comments
Probably because it's impossible to pattern match and know for sure WHAT it is. The first part is probably matching as a function then it doesn't know what to do with the rest. It's not really a function at all, though I'm not sure we'd be able to tell otherwise. The simple fix here might be to just add |
You probably should. See the thread I just posted. I think the use cases for illegals (outside our internal use for auto-detection) are pretty slim. |
@edemaine Want to make an attempt at a PR? |
Sure. |
Declaring multiple variadic variables with initializers generates an invalid error.
Example code (which Github also seems to highlight inconsistently):
Highlight.js 10.4.0 and 10.7.2 generate an
Illegal lexeme "," for mode "function"
error. Direct reproduction:Issue #2917 seems related, and perhaps this has a similarly easy fix.
On the plus side, I just learned about the
ignoreIllegals
setting, so I'll probably just switch to using that in my context.The text was updated successfully, but these errors were encountered: