Skip to content

Commit 77c791d

Browse files
authored
feat(init): function support (#1285)
* add lowering stage after annotation stage * add support for function-local variable initializations
1 parent 5d32f38 commit 77c791d

File tree

73 files changed

+2521
-1090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2521
-1090
lines changed

compiler/plc_ast/src/ast.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ pub enum PouType {
256256
Action,
257257
Class,
258258
Method { owner_class: String },
259+
Init,
259260
}
260261

261262
impl Display for PouType {
@@ -267,6 +268,7 @@ impl Display for PouType {
267268
PouType::Action => write!(f, "Action"),
268269
PouType::Class => write!(f, "Class"),
269270
PouType::Method { .. } => write!(f, "Method"),
271+
PouType::Init => write!(f, "Init"),
270272
}
271273
}
272274
}

compiler/plc_ast/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
pub mod ast;
66
pub mod control_statements;
77
pub mod literals;
8+
pub mod mut_visitor;
89
mod pre_processor;
910
pub mod provider;
1011
pub mod visitor;

0 commit comments

Comments
 (0)