You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we are working on improving our content assist therefore we want to figure out if the current keyword is followed
by another keyword in the grammar.
i have found these variants to seem working
const xStream = AstUtils.streamContents(keyword.$container, { range: keyword.$cstNode?.range })
const next = xStream.tail().head() // does not always seem to work
if (GrammarAST.isKeyword(next)) {
consecutiveKeywordValue = next.value
}
if (keyword.$containerProperty !== undefined && keyword.$containerIndex !== undefined) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
const next = (keyword.$container as any)[keyword.$containerProperty][keyword.$containerIndex + 1]
if (GrammarAST.isKeyword(next)) {
consecutiveKeywordValue = next.value
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
we are working on improving our content assist therefore we want to figure out if the current keyword is followed
by another keyword in the grammar.
i have found these variants to seem working
is there a way to make this "nice"
Beta Was this translation helpful? Give feedback.
All reactions