Speed up parsing.

This commit is contained in:
Stephen Chung 2023-03-15 08:01:44 +08:00
parent 906ab3a295
commit f46cbdde49
3 changed files with 560 additions and 269 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ Rhai.toml
**/*.bat **/*.bat
doc/rhai-sync.json doc/rhai-sync.json
doc/rhai.json doc/rhai.json
tools/
.idea/ .idea/
.idea .idea
.idea/* .idea/*

View File

@ -30,6 +30,7 @@ Enhancements
* The functions `min` and `max` are added for numbers. * The functions `min` and `max` are added for numbers.
* Range cases in `switch` statements now also match floating-point and decimal values. In order to support this, however, small numeric ranges cases are no longer unrolled. * Range cases in `switch` statements now also match floating-point and decimal values. In order to support this, however, small numeric ranges cases are no longer unrolled.
* Loading a module via `import` now gives the module access to the current scope, including variables and constants defined inside. * Loading a module via `import` now gives the module access to the current scope, including variables and constants defined inside.
* Some very simple operator calls (e.g. integer add) are short-circuited to avoid the overhead of a function call, resulting in a small speed improvement.
Version 1.12.0 Version 1.12.0

File diff suppressed because it is too large Load Diff