compiler, runtime: Make Default Values Optional

For types, make it optional to return a default value. While default
values for some types are meaningful, they are not meaningful for all
types (e.g., Action, Control, Parser, Parser state, etc.).

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-05-04 08:35:33 -04:00
parent 5cfe5532a2
commit b49ec104e9
8 changed files with 55 additions and 44 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ public protocol EvaluatableStatement {
public protocol P4Type: CustomStringConvertible {
func eq(rhs: any P4Type) -> Bool
func def() -> P4DataValue
func def() -> P4DataValue?
}
public protocol P4DataValue: CustomStringConvertible {