language-oberon-0.1: Parser and pretty-printer for the Oberon programming language

Safe HaskellNone
LanguageHaskell2010

Language.Oberon

Description

Every function in this module takes a flag that determines whether the input is an Oberon or Oberon-2 module.

Synopsis

Documentation

parseModule :: Bool -> Text -> ParseResults [Module Ambiguous] Source #

Parse the given text of a single module, without resolving the syntactic ambiguities.

parseAndResolveModule :: Bool -> FilePath -> Text -> IO (Validation (NonEmpty Error) (Module Identity)) Source #

Given a directory path for module imports, parse the given module text and all the module files it imports, then use all the information to resolve the syntactic ambiguities.

parseAndResolveModuleFile :: Bool -> FilePath -> IO (Validation (NonEmpty Error) (Module Identity)) Source #

Parse the module file at the given path, assuming all its imports are in the same directory.