-
Notifications
You must be signed in to change notification settings - Fork 4
Improve module interface of stevia_ast #17
Copy link
Copy link
Open
Labels
A-astTask operating on the stevia_ast crate in isolation.Task operating on the stevia_ast crate in isolation.B-enhancementAn enhancement or new feature.An enhancement or new feature.D-hardA task that is considered to be hard to implement.A task that is considered to be hard to implement.
Metadata
Metadata
Assignees
Labels
A-astTask operating on the stevia_ast crate in isolation.Task operating on the stevia_ast crate in isolation.B-enhancementAn enhancement or new feature.An enhancement or new feature.D-hardA task that is considered to be hard to implement.A task that is considered to be hard to implement.
Currently the
stevia_astmodule interface is extremely polluted because every item is exported on global scope. Only the actualexpressionitems have their own module.We could need further modules to separate functionality:
type: For types and handling types and errors around typing issues.transformer: For the AST transformer interfaces and utilities.checks: For (general purpose) checks of the AST invariants.iter: For iteration methods and structures over the AST.utils: We also might need a utilities module for everything that acts as convenience or ... utility.Also the
exprsub module should receive anotherutilsmodule where all the helper structures likeBinaryChildrenare located.