tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter
MIT License
350 stars 98 forks source link

Add enum member support to tags.scm #167

Closed rnkaufman closed 6 months ago

rnkaufman commented 1 year ago

Adds a tag for enum members. Currently using the semantic name definition.class since it's already being used for enum_item and seems to most closely align with this property when choosing from the current capture names.

We discussed potentially adding a few new capture names that would better represent algebraic data types and enums, ie. definition.case or definition.constructor for enum_variant and definition.adt or definition.enum for enum_item. Opening this PR to continue the conversation here.

cc @tree-sitter/semantic-code

amaanq commented 6 months ago

closing as stale