Ensure "extras" symbols are included in the node-types.json file
The symbols marked as "extras" are the start symbols of secondary languages. These should be included in the aliases map just as done for start symbol of the main language to ensure their node type and field information is included in the node-types.json file.
This commit is contained in:
parent
1992734195
commit
f07dda692e
1 changed files with 8 additions and 0 deletions
|
|
@ -424,6 +424,14 @@ pub(crate) fn generate_node_types_json(
|
|||
aliases
|
||||
});
|
||||
}
|
||||
for extra_symbol in &syntax_grammar.extra_symbols {
|
||||
if !simple_aliases.contains_key(extra_symbol) {
|
||||
aliases_by_symbol
|
||||
.entry(*extra_symbol)
|
||||
.or_insert(HashSet::new())
|
||||
.insert(None);
|
||||
}
|
||||
}
|
||||
for variable in &syntax_grammar.variables {
|
||||
for production in &variable.productions {
|
||||
for step in &production.steps {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue