-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fix JSON surrounding pairs #370
Conversation
f9a250c
to
277303e
Compare
@@ -0,0 +1,99 @@ | |||
import { SyntaxNode } from "web-tree-sitter"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved stuff out of index.ts
!ALLOWABLE_ANGLE_BRACKET_PARENTS.includes( | ||
delimiterNode.parent?.type! | ||
) | ||
inferDelimiterSide(delimiterNode) !== delimiterInfo.side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this approach will be more robust
- type: primitive | ||
modifier: {type: surroundingPair, delimiter: parentheses} | ||
initialState: | ||
documentContents: // (hello) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we support comments in json now because we fallback to text-based if we're in a parse-tree error node
Closes #364
Closes #355
<
if it has sibling that is>
?