Skip to content

Commit

Permalink
refactor(AST): introduce AstVisitor trait
Browse files Browse the repository at this point in the history
The AST-Visitor trait allows generic visiting of AST-nodes. A default
Walking behavior is implemented for each AstStatement but it can be
altered by any implementor. When overriding a visit_XXX method, the
implementation can decide to continue with the default walking behavior
(by calling the walk function on the passed AstStatement-Struct, to skip it,
or to continue with an alternative walking bahavior.
  • Loading branch information
riederm committed May 31, 2024
1 parent 38b5b3c commit 6d6a228
Show file tree
Hide file tree
Showing 4 changed files with 735 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/plc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pub mod control_statements;
pub mod literals;
mod pre_processor;
pub mod provider;
pub mod visitor;
Loading

0 comments on commit 6d6a228

Please sign in to comment.