Allow parentheses around ffi.cdef expressions#22
Draft
creationix wants to merge 3 commits intoLuaLS:masterfrom
Draft
Allow parentheses around ffi.cdef expressions#22creationix wants to merge 3 commits intoLuaLS:masterfrom
creationix wants to merge 3 commits intoLuaLS:masterfrom
Conversation
Author
|
I'm not sure how to test this PR. I was able to checkout the repo and run the build script locally which also updated |
creationix
commented
Jan 9, 2025
| "<node_internals>/**" | ||
| ], | ||
| "program": "${workspaceFolder}\\build\\build.js", | ||
| "program": "${workspaceFolder}/build/build.js", |
Author
There was a problem hiding this comment.
This is required for this to work on linux or osx, it should still function on windows as node.js fs operations support unix style paths on windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The highlighter has really convenient support for embedded C code when it sees the
ffi.cdef [[ ... ]pattern, but some codebase styles (including the default in stylua), enforce parentheses around the multiline string which causes the rule to not match.Solution
Tweak the regexps to allow optional parentheses around the multiline string.