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

Use node type constants #11

Merged
merged 3 commits into from
Jan 11, 2025
Merged

Use node type constants #11

merged 3 commits into from
Jan 11, 2025

Conversation

valtzu
Copy link
Owner

@valtzu valtzu commented Jan 1, 2025

Using node.type.id instead of node.name means

  1. we can use constants (from syntax.grammar.terms) instead of arbitrary strings + use node.type.is(...) method
  2. we don't have to compare strings, which may improve performance (not benchmarked)

@valtzu valtzu force-pushed the node-type-constants branch from ecc541f to f322d46 Compare January 2, 2025 00:52
@valtzu valtzu force-pushed the node-type-constants branch from f322d46 to 57d753a Compare January 11, 2025 18:25
@valtzu valtzu merged commit e479595 into main Jan 11, 2025
1 check passed
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.

1 participant