Return ControlFlow
from AST visitor methods
#14
Labels
A-parser
Area: parsing source code to an AST
C-enhancement
Category: an issue proposing an enhancement or a PR with one
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
P-medium
Medium priority
Currently AST visitors do not return anything, whereas it would be beneficial to return a
ControlFlow
value, with the associated break type defined by implementors. By default, all functions should always returnContinue(())
, and implementors may choose to break early.https://github.com/paradigmxyz/sulk/blob/5f827dd5a0fed12f8e57c48ac60e371b98d921a3/crates/ast/src/visit.rs#L7-L10
The text was updated successfully, but these errors were encountered: