tree-sitter-teal
tree-sitter-teal copied to clipboard
More fields
As alluded to in #9, the parser could really do with more fields.
For example, the current record definition is
_record_def: $ => seq(
"record",
field("name", $.identifier),
optional($.typeargs),
$.record_body
),
The name is in a field, but the typeargs and body are not. This leads to some weird gymnastics, where you need to iterate over the child notes and check their kind instead of being able to just say "get me this field".