glados-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parser.ImportSystem

Synopsis

Documentation

resolveImports :: [Ast] -> IO (Either String [Ast]) Source #

Main entry point used by the Compiler/VM. Resolves all AImport nodes within a list of AST statements.

param asts: The initial list of AST nodes (parsed from the main file). return: Either an error message (String) or the fully resolved AST list.

constructForAst :: [Ast] -> Either String [Ast] Source #

Helper used by unit tests to reconstruct AFor nodes.