xfrp/loaders

XFRP module loader. A loader is actually the combination of a lexer and a parser with memo.

See also:

Types

XfrpLoader = ref object
  loaded: TableRef[XfrpModuleId, WithCodeInfo[XfrpModule]]
  includeDirs: seq[string]
File-to-AST loader.   Source Edit

Procs

proc newXfrpLoader(includeDirs: seq[string]): XfrpLoader {...}{.raises: [], tags: [].}
Create new loader.   Source Edit
proc load(loader: XfrpLoader; name: string; flags: set[CompilerFlag] = {};
          traverseIncludeDirs = true): WithCodeInfo[XfrpModule] {...}{.raises: [
    KeyError, XfrpLoadError, IOError, OSError, Exception, XfrpSyntaxError],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect].}
Load a file and convert to an AST. When traverseIncludeDirs is true, the loader searches for the file in all possible paths.   Source Edit
proc loadMaterials(loader: XfrpLoader; ast: WithCodeInfo[XfrpModule];
                   flags: set[CompilerFlag] = {};
                   history: seq[XfrpModuleId] = @[]): XfrpMaterials {...}{.raises: [
    XfrpReferenceError, KeyError, XfrpReferenceError, IOError, OSError,
    Exception, XfrpSyntaxError, XfrpLoadError],
    tags: [ReadDirEffect, ReadIOEffect, RootEffect].}
Load materials of given AST.   Source Edit