fix(generate): mark TSCharacterRange as static (#4255)
Problem: Linking different parsers into one executable fails due to duplicate symbols.
Solution: Mark `TSCharacterRange` as `static` when generating parsers.
fixes #4209
(cherry picked from commit 8138dba800)
This commit is contained in:
parent
6f2dbaab5f
commit
b1a7074010
1 changed files with 5 additions and 1 deletions
|
|
@ -1111,7 +1111,11 @@ impl Generator {
|
|||
return;
|
||||
}
|
||||
|
||||
add_line!(self, "const TSCharacterRange {}[] = {{", info.constant_name);
|
||||
add_line!(
|
||||
self,
|
||||
"static const TSCharacterRange {}[] = {{",
|
||||
info.constant_name
|
||||
);
|
||||
|
||||
indent!(self);
|
||||
for (ix, range) in characters.ranges().enumerate() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue