Add export to JSON.
This commit is contained in:
@@ -10,6 +10,9 @@ Each function defined in an `AST` can optionally attach _doc-comments_ (which, a
|
||||
are comments prefixed by either `///` or `/**`). Doc-comments allow third-party tools to
|
||||
automatically generate documentation for functions defined in a Rhai script.
|
||||
|
||||
A new API, `Engine::gen_fn_metadata_to_json`, paired with the new `metadata` feature,
|
||||
exports the full list of functions metadata (including those in an `AST`) as a JSON document.
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
@@ -31,6 +34,7 @@ New features
|
||||
|
||||
* `AST::iter_functions` now returns `ScriptFnMetadata` which includes, among others, _doc-comments_ for functions prefixed by `///` or `/**`.
|
||||
* A functions lookup cache is added to make function call resolution faster.
|
||||
* 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.
|
||||
|
||||
Enhancements
|
||||
------------
|
||||
|
Reference in New Issue
Block a user