docs: improve comment explaining empty node kind workaround in compatibility test
This commit is contained in:
parent
c19cce111f
commit
3bfbc00bc0
1 changed files with 3 additions and 1 deletions
|
|
@ -1278,7 +1278,9 @@ fn test_parser_and_node_types_compatibility(grammar_name: &str) {
|
|||
let kind = language.node_kind_for_id(i).unwrap();
|
||||
let named = language.node_kind_is_named(i);
|
||||
|
||||
// workaround maybe?
|
||||
// TODO: find a better way
|
||||
// In Go grammar, there is a node kind with an empty string.
|
||||
// In node-types.json, it is "\u0000" but in parser.c, it is "\0" and not distinguishable from "".
|
||||
let kind = if kind.is_empty() {
|
||||
"\0".to_string()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue