compiler, runtime, common, documentation: Refactor Type System
The type system (and the value system) now include attributes for each type (things like direction, const-ness). Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -226,7 +226,10 @@ extension Parameter: Compilable {
|
||||
return Result.Ok(
|
||||
(
|
||||
Parameter(
|
||||
identifier: parameter_name, withType: parameter_type, withDirection: direction),
|
||||
identifier: parameter_name,
|
||||
withType: direction != nil
|
||||
? parameter_type.update(addAttribute: P4TypeAttribute.Direction(direction!))
|
||||
: parameter_type),
|
||||
context
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user