-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(YQL): add tokenize method for YQL #205
Conversation
src/autocomplete/shared/tokenize.ts
Outdated
lexer.removeErrorListeners(); | ||
lexer.addErrorListener(errorListener); | ||
|
||
const tokens: Array<Token> = []; |
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.
let's use Token[]
syntax pls for consistency
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.
added rule 4cf77fc
src/autocomplete/shared/tokenize.ts
Outdated
if (token === null || token.type === EOF) { | ||
done = true; | ||
} else { | ||
const tokenName = symbolicNames[token.type] as string; |
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.
better to check if such value exists in object rather than assert it
if (tokenName) {
tokens.push()
}
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.
agree
Closes #ISSUE_ID