Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Sutori.SymTable.Table
Description
- type SymTable = Map SutID [SutSymbol']
- insertSymbol :: SutSymbol' -> SymTable -> SymTable
- updateSymbol :: SutSymbol' -> SymTable -> SymTable
- lookupSymbols :: SutID -> SymTable -> Maybe [SutSymbol']
- lookupSymbolsVariable :: SutID -> SymTable -> [SymVariable]
- lookupSymbolsFunction :: SutID -> SymTable -> [SymFunction]
- lookupSymbolsModule :: SutID -> SymTable -> [SymModule]
- lookupSymbolsType :: SutID -> SymTable -> [SymType]
- lookupSymbolsPerson :: SutID -> SymTable -> [SymPerson]
- lookupAllFunctions :: Scope -> SymTable -> [SymFunction]
Documentation
type SymTable = Map SutID [SutSymbol'] Source #
A SymTable
represents the SymTable of a Sutori parsing, so
it matches a SutID (symbol name) to a list of symbols
insertSymbol :: SutSymbol' -> SymTable -> SymTable Source #
Inserts a symbol into its ID stack in the map
updateSymbol :: SutSymbol' -> SymTable -> SymTable Source #
Updates (read: replaces) the head of the symbol stack (for this symbol's ID
lookupSymbols :: SutID -> SymTable -> Maybe [SutSymbol'] Source #
Lookup the list of symbols using the given ID
lookupSymbolsVariable :: SutID -> SymTable -> [SymVariable] Source #
Lookup the list of variables with an ID
lookupSymbolsFunction :: SutID -> SymTable -> [SymFunction] Source #
Lookup the list of functions with an ID
lookupSymbolsModule :: SutID -> SymTable -> [SymModule] Source #
Lookup the list of modules with an ID
lookupSymbolsPerson :: SutID -> SymTable -> [SymPerson] Source #
Lookup the list of persons with an ID
lookupAllFunctions :: Scope -> SymTable -> [SymFunction] Source #
Lookup all defined functions in a given scope