Add source to contexts.
This commit is contained in:
@@ -37,6 +37,8 @@ New features
|
||||
* `AST::iter_functions` now returns `ScriptFnMetadata` which includes, among others, _doc-comments_ for functions prefixed by `///` or `/**`.
|
||||
* _Doc-comments_ can be enabled/disabled with the new `Engine::set_doc_comments` method.
|
||||
* A new feature `metadata` is added that pulls in `serde_json` and enables `Engine::gen_fn_metadata_to_json` which exports the full list of functions metadata (including those inside an `AST`) in JSON format.
|
||||
* `Engine::on_debug` provides two additional parameters: `source: Option<&str>` and `pos: Position`.
|
||||
* `NativeCallContext` and `EvalContext` both expose `source()` which returns the current source, if any.
|
||||
|
||||
Enhancements
|
||||
------------
|
||||
|
Reference in New Issue
Block a user