Start Evaluation

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-02-10 03:37:57 -05:00
parent 0dd5ce4be3
commit 3693bdc02d
15 changed files with 635 additions and 119 deletions
+7
View File
@@ -65,6 +65,12 @@ open class P4ValueBase<T: P4Type>: P4Value {
}
}
extension P4ValueBase: EvaluatableExpression {
public func evaluate(execution: ProgramExecution) -> Result<P4Value> {
return .Ok(self)
}
}
/// The type for a P4 struct
public struct P4Struct: P4Type {
public let name: String
@@ -122,6 +128,7 @@ public class P4BooleanValue: P4ValueBase<P4Boolean> {
}
}
/// A P4 int type
public struct P4Int: P4Type {
public static func create() -> any P4Type {