Skip to content

Miscallleneous stuff #27

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

Merged
merged 5 commits into from
Jul 19, 2021
Merged

Miscallleneous stuff #27

merged 5 commits into from
Jul 19, 2021

Conversation

gemelen
Copy link
Contributor

@gemelen gemelen commented Jul 3, 2021

Few changes to cover small gaps.
Most important is unit literal, required for for-expression even in naive implementation.

@gemelen
Copy link
Contributor Author

gemelen commented Jul 14, 2021

@maxbrunsfeld could you please have a look? (and also to #26)

Copy link
Contributor

@maxbrunsfeld maxbrunsfeld left a comment

Choose a reason for hiding this comment

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

This looks good. I just left one minor suggestion.

grammar.js Outdated
@@ -751,6 +755,14 @@ module.exports = grammar({
$._automatic_semicolon
),

null_literal: $ => token('null'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need the token() call around the string literal.

That function is only needed when you're using other rule-builder functions like seq/repeat/choice, and you want to tell Tree-sitter that the whole rule should be a single token. With a string literal, it's already a single token by default.

Remove redundant token fun call.
@maxbrunsfeld maxbrunsfeld merged commit f80daaa into tree-sitter:master Jul 19, 2021
@maxbrunsfeld
Copy link
Contributor

Thanks!

@gemelen gemelen deleted the feature/misc-stuff branch July 19, 2021 21:11
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