fix(parser): fix variadic macro
This commit is contained in:
parent
80dabf96c7
commit
78b6067a5d
2 changed files with 6 additions and 4 deletions
|
|
@ -1296,7 +1296,11 @@ impl Generator {
|
|||
production_id,
|
||||
..
|
||||
} => {
|
||||
add!(self, "REDUCE({}, {child_count}", self.symbol_ids[&symbol]);
|
||||
add!(
|
||||
self,
|
||||
"REDUCE(.symbol = {}, .child_count = {child_count}",
|
||||
self.symbol_ids[&symbol]
|
||||
);
|
||||
if dynamic_precedence != 0 {
|
||||
add!(self, ", .dynamic_precedence = {dynamic_precedence}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,12 +203,10 @@ struct TSLanguage {
|
|||
} \
|
||||
}}
|
||||
|
||||
#define REDUCE(symbol_val, child_count_val, ...) \
|
||||
#define REDUCE(...) \
|
||||
{{ \
|
||||
.reduce = { \
|
||||
.type = TSParseActionTypeReduce, \
|
||||
.symbol = symbol_val, \
|
||||
.child_count = child_count_val, \
|
||||
__VA_ARGS__ \
|
||||
}, \
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue