struct variable type checking, refactoring to avoid circular dependencies
This commit is contained in:
parent
9f2fad1507
commit
1c1e25a881
15 changed files with 224 additions and 140 deletions
16
src/Ubc/Parse/Scope.hs
Normal file
16
src/Ubc/Parse/Scope.hs
Normal file
|
@ -0,0 +1,16 @@
|
|||
module Ubc.Parse.Scope
|
||||
( Scope(..)
|
||||
, expectScopeStruct
|
||||
)
|
||||
where
|
||||
|
||||
import Ubc.Parse.Scope.FileScope (FileScope)
|
||||
import Ubc.Parse.Scope.StructScope (StructScope)
|
||||
|
||||
data Scope =
|
||||
ScopeFile FileScope
|
||||
| ScopeStruct StructScope
|
||||
|
||||
expectScopeStruct :: Scope -> StructScope
|
||||
expectScopeStruct (ScopeStruct s) = s
|
||||
expectScopeStruct _ = error "Internal Error: Top Scope is not Scope Struct"
|
Loading…
Add table
Add a link
Reference in a new issue