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:
@@ -26,8 +26,8 @@ import TreeSitterP4
|
||||
|
||||
@Test func test_simple_struct() async throws {
|
||||
let fields = P4StructFields([
|
||||
P4StructFieldIdentifier(name: "yesno", withType: P4Boolean()),
|
||||
P4StructFieldIdentifier(name: "count", withType: P4Int()),
|
||||
P4StructFieldIdentifier(name: "yesno", withType: P4Type(P4Boolean())),
|
||||
P4StructFieldIdentifier(name: "count", withType: P4Type(P4Int())),
|
||||
])
|
||||
|
||||
let struct_type = P4Struct(withName: Identifier(name: "Testing"), andFields: fields)
|
||||
|
||||
Reference in New Issue
Block a user