Support Binary Math Operators

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-26 23:48:39 -04:00
parent 12ec6a77ed
commit fafc80553e
5 changed files with 430 additions and 20 deletions
+1
View File
@@ -58,6 +58,7 @@ public struct SelectExpression {
}
public typealias NamedBinaryOperatorEvaluator = (String, P4Type, (P4Value, P4Value) -> P4Value)
public typealias BinaryOperatorEvaluator = (P4Value, P4Value) -> P4Value
public struct BinaryOperatorExpression {
public let evaluator: NamedBinaryOperatorEvaluator
public let left: EvaluatableExpression