Make IR for array access

This commit is contained in:
2024-12-04 16:11:06 +01:00
parent 0c40bca60b
commit 1c996b3c8b
10 changed files with 138 additions and 77 deletions

View File

@ -9,6 +9,7 @@ module Language.Elna.Frontend.SymbolTable
, lookup
, member
, scope
, size
, toMap
, update
) where
@ -76,6 +77,9 @@ member :: Identifier -> SymbolTable -> Bool
member identifier table =
isJust $ lookup identifier table
size :: SymbolTable -> Int
size (SymbolTable _ map') = HashMap.size map'
fromList :: [(Identifier, Info)] -> Either (NonEmpty Identifier) SymbolTable
fromList elements
| Just identifierDuplicates' <- identifierDuplicates =