Skip to main content

Module engine

Module engine 

Source
Expand description

Build engine utilities for TypR CLI

Provides functions for:

  • Parsing code files
  • Compiling with error collection
  • Writing standard library files

Structs§

CompileResult
Complete result of compiling a TypR file (parsing + type checking)
ParseCodeResult
Result of parsing a code file, containing the AST and any syntax errors
TypRFile

Functions§

compile_code_with_errors
Parse and type-check code, returning all errors collected
compile_string_with_errors
Compile code from a string (useful for REPL and testing)
parse_code
Parse code and return the AST (legacy behavior, ignores syntax errors)
parse_code_with_errors
Parse code and return the AST along with any syntax errors collected
write_std_for_type_checking