refactor(parser): make REDUCE macro non-variadic
This commit is contained in:
parent
895c7680e7
commit
818cd8c291
2 changed files with 10 additions and 14 deletions
|
|
@ -203,12 +203,15 @@ struct TSLanguage {
|
|||
} \
|
||||
}}
|
||||
|
||||
#define REDUCE(...) \
|
||||
{{ \
|
||||
.reduce = { \
|
||||
.type = TSParseActionTypeReduce, \
|
||||
__VA_ARGS__ \
|
||||
}, \
|
||||
#define REDUCE(symbol_name, children, precedence, prod_id) \
|
||||
{{ \
|
||||
.reduce = { \
|
||||
.type = TSParseActionTypeReduce, \
|
||||
.symbol = symbol_name, \
|
||||
.child_count = children, \
|
||||
.dynamic_precedence = precedence, \
|
||||
.production_id = prod_id \
|
||||
}, \
|
||||
}}
|
||||
|
||||
#define RECOVER() \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue