sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.SymTable.Table

Description

 

Synopsis

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

lookupSymbolsType :: SutID -> SymTable -> [SymType] Source #

Lookup the list of types 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