chore(gen): add parser.c enum names to be better discoverable
This commit is contained in:
parent
fbfa58edc8
commit
b3fef28a10
1 changed files with 3 additions and 3 deletions
|
|
@ -338,7 +338,7 @@ impl Generator {
|
|||
}
|
||||
|
||||
fn add_symbol_enum(&mut self) {
|
||||
add_line!(self, "enum {{");
|
||||
add_line!(self, "enum ts_symbol_identifiers {{");
|
||||
indent!(self);
|
||||
self.symbol_order.insert(Symbol::end(), 0);
|
||||
let mut i = 1;
|
||||
|
|
@ -410,7 +410,7 @@ impl Generator {
|
|||
}
|
||||
|
||||
fn add_field_name_enum(&mut self) {
|
||||
add_line!(self, "enum {{");
|
||||
add_line!(self, "enum ts_field_identifiers {{");
|
||||
indent!(self);
|
||||
for (i, field_name) in self.field_names.iter().enumerate() {
|
||||
add_line!(self, "{} = {},", self.field_id(field_name), i + 1);
|
||||
|
|
@ -1026,7 +1026,7 @@ impl Generator {
|
|||
}
|
||||
|
||||
fn add_external_token_enum(&mut self) {
|
||||
add_line!(self, "enum {{");
|
||||
add_line!(self, "enum ts_external_scanner_symbol_identifiers {{");
|
||||
indent!(self);
|
||||
for i in 0..self.syntax_grammar.external_tokens.len() {
|
||||
add_line!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue