Completely Refactor Execution

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-06 21:40:19 -05:00
parent f96350f89d
commit eff19df968
15 changed files with 418 additions and 351 deletions
+1 -12
View File
@@ -66,15 +66,4 @@ extension ExpressionStatement: EvaluatableStatement {
public func evaluate(execution: ProgramExecution) -> ProgramExecution {
return execution
}
}
// Variables are evaluatable because they can be looked up by identifiers.
extension TypedIdentifier: EvaluatableExpression {
public func type() -> any Common.P4Type {
return self.parsed_type
}
public func evaluate(execution: Common.ProgramExecution) -> Result<P4Value> {
return execution.scopes.lookup(identifier: self)
}
}
}