Better convert LexError to ParseError.

This commit is contained in:
Stephen Chung
2020-06-14 16:56:36 +08:00
parent b51930031b
commit 0c6a939c66
4 changed files with 44 additions and 51 deletions

View File

@@ -2480,7 +2480,7 @@ engine.set_max_string_size(500); // allow strings only up to 500 byte
engine.set_max_string_size(0); // allow unlimited string length
```
A script attempting to create a string literal longer than the maximum will terminate with a parse error.
A script attempting to create a string literal longer than the maximum length will terminate with a parse error.
Any script operation that produces a string longer than the maximum also terminates the script with an error result.
This check can be disabled via the [`unchecked`] feature for higher performance
(but higher risks as well).