Skip to content
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

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Conversation

itwillwork
Copy link
Contributor

Closes #ISSUE_ID

@itwillwork itwillwork changed the title feat(YQL): add tokenize method for yql feat(YQL): add tokenize method for YQL Jul 22, 2024
lexer.removeErrorListeners();
lexer.addErrorListener(errorListener);

const tokens: Array<Token> = [];
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added rule 4cf77fc

if (token === null || token.type === EOF) {
done = true;
} else {
const tokenName = symbolicNames[token.type] as string;
Copy link
Contributor

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()
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

@itwillwork itwillwork merged commit 8c2f69a into main Jul 23, 2024
4 checks passed
@itwillwork itwillwork deleted the add-tokenize-for-yql branch July 23, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants