Repository navigation
v.0.19.10
This version improves on error source reporting and fixes a number of bugs.
Version 0.19.10 released to crates.io.
Bug fixes
no_stdfeature now compiles correctly (bug introduced in0.19.9).- Bug in
FileModuleResolver::clear_cache_for_pathpath mapping fixed. - Some optimizer fringe cases are fixed - related to constants propagation when the evil
evalis present.
Breaking changes
- The error variant
EvalAltResult::ErrorInFunctionCallhas a new parameter holding the source of the function. ParseErrorType::WrongFnDefinitionis renamedFnWrongDefinition.- Redefining an existing function within the same script now throws a new
ParseErrorType::FnDuplicatedDefinition. This is to prevent accidental overwriting an earlier function definition. AST::set_sourceis now split intoAST::set_sourceandAST::clear_source.
New features
Engine::compile_into_self_containedcompiles a script into anASTand eagerly resolves allimportstatements with string literal paths. The resolved modules are directly embedded into theAST. When theASTis later evaluated,importstatements directly yield the pre-resolved modules without going through the resolution process once again.AST::walk,Stmt::walkandExpr::walkinternal API's to recursively walk anAST.
Enhancements
- Source information is provided when there is an error within a call to a function defined in another module.
- Source information is provided to the
NativeCallContextfor native Rust functions. EvalAltResult::clear_positionto clear the position information of an error - useful when only the message is needed and the position doesn't need to be printed out.- A new optional function
resolve_astis added to theModuleResolvertrait for advanced usage.