Skip to content

Update NOTE about ts_node_is_missing() support  #135

@DavisVaughan

Description

@DavisVaughan

With new insight from tree-sitter/tree-sitter#3332

tree-sitter-r/grammar.js

Lines 524 to 530 in 6c52336

// NOTE: Due to the linked tree-sitter bug, if `_identifier` and `_quoted_identifier`
// are their own hidden rules, then we can't detect implied `identifier`s as missing
// with `ts_node_is_missing()`, essentially making that function useless since
// tree-sitter seems to fill in named missing nodes with `identifier` most of the
// time. The workaround used here inlines the regexes, and wraps the `choice()` call
// in a single terminal `token()` so `identifier` can still be used as the `word` rule.
// https://github.com/tree-sitter/tree-sitter/issues/3332

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions