Skip to content

Commit 4b93326

Browse files
committed
Don't generate primary states array if it will be unused due to abi version setting
1 parent 621eb04 commit 4b93326

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/src/generate/render.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ impl Generator {
113113
}
114114

115115
self.add_non_terminal_alias_map();
116-
self.add_primary_state_id_list();
116+
117+
if self.abi_version >= ABI_VERSION_WITH_PRIMARY_STATES {
118+
self.add_primary_state_id_list();
119+
}
117120

118121
let mut main_lex_table = LexTable::default();
119122
swap(&mut main_lex_table, &mut self.main_lex_table);

0 commit comments

Comments
 (0)