-
-
Notifications
You must be signed in to change notification settings - Fork 71
Incorrect parsing of (concatenation (simple_expansion) (word)) when word begins with }
#241
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
Comments
the snippet I originally discovered this with was testing snippet log(`node: ${node}`)
log(`node.type: ${node?.type}`)
log(`node.text: ${node?.text}`)
log(`node.startPosition.column: ${node?.startPosition.column}`)
log(`node.endPosition.column: ${node?.endPosition.column}`)
log(``)
for (let i = 0; i < node.childCount; i++) {
const child = node.child(i)
log(`child(${i}): ${child}`)
log(`child(${i}).type: ${child?.type}`)
log(`child(${i}).text: ${child?.text}`)
log(`child(${i}).startPosition.column: ${child?.startPosition.column}`)
log(`child(${i}).endPosition.column: ${child?.endPosition.column}`)
log(``)
}
|
You're correct. I'm sorry for wasting your time. |
no worries there are so many changes (and more coming soon!), that i cant blame them for not updating yet |
Given a snippet like
v=$hello}/world
(which assigns the value of hello, followed by the literal}/world
)It is parsed as this (using TSPlayground):
Assuming the concatenation node is stored in
concatNode
:Looking at the start and ending positions, it seems the
}
is mistakenly included in the simple_expansion, but somehow isn't included in it's text value (and shouldn't be!)The text was updated successfully, but these errors were encountered: