zeek / spicy

C++ parser generator for dissecting protocols & files.
https://docs.zeek.org/projects/spicy
Other
243 stars 37 forks source link

Defer start of feature-dependent transformations to a later point. #1798

Closed bbannier closed 1 month ago

bbannier commented 1 month ago

We previously would evaluate whether a unit field or method was required by an optional feature before we had finished collecting all feature requirements. This behavior was fine when we were visiting individual modules' AST one by one, but breaks with #1462 were we changed using a single AST to hold all modules.

This patch defers transformations until all feature requirements have been collected.