An interpreted language with a focus on expressiveness and type safety

  • FascinatedBox's avatar
    api,internals: Huge rewrite of import internals (fixes #416). · 68144f73
    FascinatedBox authored
    This is a huge patch that rewrites how the parser receives content and
    how the import hook works. Externally, there is no difference. In
    terms of API, there are several breaks.
    
    Import hook callers now receive only the state and target. The old
    `lily_load_*` functions are now `lily_import_*` functions. The
    renamed functions automatically tack on the appropriate suffix. This
    allows useful hooks without even looking at msgbuf!
    
    New functions `lily_import_use_local/package_dir`. These functions
    control if the import functions are going to use a local dir or the
    package dir. The caller can specify a directory that fits between the
    package root and the target. This allows building a system that has
    tests in a `test` directory that can cross-import `src` files.
    
    New function `lily_import_current_root_dir` added. It omits the
    leading directory to the first module. That seems right. It's for the
    testing system that's yet to be built (but which is now POSSIBLE!).
    
    Content loading has also changed. It's done through `lily_load_*`
    functions (newly-made, unrelated to old). The embedder can then call
    a parse/render function. The advantage of this is that it decouples
    parse/render from their content (render_file was hard to test for
    example).
    
    All embedders are broken by this patch. Sorry.
    68144f73
Name
Last commit
Last update
cmake Loading commit data...
run Loading commit data...
sandbox Loading commit data...
src Loading commit data...
test Loading commit data...
try Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
README.md Loading commit data...
RELEASES.md Loading commit data...
appveyor.yml Loading commit data...
license.txt Loading commit data...