Support Setting Arrays/Fields

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-20 02:32:15 -04:00
parent d7696e822c
commit 04627f20e2
9 changed files with 326 additions and 74 deletions
+5
View File
@@ -40,3 +40,8 @@ public protocol P4Value: CustomStringConvertible {
func type() -> any P4Type
func eq(rhs: P4Value) -> Bool
}
public protocol EvaluatableLValueExpression: EvaluatableExpression {
func set(to: P4Value, inScopes scopes: ValueScopes, duringExecution execution: ProgramExecution) -> Result<(ValueScopes, P4Value)>
func check(to: EvaluatableExpression, inScopes scopes: TypeScopes) -> Result<()>
}