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:
@@ -39,8 +39,8 @@ let p4_program_with_control_decl = """
|
||||
|
||||
|
||||
// snippet.include
|
||||
let flter = { (tipe: P4TypeAttributed) -> Bool in
|
||||
switch tipe.type {
|
||||
let flter = { (tipe: P4Type) -> Bool in
|
||||
switch tipe.dataType(){
|
||||
case let c as Control: c.name == "simple"
|
||||
default: false
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ let p4_program_with_struct_decl = """
|
||||
"""
|
||||
|
||||
// snippet.include
|
||||
let flter = { (tipe: P4Type) -> Bool in
|
||||
let flter = { (tipe: P4DataType) -> Bool in
|
||||
switch tipe {
|
||||
case let c as P4Struct: c.name == "agg"
|
||||
default: false
|
||||
|
||||
Reference in New Issue
Block a user