Revise docs.
This commit is contained in:
@@ -63,7 +63,9 @@ cause a stack overflow in the [`Engine`], unless stopped by setting a limit for
|
||||
For instance, importing itself always causes an infinite recursion:
|
||||
|
||||
```rust
|
||||
// This file is 'hello.rhai'
|
||||
--------------
|
||||
| hello.rhai |
|
||||
--------------
|
||||
|
||||
import "hello" as foo; // import itself - infinite recursion!
|
||||
|
||||
@@ -73,11 +75,18 @@ foo::do_something();
|
||||
Modules cross-referencing also cause infinite recursion:
|
||||
|
||||
```rust
|
||||
// This file is 'hello.rhai' - references 'world.rhai'
|
||||
--------------
|
||||
| hello.rhai |
|
||||
--------------
|
||||
|
||||
import "world" as foo;
|
||||
foo::do_something();
|
||||
|
||||
// This file is 'world.rhai' - references 'hello.rhai'
|
||||
|
||||
--------------
|
||||
| world.rhai |
|
||||
--------------
|
||||
|
||||
import "hello" as bar;
|
||||
bar::do_something_else();
|
||||
```
|
||||
|
Reference in New Issue
Block a user