-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from schungx/oop
OOP support
- Loading branch information
Showing
116 changed files
with
3,469 additions
and
1,845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
What is Rhai | ||
============ | ||
|
||
{{#include links.md}} | ||
{{#include ../links.md}} | ||
|
||
Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way | ||
to add scripting to any application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Appendix | ||
======== | ||
|
||
{{#include ../links.md}} | ||
|
||
This section contains miscellaneous reference materials. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Keywords List | ||
============= | ||
|
||
{{#include ../links.md}} | ||
|
||
| Keyword | Description | Not available under | | ||
| :-------------------: | ---------------------------------------- | :-----------------: | | ||
| `true` | Boolean true literal | | | ||
| `false` | Boolean false literal | | | ||
| `let` | Variable declaration | | | ||
| `const` | Constant declaration | | | ||
| `if` | If statement | | | ||
| `else` | else block of if statement | | | ||
| `while` | While loop | | | ||
| `loop` | Infinite loop | | | ||
| `for` | For loop | | | ||
| `in` | Containment test, part of for loop | | | ||
| `continue` | Continue a loop at the next iteration | | | ||
| `break` | Loop breaking | | | ||
| `return` | Return value | | | ||
| `throw` | Throw exception | | | ||
| `import` | Import module | [`no_module`] | | ||
| `export` | Export variable | [`no_module`] | | ||
| `as` | Alias for variable export | [`no_module`] | | ||
| `private` | Mark function private | [`no_function`] | | ||
| `fn` (lower-case `f`) | Function definition | [`no_function`] | | ||
| `Fn` (capital `F`) | Function to create a [function pointer] | | | ||
| `call` | Call a [function pointer] | | | ||
| `this` | Reference to base object for method call | [`no_function`] | | ||
| `type_of` | Get type name of value | | | ||
| `print` | Print value | | | ||
| `debug` | Print value in debug format | | | ||
| `eval` | Evaluate script | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Literals Syntax | ||
=============== | ||
|
||
{{#include ../links.md}} | ||
|
||
| Type | Literal syntax | | ||
| :--------------------------------: | :------------------------------------------------------------------------------: | | ||
| `INT` | `42`, `-123`, `0`,<br/>`0x????..` (hex), `0b????..` (binary), `0o????..` (octal) | | ||
| `FLOAT` | `42.0`, `-123.456`, `0.0` | | ||
| [String] | `"... \x?? \u???? \U???????? ..."` | | ||
| Character | `"... \x?? \u???? \U???????? ..."` | | ||
| [`Array`] | `[ ???, ???, ??? ]` | | ||
| [Object map] | `#{ a: ???, b: ???, c: ???, "def": ??? }` | | ||
| Boolean true | `true` | | ||
| Boolean false | `false` | | ||
| `Nothing`/`null`/`nil`/`void`/Unit | `()` | |
Oops, something went wrong.