Refactor Names of Scope Types

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-20 04:23:53 -04:00
parent 6a9a138afe
commit f0d816b99f
12 changed files with 144 additions and 163 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ import TreeSitterP4
@testable import P4Compiler
@Test func test_scope() async throws {
let s = LexicalScope()
let s = VarTypeScope()
let s2 = s.declare(identifier: Identifier(name: "first"), withValue: P4Int())
let found_first = try! #require(s2.lookup(identifier: Identifier(name: "first")))
@@ -36,7 +36,7 @@ import TreeSitterP4
}
@Test func test_scope_no_set() async throws {
var ss = LexicalScopes().enter()
var ss = VarTypeScopes().enter()
ss = ss.declare(identifier: Identifier(name: "first"), withValue: P4Int())
ss = ss.enter()
ss = ss.declare(identifier: Identifier(name: "second"), withValue: P4Boolean())
@@ -49,7 +49,7 @@ import TreeSitterP4
}
@Test func test_scope_set() async throws {
var ss = LexicalScopes().enter()
var ss = VarTypeScopes().enter()
let id = Identifier(name: "first")
let id_type = P4Int()