Quirrel 4.8.0 Reference Manual
Project source code is available at https://github.com/GaijinEntertainment/quirrel
Copyright (c) 2003-2016 Alberto Demichelis Copyright (c) 2016-2024 Gaijin Games KFT
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- 1. The language
- 1.1. Lexical Structure
- 1.2. Values and Data types
- 1.3. Statements
- 1.3.1. Block
- 1.3.2. Control Flow Statements
- 1.3.3. Loops
- 1.3.4. break
- 1.3.5. continue
- 1.3.6. return
- 1.3.7. yield
- 1.3.8. Local variables declaration ( local )
- 1.3.9. Named bindings declaration ( let )
- 1.3.10. Function declaration
- 1.3.11. Class declaration
- 1.3.12. try/catch
- 1.3.13. throw
- 1.3.14. const
- 1.3.15. enum
- 1.3.16. Expression statement
- 1.4. Expressions
- 1.5. Tables
- 1.6. Arrays
- 1.7. Functions
- 1.8. Classes
- 1.9. Generators
- 1.10. Constants & Enumerations
- 1.11. Destructuring assignment
- 1.12. $ - String interpolation
- 1.13. Threads
- 1.14. Weak References
- 1.15. Metamethods
- 1.16. Built-in Functions
- 1.17. Complier directives
- 1.18. List of Complier directives
- 1.19. Limitations
- 2. Embedding Quirrel
- 2.1. Memory Management
- 2.2. Build Configuration
- 2.3. Error Conventions
- 2.4. Virtual Machine Initialization
- 2.5. The Stack
- 2.6. Runtime error handling
- 2.7. Compiling a script
- 2.8. Calling a function
- 2.9. Create a C function
- 2.10. Tables and arrays manipulation
- 2.11. Userdata and UserPointers
- 2.12. The registry table
- 2.13. Mantaining references to Quirrel values from the C API
- 2.14. Debug Interface
- 3. API Reference