Showing preview only (4,106K chars total). Download the full file or copy to clipboard to get everything.
Repository: GaijinEntertainment/quirrel
Branch: master
Commit: dec4877203e5
Files: 1558
Total size: 3.6 MB
Directory structure:
gitextract_7iu7af3r/
├── .github/
│ └── workflows/
│ └── docs_build_deploy.yaml
├── .gitignore
├── .travis.yml
├── CMakeLists.txt
├── COPYRIGHT
├── HISTORY
├── README.md
├── appveyor.yml
├── doc/
│ ├── .gitignore
│ ├── Makefile
│ ├── make.bat
│ ├── repl/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── build.txt
│ │ ├── native.cpp
│ │ └── static/
│ │ ├── repl-rst.css
│ │ ├── repl.css
│ │ ├── repl.html
│ │ └── replmain.js
│ ├── requirements.txt
│ └── source/
│ ├── _static/
│ │ └── custom.css
│ ├── _templates/
│ │ └── page.html
│ ├── conf.py
│ ├── diff_from_squirrel.rst
│ ├── index.rst
│ ├── introduction.rst
│ ├── modules/
│ │ ├── bindings.rst
│ │ └── index.rst
│ ├── quirrel.py
│ ├── quirrel_pygment_lexer.py
│ ├── reference/
│ │ ├── api/
│ │ │ ├── bytecode_serialization.rst
│ │ │ ├── calls.rst
│ │ │ ├── compiler.rst
│ │ │ ├── debug_interface.rst
│ │ │ ├── garbage_collector.rst
│ │ │ ├── object_creation_and_handling.rst
│ │ │ ├── object_manipulation.rst
│ │ │ ├── raw_object_handling.rst
│ │ │ ├── stack_operations.rst
│ │ │ └── virtual_machine.rst
│ │ ├── api_reference.rst
│ │ ├── embedding/
│ │ │ ├── build_configuration.rst
│ │ │ ├── calling_a_function.rst
│ │ │ ├── compiling_a_script.rst
│ │ │ ├── creating_a_c_function.rst
│ │ │ ├── debug_interface.rst
│ │ │ ├── error_conventions.rst
│ │ │ ├── memory_management.rst
│ │ │ ├── references_from_c.rst
│ │ │ ├── runtime_error_handling.rst
│ │ │ ├── tables_and_arrays_manipulation.rst
│ │ │ ├── the_registry_table.rst
│ │ │ ├── the_stack.rst
│ │ │ ├── userdata_and_userpointers.rst
│ │ │ └── vm_initialization.rst
│ │ ├── embedding_squirrel.rst
│ │ ├── index.rst
│ │ ├── language/
│ │ │ ├── arrays.rst
│ │ │ ├── builtin_functions.rst
│ │ │ ├── classes.rst
│ │ │ ├── compiler_directives.rst
│ │ │ ├── constants_and_enumerations.rst
│ │ │ ├── datatypes.rst
│ │ │ ├── destructuring_assignment.rst
│ │ │ ├── expressions.rst
│ │ │ ├── functions.rst
│ │ │ ├── generators.rst
│ │ │ ├── lexical_structure.rst
│ │ │ ├── limitations.rst
│ │ │ ├── metamethods.rst
│ │ │ ├── statements.rst
│ │ │ ├── string_interpolation.rst
│ │ │ ├── tables.rst
│ │ │ ├── threads.rst
│ │ │ ├── type_annotations.rst
│ │ │ └── weak_references.rst
│ │ └── language.rst
│ ├── repl/
│ │ └── index.rst
│ ├── rfcs/
│ │ ├── README.md
│ │ └── STATUS.md
│ └── stdlib/
│ ├── index.rst
│ ├── introduction.rst
│ ├── stdauxlib.rst
│ ├── stddatetimelib.rst
│ ├── stddebuglib.rst
│ ├── stdiolib.rst
│ ├── stdiostreamlib.rst
│ ├── stdmathlib.rst
│ ├── stdstringlib.rst
│ └── stdsystemlib.rst
├── helpers/
│ └── keyValueFile.h
├── include/
│ ├── sq_char_class.h
│ ├── sqconfig.h
│ ├── sqext.h
│ ├── sqio.h
│ ├── sqstdaux.h
│ ├── sqstdblob.h
│ ├── sqstddatetime.h
│ ├── sqstddebug.h
│ ├── sqstdio.h
│ ├── sqstdmath.h
│ ├── sqstdstring.h
│ ├── sqstdsystem.h
│ └── squirrel.h
├── internal/
│ ├── sq_safe_shift.h
│ └── sqstringlib.h
├── scripts/
│ ├── samples/
│ │ ├── ackermann.nut
│ │ ├── array.nut
│ │ ├── class.nut
│ │ ├── fibonacci.nut
│ │ ├── flow.nut
│ │ ├── generators.nut
│ │ ├── hello.nut
│ │ ├── list.nut
│ │ ├── loops.nut
│ │ ├── matrix.nut
│ │ ├── metamethods.nut
│ │ ├── methcall.nut
│ │ ├── module_1.nut
│ │ ├── module_2.nut
│ │ ├── module_demo.nut
│ │ ├── regex.nut
│ │ └── tailstate.nut
│ └── std/
│ ├── analyzer.nut
│ └── functools.nut
├── sq/
│ ├── CMakeLists.txt
│ ├── sq.cpp
│ └── sq_test_natives.cpp
├── sqmodules/
│ ├── CMakeLists.txt
│ ├── deffileaccess.cpp
│ ├── helpers.cpp
│ ├── helpers.h
│ ├── path.cpp
│ ├── path.h
│ ├── span.h
│ ├── sqmodules.cpp
│ └── sqmodules.h
├── sqrat/
│ ├── README.txt
│ └── include/
│ ├── sqrat/
│ │ ├── sqratAllocator.h
│ │ ├── sqratArray.h
│ │ ├── sqratClass.h
│ │ ├── sqratClassType.h
│ │ ├── sqratConst.h
│ │ ├── sqratFunction.h
│ │ ├── sqratGlobalMethods.h
│ │ ├── sqratMemberMethods.h
│ │ ├── sqratObject.h
│ │ ├── sqratScript.h
│ │ ├── sqratTable.h
│ │ ├── sqratTypes.h
│ │ └── sqratUtil.h
│ └── sqrat.h
├── sqstdlib/
│ ├── CMakeLists.txt
│ ├── sqstdaux.cpp
│ ├── sqstdblob.cpp
│ ├── sqstdblobimpl.h
│ ├── sqstddatetime.cpp
│ ├── sqstddebug.cpp
│ ├── sqstdhash.cpp
│ ├── sqstdhash.h
│ ├── sqstdio.cpp
│ ├── sqstdmath.cpp
│ ├── sqstdrex.cpp
│ ├── sqstdserialization.cpp
│ ├── sqstdserialization.h
│ ├── sqstdstream.cpp
│ ├── sqstdstream.h
│ ├── sqstdstring.cpp
│ └── sqstdsystem.cpp
├── squirrel/
│ ├── CMakeLists.txt
│ ├── ast_tools/
│ │ └── ast_indent_render.h
│ ├── compiler/
│ │ ├── CMakeLists.txt
│ │ ├── COPYRIGHT
│ │ ├── arena.h
│ │ ├── ast.cpp
│ │ ├── ast.h
│ │ ├── codegen.cpp
│ │ ├── codegen.h
│ │ ├── compilationcontext.cpp
│ │ ├── compilationcontext.h
│ │ ├── compiler.cpp
│ │ ├── compiler.h
│ │ ├── constgen.cpp
│ │ ├── constgen.h
│ │ ├── lex_tokens.h
│ │ ├── lexer.cpp
│ │ ├── lexer.h
│ │ ├── optimizations/
│ │ │ ├── closureHoisting.cpp
│ │ │ └── closureHoisting.h
│ │ ├── optimizer.cpp
│ │ ├── optimizer.h
│ │ ├── parser.cpp
│ │ ├── parser.h
│ │ ├── sourceloc.h
│ │ ├── sqdump.cpp
│ │ ├── sqfuncstate.cpp
│ │ ├── sqfuncstate.h
│ │ ├── sqio.cpp
│ │ ├── sqtypeparser.cpp
│ │ ├── sqtypeparser.h
│ │ ├── static_analyzer/
│ │ │ ├── analyzer.cpp
│ │ │ ├── analyzer.h
│ │ │ ├── analyzer_internal.h
│ │ │ ├── assign_seq_terminator.h
│ │ │ ├── ast_helpers.h
│ │ │ ├── breakable_scope.h
│ │ │ ├── checker_visitor.cpp
│ │ │ ├── checker_visitor.h
│ │ │ ├── config.cpp
│ │ │ ├── config.h
│ │ │ ├── function_info.h
│ │ │ ├── function_ret_type_eval.cpp
│ │ │ ├── function_ret_type_eval.h
│ │ │ ├── global_state.cpp
│ │ │ ├── global_state.h
│ │ │ ├── loop_terminator_collector.h
│ │ │ ├── modification_checker.h
│ │ │ ├── name_shadowing_checker.cpp
│ │ │ ├── name_shadowing_checker.h
│ │ │ ├── naming.cpp
│ │ │ ├── naming.h
│ │ │ ├── node_complexity_counter.h
│ │ │ ├── node_diff_computer.h
│ │ │ ├── node_equal_checker.h
│ │ │ ├── operator_classification.h
│ │ │ ├── symbol_info.h
│ │ │ ├── value_ref.cpp
│ │ │ ├── value_ref.h
│ │ │ ├── var_scope.cpp
│ │ │ └── var_scope.h
│ │ └── typeinference.cpp
│ ├── opcodes.h
│ ├── sqapi.cpp
│ ├── sqarray.h
│ ├── sqbaselib.cpp
│ ├── sqclass.cpp
│ ├── sqclass.h
│ ├── sqclosure.h
│ ├── sqdebug.cpp
│ ├── sqdedupshrinker.cpp
│ ├── sqext.cpp
│ ├── sqfuncproto.h
│ ├── sqmem.cpp
│ ├── sqobject.cpp
│ ├── sqobject.h
│ ├── sqpcheader.h
│ ├── sqstate.cpp
│ ├── sqstate.h
│ ├── sqstring.h
│ ├── sqstringlib.cpp
│ ├── sqtable.cpp
│ ├── sqtable.h
│ ├── squserdata.h
│ ├── squtils.h
│ ├── sqvm.cpp
│ ├── sqvm.h
│ ├── vartrace.cpp
│ ├── vartrace.h
│ └── vartracestub.cpp
├── squirrel-config.cmake.in
├── testData/
│ ├── ast/
│ │ ├── ast_render/
│ │ │ ├── all_syntax.nut
│ │ │ └── all_syntax.opt.txt
│ │ └── optimizations/
│ │ └── closureHoisting/
│ │ ├── classCrossFunc.nut
│ │ ├── classCrossFunc.opt.txt
│ │ ├── classSimple.nut
│ │ ├── classSimple.opt.txt
│ │ ├── constDep.nut
│ │ ├── constDep.opt.txt
│ │ ├── constFunc.nut
│ │ ├── constFunc.opt.txt
│ │ ├── deepUnchained.nut
│ │ ├── deepUnchained.opt.txt
│ │ ├── externalSymbol.nut
│ │ ├── externalSymbol.opt.txt
│ │ ├── implicitChainedFuncs.nut
│ │ ├── implicitChainedFuncs.opt.txt
│ │ ├── implicitChainedFuncs2.nut
│ │ ├── implicitChainedFuncs2.opt.txt
│ │ ├── indirectLocalCapture.nut
│ │ ├── indirectLocalCapture.opt.txt
│ │ ├── manyFuncs.nut
│ │ ├── manyFuncs.opt.txt
│ │ ├── multiDepthCapture.nut
│ │ ├── multiDepthCapture.opt.txt
│ │ ├── nestedParamShadow.nut
│ │ ├── nestedParamShadow.opt.txt
│ │ ├── paramDefaultCapture.nut
│ │ ├── paramDefaultCapture.opt.txt
│ │ ├── recursion1.nut
│ │ ├── recursion1.opt.txt
│ │ ├── simple.nut
│ │ ├── simple.opt.txt
│ │ ├── simple2.nut
│ │ ├── simple2.opt.txt
│ │ ├── tooManyLocals.nut
│ │ ├── tooManyLocals.opt.txt
│ │ ├── typedDefaultReturnType.nut
│ │ └── typedDefaultReturnType.opt.txt
│ ├── diagnostics/
│ │ ├── 1000_local_variables.diag.txt
│ │ ├── 1000_local_variables.nut
│ │ ├── 50k_access_member.diag.txt
│ │ ├── 50k_access_member.nut
│ │ ├── 50k_curly_brackets.diag.txt
│ │ ├── 50k_curly_brackets.nut
│ │ ├── 50k_function_calls.diag.txt
│ │ ├── 50k_function_calls.nut
│ │ ├── 50k_lambdas.diag.txt
│ │ ├── 50k_lambdas.nut
│ │ ├── 50k_nested_tables.diag.txt
│ │ ├── 50k_nested_tables.nut
│ │ ├── 50k_not.diag.txt
│ │ ├── 50k_not.nut
│ │ ├── 50k_paren_brackets.diag.txt
│ │ ├── 50k_paren_brackets.nut
│ │ ├── 50k_square_brackets.diag.txt
│ │ ├── 50k_square_brackets.nut
│ │ ├── 50r_binop.diag.txt
│ │ ├── 50r_binop.nut
│ │ ├── assign_to_expr.diag.txt
│ │ ├── assign_to_expr.nut
│ │ ├── assign_to_expr2.diag.txt
│ │ ├── assign_to_expr2.nut
│ │ ├── assign_to_optional_7.diag.txt
│ │ ├── assign_to_optional_7.nut
│ │ ├── base_as_array_assign.diag.txt
│ │ ├── base_as_array_assign.nut
│ │ ├── base_as_array_pp.diag.txt
│ │ ├── base_as_array_pp.nut
│ │ ├── base_pp.diag.txt
│ │ ├── base_pp.nut
│ │ ├── base_x_pp.diag.txt
│ │ ├── base_x_pp.nut
│ │ ├── binding_assign.diag.txt
│ │ ├── binding_assign.nut
│ │ ├── clone_op_allowed.diag.txt
│ │ ├── clone_op_allowed.nut.txt
│ │ ├── clone_op_forbiden.diag.txt
│ │ ├── clone_op_forbiden.nut.txt
│ │ ├── compilation_errors/
│ │ │ ├── lex_errors/
│ │ │ │ ├── empty_literal.diag.txt
│ │ │ │ ├── empty_literal.nut
│ │ │ │ ├── fp_exp_expected.diag.txt
│ │ │ │ ├── fp_exp_expected.nut
│ │ │ │ ├── hex_digits_expected.diag.txt
│ │ │ │ ├── hex_digits_expected.nut
│ │ │ │ ├── hex_numbers_expected.diag.txt
│ │ │ │ ├── hex_numbers_expected.nut
│ │ │ │ ├── hex_too_many_digits.diag.txt
│ │ │ │ ├── hex_too_many_digits.nut
│ │ │ │ ├── invalid_token.diag.txt
│ │ │ │ ├── invalid_token.nut
│ │ │ │ ├── literal_overflow.diag.txt
│ │ │ │ ├── literal_overflow.nut
│ │ │ │ ├── literal_underflow.diag.txt
│ │ │ │ ├── literal_underflow.nut
│ │ │ │ ├── malformed_number.diag.txt
│ │ │ │ ├── malformed_number.nut
│ │ │ │ ├── newline_in_const.diag.txt
│ │ │ │ ├── newline_in_const.nut
│ │ │ │ ├── octal_not_supported.diag.txt
│ │ │ │ ├── octal_not_supported.nut
│ │ │ │ ├── trailing_block_comment.diag.txt
│ │ │ │ ├── trailing_block_comment.nut
│ │ │ │ ├── unexpected_char.diag.txt
│ │ │ │ ├── unexpected_char.nut
│ │ │ │ ├── unfinished_string.diag.txt
│ │ │ │ ├── unfinished_string.nut
│ │ │ │ ├── unrecognised_escape.diag.txt
│ │ │ │ └── unrecognised_escape.nut
│ │ │ ├── sema_errors/
│ │ │ │ ├── assign_to_binding.diag.txt
│ │ │ │ ├── assign_to_binding.nut
│ │ │ │ ├── assign_to_expr.diag.txt
│ │ │ │ ├── assign_to_expr.nut
│ │ │ │ ├── cannot_delete.diag.txt
│ │ │ │ ├── cannot_delete.nut
│ │ │ │ ├── conflicts_with.diag.txt
│ │ │ │ ├── conflicts_with.nut
│ │ │ │ ├── constant_field_not_found.diag.txt
│ │ │ │ ├── constant_field_not_found.nut
│ │ │ │ ├── constant_slot_not_found.diag.txt
│ │ │ │ ├── constant_slot_not_found.nut
│ │ │ │ ├── duplicate_func_attr.diag.txt
│ │ │ │ ├── duplicate_func_attr.nut
│ │ │ │ ├── duplicate_key.diag.txt
│ │ │ │ ├── duplicate_key.nut
│ │ │ │ ├── id_is_not_const.diag.txt
│ │ │ │ ├── id_is_not_const.nut
│ │ │ │ ├── inc_dec_not_assignable.diag.txt
│ │ │ │ ├── inc_dec_not_assignable.nut
│ │ │ │ ├── initialization_required.diag.txt
│ │ │ │ ├── initialization_required.nut
│ │ │ │ ├── invalid_enum.diag.txt
│ │ │ │ ├── invalid_enum.nut
│ │ │ │ ├── local_slot_create.diag.txt
│ │ │ │ ├── local_slot_create.nut
│ │ │ │ ├── loop_controller_not_in_loop_break.diag.txt
│ │ │ │ ├── loop_controller_not_in_loop_break.nut
│ │ │ │ ├── loop_controller_not_in_loop_continue.diag.txt
│ │ │ │ ├── loop_controller_not_in_loop_continue.nut
│ │ │ │ ├── not_allowed_in_const.diag.txt
│ │ │ │ ├── not_allowed_in_const.nut
│ │ │ │ ├── only_single_variable_declaration.diag.txt
│ │ │ │ ├── only_single_variable_declaration.nut
│ │ │ │ ├── same_foreach_kv_names.diag.txt
│ │ │ │ ├── same_foreach_kv_names.nut
│ │ │ │ ├── space_sep_field_name.diag.txt
│ │ │ │ ├── space_sep_field_name.nut
│ │ │ │ ├── too_many_locals.diag.txt
│ │ │ │ ├── too_many_locals.nut
│ │ │ │ ├── type_differs.diag.txt
│ │ │ │ ├── type_differs.nut
│ │ │ │ ├── uninitialized_binding.diag.txt
│ │ │ │ ├── uninitialized_binding.nut
│ │ │ │ ├── unknown_symbol.diag.txt
│ │ │ │ └── unknown_symbol.nut
│ │ │ ├── syntax_errors/
│ │ │ │ ├── assign_inside_forbidden.diag.txt
│ │ │ │ ├── assign_inside_forbidden.nut
│ │ │ │ ├── broken_slot_declaration.diag.txt
│ │ │ │ ├── broken_slot_declaration.nut
│ │ │ │ ├── compiler_internals_forbidden.diag.txt
│ │ │ │ ├── compiler_internals_forbidden.nut
│ │ │ │ ├── delete_op_forbidden.diag.txt
│ │ │ │ ├── delete_op_forbidden.nut
│ │ │ │ ├── end_of_stmt_expected.diag.txt
│ │ │ │ ├── end_of_stmt_expected.nut
│ │ │ │ ├── expected_bracket.diag.txt
│ │ │ │ ├── expected_bracket.nut
│ │ │ │ ├── expected_colnum.diag.txt
│ │ │ │ ├── expected_colnum.nut
│ │ │ │ ├── expected_expression.diag.txt
│ │ │ │ ├── expected_expression.nut
│ │ │ │ ├── expected_identifier.diag.txt
│ │ │ │ ├── expected_identifier.nut
│ │ │ │ ├── expected_linenum.diag.txt
│ │ │ │ ├── expected_linenum.nut
│ │ │ │ ├── expected_token_brace.diag.txt
│ │ │ │ ├── expected_token_brace.nut
│ │ │ │ ├── expected_token_paren.diag.txt
│ │ │ │ ├── expected_token_paren.nut
│ │ │ │ ├── expected_while.diag.txt
│ │ │ │ ├── expected_while.nut
│ │ │ │ ├── global_consts_only.diag.txt
│ │ │ │ ├── global_consts_only.nut
│ │ │ │ ├── invalid_type_name.diag.txt
│ │ │ │ ├── invalid_type_name.nut
│ │ │ │ ├── invalid_type_name_suggestion.diag.txt
│ │ │ │ ├── invalid_type_name_suggestion.nut
│ │ │ │ ├── multiple_docstrings.diag.txt
│ │ │ │ ├── multiple_docstrings.nut
│ │ │ │ ├── root_table_forbidden.diag.txt
│ │ │ │ ├── root_table_forbidden.nut
│ │ │ │ ├── scalar_expected.diag.txt
│ │ │ │ ├── scalar_expected.nut
│ │ │ │ ├── unsupported_directive.diag.txt
│ │ │ │ ├── unsupported_directive.nut
│ │ │ │ ├── vararg_with_default.diag.txt
│ │ │ │ └── vararg_with_default.nut
│ │ │ └── type_inference/
│ │ │ ├── test_arithmetic_mismatch.diag.txt
│ │ │ ├── test_arithmetic_mismatch.nut
│ │ │ ├── test_array_literal.diag.txt
│ │ │ ├── test_array_literal.nut
│ │ │ ├── test_array_return.diag.txt
│ │ │ ├── test_array_return.nut
│ │ │ ├── test_array_to_int.diag.txt
│ │ │ ├── test_array_to_int.nut
│ │ │ ├── test_assignment_chain.diag.txt
│ │ │ ├── test_assignment_chain.nut
│ │ │ ├── test_call_result_type.diag.txt
│ │ │ ├── test_call_result_type.nut
│ │ │ ├── test_call_union_return.diag.txt
│ │ │ ├── test_call_union_return.nut
│ │ │ ├── test_class_literal.diag.txt
│ │ │ ├── test_class_literal.nut
│ │ │ ├── test_comparison_to_int.diag.txt
│ │ │ ├── test_comparison_to_int.nut
│ │ │ ├── test_complex_assign_mismatch.diag.txt
│ │ │ ├── test_complex_assign_mismatch.nut
│ │ │ ├── test_complex_bitwise.diag.txt
│ │ │ ├── test_complex_bitwise.nut
│ │ │ ├── test_complex_call_chain.diag.txt
│ │ │ ├── test_complex_call_chain.nut
│ │ │ ├── test_complex_deep_nesting.diag.txt
│ │ │ ├── test_complex_deep_nesting.nut
│ │ │ ├── test_complex_logical.diag.txt
│ │ │ ├── test_complex_logical.nut
│ │ │ ├── test_complex_mega.diag.txt
│ │ │ ├── test_complex_mega.nut
│ │ │ ├── test_complex_mixed_arithmetic.diag.txt
│ │ │ ├── test_complex_mixed_arithmetic.nut
│ │ │ ├── test_complex_multifunction.diag.txt
│ │ │ ├── test_complex_multifunction.nut
│ │ │ ├── test_complex_nested_ternary.diag.txt
│ │ │ ├── test_complex_nested_ternary.nut
│ │ │ ├── test_complex_nullcoalesce.diag.txt
│ │ │ ├── test_complex_nullcoalesce.nut
│ │ │ ├── test_complex_pure_chain.diag.txt
│ │ │ ├── test_complex_pure_chain.nut
│ │ │ ├── test_complex_return_expr.diag.txt
│ │ │ ├── test_complex_return_expr.nut
│ │ │ ├── test_complex_table_ternary.diag.txt
│ │ │ ├── test_complex_table_ternary.nut
│ │ │ ├── test_const_array.diag.txt
│ │ │ ├── test_const_array.nut
│ │ │ ├── test_const_array2.diag.txt
│ │ │ ├── test_const_array2.nut
│ │ │ ├── test_const_array3.diag.txt
│ │ │ ├── test_const_array3.nut
│ │ │ ├── test_const_array4.diag.txt
│ │ │ ├── test_const_array4.nut
│ │ │ ├── test_const_function.diag.txt
│ │ │ ├── test_const_function.nut
│ │ │ ├── test_const_inline.diag.txt
│ │ │ ├── test_const_inline.nut
│ │ │ ├── test_const_table.diag.txt
│ │ │ ├── test_const_table.nut
│ │ │ ├── test_destructure_array_default_mismatch.diag.txt
│ │ │ ├── test_destructure_array_default_mismatch.nut
│ │ │ ├── test_destructure_complex.diag.txt
│ │ │ ├── test_destructure_complex.nut
│ │ │ ├── test_destructure_table_mismatch.diag.txt
│ │ │ ├── test_destructure_table_mismatch.nut
│ │ │ ├── test_field_access_unknown.diag.txt
│ │ │ ├── test_field_access_unknown.nut
│ │ │ ├── test_freeze_type_mismatch.diag.txt
│ │ │ ├── test_freeze_type_mismatch.nut
│ │ │ ├── test_function_literal.diag.txt
│ │ │ ├── test_function_literal.nut
│ │ │ ├── test_instance_from_class.diag.txt
│ │ │ ├── test_instance_from_class.nut
│ │ │ ├── test_literal_float_to_int.diag.txt
│ │ │ ├── test_literal_float_to_int.nut
│ │ │ ├── test_literal_int_to_string.diag.txt
│ │ │ ├── test_literal_int_to_string.nut
│ │ │ ├── test_literal_string_to_int.diag.txt
│ │ │ ├── test_literal_string_to_int.nut
│ │ │ ├── test_return_float_to_int.diag.txt
│ │ │ ├── test_return_float_to_int.nut
│ │ │ ├── test_return_literal_mismatch.diag.txt
│ │ │ ├── test_return_literal_mismatch.nut
│ │ │ ├── test_slot_access_unknown.diag.txt
│ │ │ ├── test_slot_access_unknown.nut
│ │ │ ├── test_string_concat_to_int.diag.txt
│ │ │ ├── test_string_concat_to_int.nut
│ │ │ ├── test_table_literal.diag.txt
│ │ │ ├── test_table_literal.nut
│ │ │ ├── test_table_return.diag.txt
│ │ │ ├── test_table_return.nut
│ │ │ ├── test_table_to_string.diag.txt
│ │ │ ├── test_table_to_string.nut
│ │ │ ├── test_ternary_mismatch.diag.txt
│ │ │ ├── test_ternary_mismatch.nut
│ │ │ ├── test_typeof_to_int.diag.txt
│ │ │ ├── test_typeof_to_int.nut
│ │ │ ├── test_unknown_passthrough.diag.txt
│ │ │ └── test_unknown_passthrough.nut
│ │ ├── const_scope_1.diag.txt
│ │ ├── const_scope_1.nut
│ │ ├── const_scope_2.diag.txt
│ │ ├── const_scope_2.nut
│ │ ├── const_scope_3.diag.txt
│ │ ├── const_scope_3.nut
│ │ ├── continue_in_codeblock.diag.txt
│ │ ├── continue_in_codeblock.nut
│ │ ├── delete_base.diag.txt
│ │ ├── delete_base.nut
│ │ ├── delete_forbid_pragma.diag.txt
│ │ ├── delete_forbid_pragma.nut.txt
│ │ ├── destrucuring_var_decl_in_if.diag.txt
│ │ ├── destrucuring_var_decl_in_if.nut
│ │ ├── float_overflow.diag.txt
│ │ ├── float_overflow.nut
│ │ ├── float_underflow.diag.txt
│ │ ├── float_underflow.nut
│ │ ├── foreach_destr_typed_default.diag.txt
│ │ ├── foreach_destr_typed_default.nut
│ │ ├── hex_overflow.diag.txt
│ │ ├── hex_overflow.nut
│ │ ├── if_var_decl_init.diag.txt
│ │ ├── if_var_decl_init.nut
│ │ ├── import_01.diag.txt
│ │ ├── import_01.nut
│ │ ├── import_02.diag.txt
│ │ ├── import_02.nut
│ │ ├── import_03.diag.txt
│ │ ├── import_03.nut
│ │ ├── import_04.diag.txt
│ │ ├── import_04.nut
│ │ ├── import_05.diag.txt
│ │ ├── import_05.nut
│ │ ├── import_06.diag.txt
│ │ ├── import_06.nut
│ │ ├── import_07.diag.txt
│ │ ├── import_07.nut
│ │ ├── import_error.diag.txt
│ │ ├── import_error.nut
│ │ ├── init_with_wrong_type.diag.txt
│ │ ├── init_with_wrong_type.nut
│ │ ├── integer_overflow.diag.txt
│ │ ├── integer_overflow.nut
│ │ ├── integer_overflow_2.diag.txt
│ │ ├── integer_overflow_2.nut
│ │ ├── integer_overflow_int_max.diag.txt
│ │ ├── integer_overflow_int_max.nut
│ │ ├── interp_str_hanging_missed_ccurvy.diag.txt
│ │ ├── interp_str_hanging_missed_ccurvy.nut
│ │ ├── interp_str_not_string.diag.txt
│ │ ├── interp_str_not_string.nut
│ │ ├── interp_str_not_string_2.diag.txt
│ │ ├── interp_str_not_string_2.nut
│ │ ├── interp_str_wrong_template.diag.txt
│ │ ├── interp_str_wrong_template.nut
│ │ ├── invalid_float_1.diag.txt
│ │ ├── invalid_float_1.nut
│ │ ├── invalid_float_2.diag.txt
│ │ ├── invalid_float_2.nut
│ │ ├── invalid_float_3.diag.txt
│ │ ├── invalid_float_3.nut
│ │ ├── invalid_string_interp_1.diag.txt
│ │ ├── invalid_string_interp_1.nut
│ │ ├── invalid_type_hint_1.diag.txt
│ │ ├── invalid_type_hint_1.nut
│ │ ├── invalid_type_hint_2.diag.txt
│ │ ├── invalid_type_hint_2.nut
│ │ ├── invalid_type_hint_3.diag.txt
│ │ ├── invalid_type_hint_3.nut
│ │ ├── leading_zero_1.diag.txt
│ │ ├── leading_zero_1.nut
│ │ ├── leading_zero_2.diag.txt
│ │ ├── leading_zero_2.nut
│ │ ├── leading_zero_3.diag.txt
│ │ ├── leading_zero_3.nut
│ │ ├── letAssign.diag.txt
│ │ ├── letAssign.nut
│ │ ├── many_args_in_function_call.diag.txt
│ │ ├── many_args_in_function_call.nut
│ │ ├── need_space_after_float.diag.txt
│ │ ├── need_space_after_float.nut
│ │ ├── need_space_after_hex.diag.txt
│ │ ├── need_space_after_hex.nut
│ │ ├── need_space_after_int.diag.txt
│ │ ├── need_space_after_int.nut
│ │ ├── return_type_check_1.diag.txt
│ │ ├── return_type_check_1.nut
│ │ ├── single_var_decl_in_if.diag.txt
│ │ ├── single_var_decl_in_if.nut
│ │ ├── space_sep_name.diag.txt
│ │ ├── space_sep_name.nut.txt
│ │ ├── space_sep_name_space.diag.txt
│ │ ├── space_sep_name_space.nut.txt
│ │ ├── too_large_static_memo_expr.diag.txt
│ │ ├── too_large_static_memo_expr.nut.txt
│ │ ├── too_many_locals2.diag.txt
│ │ ├── too_many_locals2.nut
│ │ ├── type_hints_01.diag.txt
│ │ ├── type_hints_01.nut
│ │ ├── type_hints_02.diag.txt
│ │ ├── type_hints_02.nut
│ │ ├── type_hints_03.diag.txt
│ │ ├── type_hints_03.nut
│ │ ├── type_hints_04.diag.txt
│ │ ├── type_hints_04.nut
│ │ ├── type_hints_05.diag.txt
│ │ ├── type_hints_05.nut
│ │ ├── type_hints_06.diag.txt
│ │ ├── type_hints_06.nut
│ │ ├── unfinished_hex.diag.txt
│ │ ├── unfinished_hex.nut
│ │ ├── var_scope_1.diag.txt
│ │ ├── var_scope_1.nut
│ │ ├── var_scope_2.diag.txt
│ │ ├── var_scope_2.nut
│ │ ├── var_scope_3.diag.txt
│ │ └── var_scope_3.nut
│ ├── exec/
│ │ ├── array_methods.nut
│ │ ├── array_methods.out
│ │ ├── basics.nut
│ │ ├── basics.out
│ │ ├── call_constructor_recursion.nut
│ │ ├── call_constructor_recursion.out
│ │ ├── class_yield.nut
│ │ ├── class_yield.out
│ │ ├── closure_hoist_typed_default.nut
│ │ ├── closure_hoist_typed_default.out
│ │ ├── closure_hoist_typed_return.nut
│ │ ├── closure_hoist_typed_return.out
│ │ ├── compare_int_float.nut
│ │ ├── compare_int_float.out
│ │ ├── compare_int_int.nut
│ │ ├── compare_int_int.out
│ │ ├── const_fold.nut
│ │ ├── const_fold.out
│ │ ├── const_in_closures.nut
│ │ ├── const_in_closures.out
│ │ ├── coroutines.nut
│ │ ├── coroutines.out
│ │ ├── deep_loop_variable.nut
│ │ ├── deep_loop_variable.out
│ │ ├── depth_check.nut
│ │ ├── depth_check.out
│ │ ├── destructuring/
│ │ │ ├── foreach_capture_destruct_idx.nut
│ │ │ ├── foreach_capture_destruct_idx.out
│ │ │ ├── foreach_capture_idx_val.nut
│ │ │ ├── foreach_capture_idx_val.out
│ │ │ ├── foreach_capture_plain_val.nut
│ │ │ ├── foreach_capture_plain_val.out
│ │ │ ├── foreach_capture_shadowed.nut
│ │ │ ├── foreach_capture_shadowed.out
│ │ │ ├── foreach_destr_default_closure.nut
│ │ │ ├── foreach_destr_default_closure.out
│ │ │ ├── foreach_destruct_empty_pattern.nut
│ │ │ ├── foreach_destruct_empty_pattern.out
│ │ │ ├── foreach_destructuring.nut
│ │ │ ├── foreach_destructuring.out
│ │ │ ├── foreach_destructuring_branches.nut
│ │ │ ├── foreach_destructuring_branches.out
│ │ │ ├── foreach_destructuring_complex.nut
│ │ │ ├── foreach_destructuring_complex.out
│ │ │ ├── foreach_no_capture.nut
│ │ │ ├── foreach_no_capture.out
│ │ │ ├── function_param_destructuring.nut
│ │ │ └── function_param_destructuring.out
│ │ ├── div64_by_minus_one_opt.nut
│ │ ├── div64_by_minus_one_opt.out
│ │ ├── div64_by_minus_one_vm.nut
│ │ ├── div64_by_minus_one_vm.out
│ │ ├── div_by_minus_one_opt.nut
│ │ ├── div_by_minus_one_opt.out
│ │ ├── div_by_minus_one_vm.nut
│ │ ├── div_by_minus_one_vm.out
│ │ ├── fallback_get_recursion.nut
│ │ ├── fallback_get_recursion.out
│ │ ├── fuzzer_seed_106.nut
│ │ ├── fuzzer_seed_106.out
│ │ ├── fuzzer_seed_3250.nut
│ │ ├── fuzzer_seed_3250.out
│ │ ├── fuzzer_seed_7200.nut
│ │ ├── fuzzer_seed_7200.out
│ │ ├── import_correct.nut
│ │ ├── import_correct.out
│ │ ├── inexpr_block/
│ │ │ ├── inexpr_block_1.nut
│ │ │ ├── inexpr_block_1.out
│ │ │ ├── inexpr_block_2.nut
│ │ │ ├── inexpr_block_2.out
│ │ │ ├── inexpr_block_3.nut
│ │ │ ├── inexpr_block_3.out
│ │ │ ├── inexpr_block_4.nut
│ │ │ ├── inexpr_block_4.out
│ │ │ ├── inexpr_block_5.nut
│ │ │ ├── inexpr_block_5.out
│ │ │ ├── inexpr_block_6.nut
│ │ │ ├── inexpr_block_6.out
│ │ │ ├── inexpr_block_7.nut
│ │ │ ├── inexpr_block_7.out
│ │ │ ├── inexpr_block_8.nut
│ │ │ ├── inexpr_block_8.out
│ │ │ ├── test_codeblock.nut
│ │ │ ├── test_codeblock.out
│ │ │ ├── test_codeblock_return_in_try.nut
│ │ │ ├── test_codeblock_return_in_try.out
│ │ │ ├── test_codeblock_try.nut
│ │ │ └── test_codeblock_try.out
│ │ ├── integers.nut
│ │ ├── integers.out
│ │ ├── is_frozen.nut
│ │ ├── is_frozen.out
│ │ ├── locals_chain.nut
│ │ ├── locals_chain.out
│ │ ├── metamethod_error.nut
│ │ ├── metamethod_error.out
│ │ ├── mod64_by_minus_one_opt.nut
│ │ ├── mod64_by_minus_one_opt.out
│ │ ├── mod64_by_minus_one_vm.nut
│ │ ├── mod64_by_minus_one_vm.out
│ │ ├── mod_by_minus_one_opt.nut
│ │ ├── mod_by_minus_one_opt.out
│ │ ├── mod_by_minus_one_vm.nut
│ │ ├── mod_by_minus_one_vm.out
│ │ ├── native_fields.nut
│ │ ├── native_fields.out
│ │ ├── opt/
│ │ │ ├── fuzz_52807_min.nut
│ │ │ ├── fuzz_52807_min.out
│ │ │ ├── fuzz_min.nut
│ │ │ ├── fuzz_min.out
│ │ │ ├── modify_local_var.nut
│ │ │ ├── modify_local_var.out
│ │ │ ├── opt_reassign_addi.nut
│ │ │ ├── opt_reassign_addi.out
│ │ │ ├── opt_reassign_arith.nut
│ │ │ ├── opt_reassign_arith.out
│ │ │ ├── opt_reassign_chain.nut
│ │ │ ├── opt_reassign_chain.out
│ │ │ ├── opt_reassign_in_scope.nut
│ │ │ ├── opt_reassign_in_scope.out
│ │ │ ├── opt_same_reg_fold.nut
│ │ │ ├── opt_same_reg_fold.out
│ │ │ ├── sqf916086.nut
│ │ │ └── sqf916086.out
│ │ ├── optimizer.nut
│ │ ├── optimizer.out
│ │ ├── optimizer_add.nut
│ │ ├── optimizer_add.out
│ │ ├── optimizer_mul.nut
│ │ ├── optimizer_mul.out
│ │ ├── parenCallee.nut
│ │ ├── parenCallee.out
│ │ ├── ph_optimizer_null_call_1.nut
│ │ ├── ph_optimizer_null_call_1.out
│ │ ├── ph_optimizer_null_call_2.nut
│ │ ├── ph_optimizer_null_call_2.out
│ │ ├── ph_optimizer_null_call_3.nut
│ │ ├── ph_optimizer_null_call_3.out
│ │ ├── runtime_type_check/
│ │ │ ├── assign_type_01.nut
│ │ │ ├── assign_type_01.out
│ │ │ ├── assign_type_02.nut
│ │ │ ├── assign_type_02.out
│ │ │ ├── assign_type_03.nut
│ │ │ ├── assign_type_03.out
│ │ │ ├── assign_type_04.nut
│ │ │ ├── assign_type_04.out
│ │ │ ├── assign_type_05.nut
│ │ │ ├── assign_type_05.out
│ │ │ ├── assign_type_06.nut
│ │ │ ├── assign_type_06.out
│ │ │ ├── assign_type_07.nut
│ │ │ ├── assign_type_07.out
│ │ │ ├── assign_type_08.nut
│ │ │ ├── assign_type_08.out
│ │ │ ├── assign_type_09.nut
│ │ │ ├── assign_type_09.out
│ │ │ ├── assign_type_10.nut
│ │ │ ├── assign_type_10.out
│ │ │ ├── assign_wrong_type_01.nut
│ │ │ ├── assign_wrong_type_01.out
│ │ │ ├── assign_wrong_type_02.nut
│ │ │ ├── assign_wrong_type_02.out
│ │ │ ├── assign_wrong_type_03.nut
│ │ │ ├── assign_wrong_type_03.out
│ │ │ ├── assign_wrong_type_04.nut
│ │ │ ├── assign_wrong_type_04.out
│ │ │ ├── assign_wrong_type_05.nut
│ │ │ ├── assign_wrong_type_05.out
│ │ │ ├── assign_wrong_type_06.nut
│ │ │ ├── assign_wrong_type_06.out
│ │ │ ├── assign_wrong_type_07.nut
│ │ │ ├── assign_wrong_type_07.out
│ │ │ ├── assign_wrong_type_08.nut
│ │ │ ├── assign_wrong_type_08.out
│ │ │ ├── assign_wrong_type_09.nut
│ │ │ ├── assign_wrong_type_09.out
│ │ │ ├── assign_wrong_type_10.nut
│ │ │ ├── assign_wrong_type_10.out
│ │ │ ├── return_type.nut
│ │ │ ├── return_type.out
│ │ │ ├── return_wrong_type.nut
│ │ │ └── return_wrong_type.out
│ │ ├── spec/
│ │ │ ├── class.nut
│ │ │ ├── class.out
│ │ │ ├── classInher.nut
│ │ │ ├── classInher.out
│ │ │ ├── class_extend.nut
│ │ │ ├── class_extend.out
│ │ │ ├── clone.nut
│ │ │ ├── clone.out
│ │ │ ├── closure.nut
│ │ │ ├── closure.out
│ │ │ ├── conditionalFor.nut
│ │ │ ├── conditionalFor.out
│ │ │ ├── const.nut
│ │ │ ├── const.out
│ │ │ ├── constFolding.nut
│ │ │ ├── constFolding.out
│ │ │ ├── constFoldingCond.nut
│ │ │ ├── constFoldingCond.out
│ │ │ ├── const_func.nut
│ │ │ ├── const_func.out
│ │ │ ├── const_func_freevars.nut
│ │ │ ├── const_func_freevars.out
│ │ │ ├── const_math_eval.nut
│ │ │ ├── const_math_eval.out
│ │ │ ├── const_with_expr.nut
│ │ │ ├── const_with_expr.out
│ │ │ ├── delegate_get.nut
│ │ │ ├── delegate_get.out
│ │ │ ├── destruct.nut
│ │ │ ├── destruct.out
│ │ │ ├── dowstmt.nut
│ │ │ ├── dowstmt.out
│ │ │ ├── enums.nut
│ │ │ ├── enums.out
│ │ │ ├── foreachstmt.nut
│ │ │ ├── foreachstmt.out
│ │ │ ├── forstmt.nut
│ │ │ ├── forstmt.out
│ │ │ ├── func_pure_attr.nut
│ │ │ ├── func_pure_attr.out
│ │ │ ├── generators.nut
│ │ │ ├── generators.out
│ │ │ ├── ifstmt.nut
│ │ │ ├── ifstmt.out
│ │ │ ├── sort.nut
│ │ │ ├── sort.out
│ │ │ ├── stringtmplt.nut
│ │ │ ├── stringtmplt.out
│ │ │ ├── trystmt.nut
│ │ │ ├── trystmt.out
│ │ │ ├── whilestmt.nut
│ │ │ └── whilestmt.out
│ │ ├── stack_metamethod.nut
│ │ ├── stack_metamethod.out
│ │ ├── stack_metamethod_few_args.nut
│ │ ├── stack_metamethod_few_args.out
│ │ ├── stack_metamethod_locals.nut
│ │ ├── stack_metamethod_locals.out
│ │ ├── staticmemo/
│ │ │ ├── no_memo_mutable_args.nut
│ │ │ ├── no_memo_mutable_args.out
│ │ │ ├── no_memo_mutable_result.nut
│ │ │ ├── no_memo_mutable_result.out
│ │ │ ├── static_assign_itself.nut
│ │ │ ├── static_assign_itself.out
│ │ │ ├── static_exception.nut
│ │ │ ├── static_exception.out
│ │ │ ├── static_freeze.nut
│ │ │ ├── static_freeze.out
│ │ │ ├── static_loop.nut
│ │ │ ├── static_loop.out
│ │ │ ├── static_nested.nut
│ │ │ ├── static_nested.out
│ │ │ ├── static_opt.nut
│ │ │ ├── static_opt.out
│ │ │ ├── static_opt2.nut
│ │ │ ├── static_opt2.out
│ │ │ ├── static_reset1.nut
│ │ │ ├── static_reset1.out
│ │ │ ├── static_reset2.nut
│ │ │ ├── static_reset2.out
│ │ │ ├── static_reset_module.nut
│ │ │ ├── static_reset_module.out
│ │ │ ├── static_tables.nut
│ │ │ ├── static_tables.out
│ │ │ ├── static_types.nut
│ │ │ └── static_types.out
│ │ ├── stdlib/
│ │ │ ├── blob_methods.nut
│ │ │ ├── blob_methods.out
│ │ │ ├── copy_content_with_replace.nut
│ │ │ ├── copy_content_with_replace.out
│ │ │ ├── datetime.nut
│ │ │ ├── datetime.out
│ │ │ ├── debug.nut
│ │ │ ├── debug.out
│ │ │ ├── debug_extras.nut
│ │ │ ├── debug_extras.out
│ │ │ ├── deep_hash.nut
│ │ │ ├── deep_hash.out
│ │ │ ├── deep_regex.nut
│ │ │ ├── deep_regex.out
│ │ │ ├── delegates.nut
│ │ │ ├── delegates.out
│ │ │ ├── deser_oom.nut
│ │ │ ├── deser_oom.out
│ │ │ ├── docstring.nut
│ │ │ ├── docstring.out
│ │ │ ├── file_io.nut
│ │ │ ├── file_io.out
│ │ │ ├── math_funcs.nut
│ │ │ ├── math_funcs.out
│ │ │ ├── math_min_max_clamp.nut
│ │ │ ├── math_min_max_clamp.out
│ │ │ ├── obj_serialization.nut
│ │ │ ├── obj_serialization.out
│ │ │ ├── obj_serialization_errors.nut
│ │ │ ├── obj_serialization_errors.out
│ │ │ ├── obj_serialization_errors_arg.nut
│ │ │ ├── obj_serialization_errors_arg.out
│ │ │ ├── obj_serialization_valid.nut
│ │ │ ├── obj_serialization_valid.out
│ │ │ ├── rawdelete.nut
│ │ │ ├── rawdelete.out
│ │ │ ├── regexp.nut
│ │ │ ├── regexp.out
│ │ │ ├── regexp_fixed_bugs.nut
│ │ │ ├── regexp_fixed_bugs.out
│ │ │ ├── stream_methods.nut
│ │ │ ├── stream_methods.out
│ │ │ ├── string.nut
│ │ │ ├── string.out
│ │ │ ├── string_escape.nut
│ │ │ ├── string_escape.out
│ │ │ ├── string_format.nut
│ │ │ ├── string_format.out
│ │ │ ├── swap.nut
│ │ │ ├── swap.out
│ │ │ ├── swap_stack_check.nut
│ │ │ ├── swap_stack_check.out
│ │ │ ├── system_lib.nut
│ │ │ └── system_lib.out
│ │ ├── string_interpolation.nut
│ │ ├── string_interpolation.out
│ │ ├── string_interpolation_new.nut
│ │ ├── string_interpolation_new.out
│ │ ├── string_methods.nut
│ │ ├── string_methods.out
│ │ ├── sub_int_min.nut
│ │ ├── sub_int_min.out
│ │ ├── surprise_js_dev.nut
│ │ ├── surprise_js_dev.out
│ │ ├── table_methods.nut
│ │ ├── table_methods.out
│ │ ├── testNullPropagation.nut
│ │ ├── testNullPropagation.out
│ │ ├── test_class_yield_call.nut
│ │ ├── test_class_yield_call.out
│ │ ├── test_shift.nut
│ │ ├── test_shift.out
│ │ ├── test_stale_stkbase.nut
│ │ ├── test_stale_stkbase.out
│ │ ├── tostring_recursion.nut
│ │ ├── tostring_recursion.out
│ │ ├── type_classes/
│ │ │ ├── test_builtin_constructors.nut
│ │ │ ├── test_builtin_constructors.out
│ │ │ ├── test_inheritance_error.nut
│ │ │ ├── test_inheritance_error.out
│ │ │ ├── test_unified_types.nut
│ │ │ └── test_unified_types.out
│ │ ├── type_hints/
│ │ │ ├── function_types.nut
│ │ │ ├── function_types.out
│ │ │ ├── var_decl.nut
│ │ │ └── var_decl.out
│ │ ├── type_inference/
│ │ │ ├── test_arithmetic_ok.nut
│ │ │ ├── test_arithmetic_ok.out
│ │ │ ├── test_array_literal_ok.nut
│ │ │ ├── test_array_literal_ok.out
│ │ │ ├── test_assignment_chain_ok.nut
│ │ │ ├── test_assignment_chain_ok.out
│ │ │ ├── test_call_result_ok.nut
│ │ │ ├── test_call_result_ok.out
│ │ │ ├── test_call_union_return_ok.nut
│ │ │ ├── test_call_union_return_ok.out
│ │ │ ├── test_class_literal_ok.nut
│ │ │ ├── test_class_literal_ok.out
│ │ │ ├── test_comparison_ok.nut
│ │ │ ├── test_comparison_ok.out
│ │ │ ├── test_complex_assign_ok.nut
│ │ │ ├── test_complex_assign_ok.out
│ │ │ ├── test_complex_bitwise_ok.nut
│ │ │ ├── test_complex_bitwise_ok.out
│ │ │ ├── test_complex_call_chain_ok.nut
│ │ │ ├── test_complex_call_chain_ok.out
│ │ │ ├── test_complex_deep_nesting_ok.nut
│ │ │ ├── test_complex_deep_nesting_ok.out
│ │ │ ├── test_complex_logical_ok.nut
│ │ │ ├── test_complex_logical_ok.out
│ │ │ ├── test_complex_mixed_arithmetic_ok.nut
│ │ │ ├── test_complex_mixed_arithmetic_ok.out
│ │ │ ├── test_complex_nested_ternary_ok.nut
│ │ │ ├── test_complex_nested_ternary_ok.out
│ │ │ ├── test_complex_nullcoalesce_ok.nut
│ │ │ ├── test_complex_nullcoalesce_ok.out
│ │ │ ├── test_complex_pure_chain_ok.nut
│ │ │ ├── test_complex_pure_chain_ok.out
│ │ │ ├── test_complex_return_expr_ok.nut
│ │ │ ├── test_complex_return_expr_ok.out
│ │ │ ├── test_complex_table_ternary_ok.nut
│ │ │ ├── test_complex_table_ternary_ok.out
│ │ │ ├── test_const_array4_ok.nut
│ │ │ ├── test_const_array4_ok.out
│ │ │ ├── test_const_array_ok.nut
│ │ │ ├── test_const_array_ok.out
│ │ │ ├── test_const_function_ok.nut
│ │ │ ├── test_const_function_ok.out
│ │ │ ├── test_const_inline_ok.nut
│ │ │ ├── test_const_inline_ok.out
│ │ │ ├── test_const_table_ok.nut
│ │ │ ├── test_const_table_ok.out
│ │ │ ├── test_destructure_array_default_ok.nut
│ │ │ ├── test_destructure_array_default_ok.out
│ │ │ ├── test_destructure_array_ok.nut
│ │ │ ├── test_destructure_array_ok.out
│ │ │ ├── test_destructure_from_function_ok.nut
│ │ │ ├── test_destructure_from_function_ok.out
│ │ │ ├── test_destructure_nested_ok.nut
│ │ │ ├── test_destructure_nested_ok.out
│ │ │ ├── test_destructure_table_ok.nut
│ │ │ ├── test_destructure_table_ok.out
│ │ │ ├── test_freeze_ok.nut
│ │ │ ├── test_freeze_ok.out
│ │ │ ├── test_function_literal_ok.nut
│ │ │ ├── test_function_literal_ok.out
│ │ │ ├── test_instance_from_class_ok.nut
│ │ │ ├── test_instance_from_class_ok.out
│ │ │ ├── test_literal_ok.nut
│ │ │ ├── test_literal_ok.out
│ │ │ ├── test_return_literal_ok.nut
│ │ │ ├── test_return_literal_ok.out
│ │ │ ├── test_string_concat_ok.nut
│ │ │ ├── test_string_concat_ok.out
│ │ │ ├── test_table_literal_ok.nut
│ │ │ ├── test_table_literal_ok.out
│ │ │ ├── test_table_return_ok.nut
│ │ │ ├── test_table_return_ok.out
│ │ │ ├── test_ternary_ok.nut
│ │ │ ├── test_ternary_ok.out
│ │ │ ├── test_typeof_ok.nut
│ │ │ └── test_typeof_ok.out
│ │ ├── valid_syntax/
│ │ │ ├── arrays.nut
│ │ │ ├── arrays.out
│ │ │ ├── classes.nut
│ │ │ ├── classes.out
│ │ │ ├── closures_scope.nut
│ │ │ ├── closures_scope.out
│ │ │ ├── control_flow.nut
│ │ │ ├── control_flow.out
│ │ │ ├── destructuring.nut
│ │ │ ├── destructuring.out
│ │ │ ├── enums_consts.nut
│ │ │ ├── enums_consts.out
│ │ │ ├── error_handling.nut
│ │ │ ├── error_handling.out
│ │ │ ├── functions.nut
│ │ │ ├── functions.out
│ │ │ ├── generators.nut
│ │ │ ├── generators.out
│ │ │ ├── literals.nut
│ │ │ ├── literals.out
│ │ │ ├── metamethods.nut
│ │ │ ├── metamethods.out
│ │ │ ├── misc.nut
│ │ │ ├── misc.out
│ │ │ ├── null_safety.nut
│ │ │ ├── null_safety.out
│ │ │ ├── operators.nut
│ │ │ ├── operators.out
│ │ │ ├── static_memo.nut
│ │ │ ├── static_memo.out
│ │ │ ├── strings.nut
│ │ │ ├── strings.out
│ │ │ ├── tables.nut
│ │ │ ├── tables.out
│ │ │ ├── threads.nut
│ │ │ ├── threads.out
│ │ │ ├── type_annotations.nut
│ │ │ ├── type_annotations.out
│ │ │ ├── variables.nut
│ │ │ └── variables.out
│ │ └── weird/
│ │ ├── 2000_args.nut
│ │ ├── 2000_args.out
│ │ ├── assign_to_optional_1.nut
│ │ ├── assign_to_optional_1.out
│ │ ├── assign_to_optional_2.nut
│ │ ├── assign_to_optional_2.out
│ │ ├── assign_to_optional_3.nut
│ │ ├── assign_to_optional_3.out
│ │ ├── many_locals.nut
│ │ └── many_locals.out
│ ├── proposed_optimizations/
│ │ ├── clone_newslot_vs_merge.nut
│ │ ├── filter_map_folding.nut
│ │ ├── filter_map_folding2.nut
│ │ └── strings_folding.nut
│ ├── static_analyzer/
│ │ ├── .sqconfig
│ │ ├── 200_nullc.diag.txt
│ │ ├── 200_nullc.nut
│ │ ├── function_rt_detect.diag.txt
│ │ ├── function_rt_detect.nut
│ │ ├── logic_ops_paren.diag.txt
│ │ ├── logic_ops_paren.nut
│ │ ├── module_foo.diag.txt
│ │ ├── module_foo.nut
│ │ ├── nullcheck_ternary.diag.txt
│ │ ├── nullcheck_ternary.nut
│ │ ├── pattern_class_check.diag.txt
│ │ ├── pattern_class_check.nut
│ │ ├── pattern_effect_from_call.diag.txt
│ │ ├── pattern_effect_from_call.nut
│ │ ├── pattern_forloop_merge.diag.txt
│ │ ├── pattern_forloop_merge.nut
│ │ ├── pattern_intersected_assignment.diag.txt
│ │ ├── pattern_intersected_assignment.nut
│ │ ├── pattern_lambdas.diag.txt
│ │ ├── pattern_lambdas.nut
│ │ ├── pattern_loop_state.diag.txt
│ │ ├── pattern_loop_state.nut
│ │ ├── pattern_param_check.diag.txt
│ │ ├── pattern_param_check.nut
│ │ ├── w190.diag.txt
│ │ ├── w190.nut
│ │ ├── w192.diag.txt
│ │ ├── w192.nut
│ │ ├── w200.diag.txt
│ │ ├── w200.nut
│ │ ├── w200_3wcmp.diag.txt
│ │ ├── w200_3wcmp.nut
│ │ ├── w200_arith.diag.txt
│ │ ├── w200_arith.nut
│ │ ├── w200_arith_deep.diag.txt
│ │ ├── w200_arith_deep.nut
│ │ ├── w200_arith_plus_eq.diag.txt
│ │ ├── w200_arith_plus_eq.nut
│ │ ├── w200_special_func_name.diag.txt
│ │ ├── w200_special_func_name.nut
│ │ ├── w200_static_memo_expr.diag.txt
│ │ ├── w200_static_memo_expr.nut
│ │ ├── w200_stringconcat.diag.txt
│ │ ├── w200_stringconcat.nut
│ │ ├── w203.diag.txt
│ │ ├── w203.nut
│ │ ├── w204.diag.txt
│ │ ├── w204.nut
│ │ ├── w205-2.diag.txt
│ │ ├── w205-2.nut
│ │ ├── w205.diag.txt
│ │ ├── w205.nut
│ │ ├── w206.diag.txt
│ │ ├── w206.nut
│ │ ├── w206_arith.diag.txt
│ │ ├── w206_arith.nut
│ │ ├── w208.diag.txt
│ │ ├── w208.nut
│ │ ├── w209.diag.txt
│ │ ├── w209.nut
│ │ ├── w210.diag.txt
│ │ ├── w210.nut
│ │ ├── w210_complex.diag.txt
│ │ ├── w210_complex.nut
│ │ ├── w210_deep.diag.txt
│ │ ├── w210_deep.nut
│ │ ├── w210_def.diag.txt
│ │ ├── w210_def.nut
│ │ ├── w211.diag.txt
│ │ ├── w211.nut
│ │ ├── w212.diag.txt
│ │ ├── w212.nut
│ │ ├── w213.diag.txt
│ │ ├── w213.nut
│ │ ├── w214.diag.txt
│ │ ├── w214.nut
│ │ ├── w214_static_memo_expr.diag.txt
│ │ ├── w214_static_memo_expr.nut
│ │ ├── w215.diag.txt
│ │ ├── w215.nut
│ │ ├── w215_nullc.diag.txt
│ │ ├── w215_nullc.nut
│ │ ├── w216.diag.txt
│ │ ├── w216.nut
│ │ ├── w217_break.diag.txt
│ │ ├── w217_break.nut
│ │ ├── w217_complex.diag.txt
│ │ ├── w217_complex.nut
│ │ ├── w217_cond_cont.diag.txt
│ │ ├── w217_cond_cont.nut
│ │ ├── w217_continue.diag.txt
│ │ ├── w217_continue.nut
│ │ ├── w217_ret.diag.txt
│ │ ├── w217_ret.nut
│ │ ├── w217_throw.diag.txt
│ │ ├── w217_throw.nut
│ │ ├── w220.diag.txt
│ │ ├── w220.nut
│ │ ├── w220_deep.diag.txt
│ │ ├── w220_deep.nut
│ │ ├── w221.diag.txt
│ │ ├── w221.nut
│ │ ├── w221_delete.diag.txt
│ │ ├── w221_delete.nut
│ │ ├── w222.diag.txt
│ │ ├── w222.nut
│ │ ├── w222_deep.diag.txt
│ │ ├── w222_deep.nut
│ │ ├── w222_inside_detructure.diag.txt
│ │ ├── w222_inside_detructure.nut
│ │ ├── w223.diag.txt
│ │ ├── w223.nut
│ │ ├── w223_method_is.diag.txt
│ │ ├── w223_method_is.nut
│ │ ├── w224_then.diag.txt
│ │ ├── w224_then.nut
│ │ ├── w224_while.diag.txt
│ │ ├── w224_while.nut
│ │ ├── w225.diag.txt
│ │ ├── w225.nut
│ │ ├── w225_empty_stmt.diag.txt
│ │ ├── w225_empty_stmt.nut
│ │ ├── w225_switch.diag.txt
│ │ ├── w225_switch.nut
│ │ ├── w226.diag.txt
│ │ ├── w226.nut
│ │ ├── w227.diag.txt
│ │ ├── w227.nut
│ │ ├── w227_external.diag.txt
│ │ ├── w227_external.nut
│ │ ├── w227_fn_with_same_param.diag.txt
│ │ ├── w227_fn_with_same_param.nut
│ │ ├── w227_foreach_destr_shadow.diag.txt
│ │ ├── w227_foreach_destr_shadow.nut
│ │ ├── w227_let_init_fun.diag.txt
│ │ ├── w227_let_init_fun.nut
│ │ ├── w227_table.diag.txt
│ │ ├── w227_table.nut
│ │ ├── w227_varargs.diag.txt
│ │ ├── w227_varargs.nut
│ │ ├── w228.diag.txt
│ │ ├── w228.nut
│ │ ├── w228_2.diag.txt
│ │ ├── w228_2.nut
│ │ ├── w228_3.diag.txt
│ │ ├── w228_3.nut
│ │ ├── w228_4.diag.txt
│ │ ├── w228_4.nut
│ │ ├── w228_foreach_destr_default_uses.diag.txt
│ │ ├── w228_foreach_destr_default_uses.nut
│ │ ├── w228_table.diag.txt
│ │ ├── w228_table.nut
│ │ ├── w228_trivial.diag.txt
│ │ ├── w228_trivial.nut
│ │ ├── w229.diag.txt
│ │ ├── w229.nut
│ │ ├── w230_unused_import.diag.txt
│ │ ├── w230_unused_import.nut
│ │ ├── w231.diag.txt
│ │ ├── w231.nut
│ │ ├── w232_cascade.diag.txt
│ │ ├── w232_cascade.nut
│ │ ├── w232_false.diag.txt
│ │ ├── w232_false.nut
│ │ ├── w232_lambda.diag.txt
│ │ ├── w232_lambda.nut
│ │ ├── w232_not.diag.txt
│ │ ├── w232_not.nut
│ │ ├── w232_ter.diag.txt
│ │ ├── w232_ter.nut
│ │ ├── w232_ternary.diag.txt
│ │ ├── w232_ternary.nut
│ │ ├── w232_true.diag.txt
│ │ ├── w232_true.nut
│ │ ├── w233.diag.txt
│ │ ├── w233.nut
│ │ ├── w234.diag.txt
│ │ ├── w234.nut
│ │ ├── w234_outer.diag.txt
│ │ ├── w234_outer.nut
│ │ ├── w235.diag.txt
│ │ ├── w235.nut
│ │ ├── w236.diag.txt
│ │ ├── w236.nut
│ │ ├── w238_heuristic.diag.txt
│ │ ├── w238_heuristic.nut
│ │ ├── w238_idname.diag.txt
│ │ ├── w238_idname.nut
│ │ ├── w238_isis.diag.txt
│ │ ├── w238_isis.nut
│ │ ├── w238_merge.diag.txt
│ │ ├── w238_merge.nut
│ │ ├── w238_sqconfig.diag.txt
│ │ ├── w238_sqconfig.nut
│ │ ├── w239.diag.txt
│ │ ├── w239.nut
│ │ ├── w239_sqconfig.diag.txt
│ │ ├── w239_sqconfig.nut
│ │ ├── w240.diag.txt
│ │ ├── w240.nut
│ │ ├── w241.diag.txt
│ │ ├── w241.nut
│ │ ├── w241_conditional.diag.txt
│ │ ├── w241_conditional.nut
│ │ ├── w244.diag.txt
│ │ ├── w244.nut
│ │ ├── w248.diag.txt
│ │ ├── w248.nut
│ │ ├── w248_access.diag.txt
│ │ ├── w248_access.nut
│ │ ├── w248_additional.diag.txt
│ │ ├── w248_additional.nut
│ │ ├── w248_andand.diag.txt
│ │ ├── w248_andand.nut
│ │ ├── w248_andor.diag.txt
│ │ ├── w248_andor.nut
│ │ ├── w248_array.diag.txt
│ │ ├── w248_array.nut
│ │ ├── w248_assert.diag.txt
│ │ ├── w248_assert.nut
│ │ ├── w248_chain.diag.txt
│ │ ├── w248_chain.nut
│ │ ├── w248_complex2.diag.txt
│ │ ├── w248_complex2.nut
│ │ ├── w248_complex_key.diag.txt
│ │ ├── w248_complex_key.nut
│ │ ├── w248_complexcond.diag.txt
│ │ ├── w248_complexcond.nut
│ │ ├── w248_eq_get.diag.txt
│ │ ├── w248_eq_get.nut
│ │ ├── w248_evaled.diag.txt
│ │ ├── w248_evaled.nut
│ │ ├── w248_getfield.diag.txt
│ │ ├── w248_getfield.nut
│ │ ├── w248_in.diag.txt
│ │ ├── w248_in.nut
│ │ ├── w248_in_container.diag.txt
│ │ ├── w248_in_container.nut
│ │ ├── w248_not.diag.txt
│ │ ├── w248_not.nut
│ │ ├── w248_nullc_2.diag.txt
│ │ ├── w248_nullc_2.nut
│ │ ├── w248_nullc_3.diag.txt
│ │ ├── w248_nullc_3.nut
│ │ ├── w248_oror.diag.txt
│ │ ├── w248_oror.nut
│ │ ├── w248_oror2.diag.txt
│ │ ├── w248_oror2.nut
│ │ ├── w248_override.diag.txt
│ │ ├── w248_override.nut
│ │ ├── w248_relative_pred.diag.txt
│ │ ├── w248_relative_pred.nut
│ │ ├── w248_special_name_func.diag.txt
│ │ ├── w248_special_name_func.nut
│ │ ├── w248_terminated_branch1.diag.txt
│ │ ├── w248_terminated_branch1.nut
│ │ ├── w248_tyopeof1.diag.txt
│ │ ├── w248_tyopeof1.nut
│ │ ├── w248_tyopeof2.diag.txt
│ │ ├── w248_tyopeof2.nut
│ │ ├── w248_type_func.diag.txt
│ │ ├── w248_type_func.nut
│ │ ├── w248_while_cond.diag.txt
│ │ ├── w248_while_cond.nut
│ │ ├── w250_array.diag.txt
│ │ ├── w250_array.nut
│ │ ├── w250_container.diag.txt
│ │ ├── w250_container.nut
│ │ ├── w254.diag.txt
│ │ ├── w254.nut
│ │ ├── w254_instanceof.diag.txt
│ │ ├── w254_instanceof.nut
│ │ ├── w254_notin.diag.txt
│ │ ├── w254_notin.nut
│ │ ├── w255.diag.txt
│ │ ├── w255.nut
│ │ ├── w255_2.diag.txt
│ │ ├── w255_2.nut
│ │ ├── w255_foreach_destr_distinct.diag.txt
│ │ ├── w255_foreach_destr_distinct.nut
│ │ ├── w256.diag.txt
│ │ ├── w256.nut
│ │ ├── w257.diag.txt
│ │ ├── w257.nut
│ │ ├── w258.diag.txt
│ │ ├── w258.nut
│ │ ├── w258_2.diag.txt
│ │ ├── w258_2.nut
│ │ ├── w259.diag.txt
│ │ ├── w259.nut
│ │ ├── w260_local_function.diag.txt
│ │ ├── w260_local_function.nut
│ │ ├── w260_table.diag.txt
│ │ ├── w260_table.nut
│ │ ├── w260_table_sqconfig.diag.txt
│ │ ├── w260_table_sqconfig.nut
│ │ ├── w262.diag.txt
│ │ ├── w262.nut
│ │ ├── w263.diag.txt
│ │ ├── w263.nut
│ │ ├── w264.diag.txt
│ │ ├── w264.nut
│ │ ├── w266.diag.txt
│ │ ├── w266.nut
│ │ ├── w267.diag.txt
│ │ ├── w267.nut
│ │ ├── w269.diag.txt
│ │ ├── w269.nut
│ │ ├── w270.diag.txt
│ │ ├── w270.nut
│ │ ├── w271.diag.txt
│ │ ├── w271.nut
│ │ ├── w272.diag.txt
│ │ ├── w272.nut
│ │ ├── w275.diag.txt
│ │ ├── w275.nut
│ │ ├── w275_all_variants.diag.txt
│ │ ├── w275_all_variants.nut
│ │ ├── w275_complex.diag.txt
│ │ ├── w275_complex.nut
│ │ ├── w277.diag.txt
│ │ ├── w277.nut
│ │ ├── w279_1.diag.txt
│ │ ├── w279_1.nut
│ │ ├── w279_2.diag.txt
│ │ ├── w279_2.nut
│ │ ├── w280.diag.txt
│ │ ├── w280.nut
│ │ ├── w281.diag.txt
│ │ ├── w281.nut
│ │ ├── w283.diag.txt
│ │ ├── w283.nut
│ │ ├── w284.diag.txt
│ │ ├── w284.nut
│ │ ├── w285.diag.txt
│ │ ├── w285.nut
│ │ ├── w286.diag.txt
│ │ ├── w286.nut
│ │ ├── w286_2.diag.txt
│ │ ├── w286_2.nut
│ │ ├── w286_oror_andand.diag.txt
│ │ ├── w286_oror_andand.nut
│ │ ├── w287.diag.txt
│ │ ├── w287.nut
│ │ ├── w288.diag.txt
│ │ ├── w288.nut
│ │ ├── w288_dp_va.diag.txt
│ │ ├── w288_dp_va.nut
│ │ ├── w288_lambdas2.diag.txt
│ │ ├── w288_lambdas2.nut
│ │ ├── w288_native.diag.txt
│ │ ├── w288_native.nut
│ │ ├── w288_require.diag.txt
│ │ ├── w288_require.nut
│ │ ├── w288_require_indirect.diag.txt
│ │ ├── w288_require_indirect.nut
│ │ ├── w289.diag.txt
│ │ ├── w289.nut
│ │ ├── w291.diag.txt
│ │ ├── w291.nut
│ │ ├── w292.diag.txt
│ │ ├── w292.nut
│ │ ├── w293.diag.txt
│ │ ├── w293.nut
│ │ ├── w295.diag.txt
│ │ ├── w295.nut
│ │ ├── w297.diag.txt
│ │ ├── w297.nut
│ │ ├── w305.diag.txt
│ │ ├── w305.nut
│ │ ├── w306.diag.txt
│ │ ├── w306.nut
│ │ ├── w308.diag.txt
│ │ ├── w308.nut
│ │ ├── w309_require.diag.txt
│ │ ├── w309_require.nut
│ │ ├── w310_require.diag.txt
│ │ ├── w310_require.nut
│ │ ├── w312_require.diag.txt
│ │ ├── w312_require.nut
│ │ ├── w318_merge_empty_table.diag.txt
│ │ ├── w318_merge_empty_table.nut
│ │ ├── w319_empty_array_resize.diag.txt
│ │ ├── w319_empty_array_resize.nut
│ │ ├── w320.diag.txt
│ │ ├── w320.nut
│ │ ├── w321.diag.txt
│ │ ├── w321.nut
│ │ ├── w322.diag.txt
│ │ └── w322.nut
│ └── types/
│ ├── default_values.nut.txt
│ ├── default_values.out
│ ├── default_values_invalid.nut.txt
│ ├── default_values_invalid.out
│ ├── invalid.nut.txt
│ ├── invalid.out
│ ├── type_suggestions.nut.txt
│ ├── type_suggestions.out
│ ├── valid.nut.txt
│ └── valid.out
└── testRunner.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/docs_build_deploy.yaml
================================================
name: Docs - build and deploy
on:
push:
branches:
- master
paths:
- "doc/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact_name: ${{ steps.artifact_name.outputs.artifact_name }}
permissions:
contents: read
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
working-directory: ./doc
run: python3 -m pip install -r requirements.txt
- name: Build documentation with sphinx-build
working-directory: ./doc
run: sphinx-build -b html -d build/doctrees source build/html
- name: Generate artifact name
id: artifact_name
run: |
export AN=docs_html_$(date +'%Y%m%dT%H%M%S')
echo Generated artifact name: ${AN}
echo "ARTIFACT_NAME=${AN}" >> $GITHUB_ENV
echo "artifact_name=${AN}" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./doc/build/html
retention-days: 1
if-no-files-found: error
deploy:
needs: build
runs-on: ubuntu-latest
env:
ARTIFACT_NAME: ${{ needs.build.outputs.artifact_name }}
permissions:
actions: read
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./doc
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DOC_KEYID }}
aws-secret-access-key: ${{ secrets.DOC_SECRET }}
aws-region: eu-west-1
- name: Update target
run: |
aws s3 sync ./doc s3://quirrel.io/doc
aws cloudfront create-invalidation --distribution-id ${{ secrets.DOC_DISTID }} --paths "/*"
================================================
FILE: .gitignore
================================================
# Folders created at compilation
bin/
lib/
# CMake output
build*/
# Folders created at documentation generation
doc/build/
Release/
.vs/
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
.vscode/
================================================
FILE: .travis.yml
================================================
language: cpp
compiler:
- gcc
- clang
# Travis VMs are 64-bit but we compile both for 32 and 64 bit. To enable the
# 32-bit builds to work, we need gcc-multilib.
addons:
apt:
packages:
- gcc-multilib
- g++-multilib
# Enable container-based builds.
sudo: false
script: mkdir build && cd build && cmake .. && make -j2
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.5)
project(squirrel VERSION 4.0 LANGUAGES C CXX)
option(ENABLE_VAR_TRACE "Enable variable change tracing feature.")
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif ()
include(GNUInstallDirs)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_CXX_STANDARD 17)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(
"$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti;-fno-exceptions>"
-fno-strict-aliasing
-Wall
-Wextra
-pedantic
-Wcast-qual
-Wno-unused-parameter
-Wno-missing-field-initializers
"$<$<CONFIG:Release>:-O3>"
"$<$<CONFIG:RelWithDebInfo>:-O3;-g>"
"$<$<CONFIG:MinSizeRel>:-Os>"
)
# Debug flags
if(CMAKE_COMPILER_IS_GNUCXX)
add_compile_options("$<$<CONFIG:Debug>:-g3;-Og>")
else()
# Clang debug flags
add_compile_options("$<$<CONFIG:Debug>:-g;-Og>")
endif()
elseif(MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_compile_options(/wd4244 /wd4018 /wd4267) # disable type conversion warnings
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_compile_definitions(_SQ64)
endif()
add_subdirectory(squirrel)
add_subdirectory(squirrel/compiler)
add_subdirectory(sqstdlib)
add_subdirectory(sqmodules)
add_subdirectory(sq)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-config-version.cmake"
VERSION "${squirrel_VERSION}"
COMPATIBILITY AnyNewerVersion
)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/squirrel-config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/squirrel/squirrel-config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/squirrel"
)
================================================
FILE: COPYRIGHT
================================================
Copyright (c) 2003-2017 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.
-----------------------------------------------------
END OF COPYRIGHT
================================================
FILE: HISTORY
================================================
***version 4.5.0***
* add 'let' keyword and unsassignable named bindings
***version 4.4.0***
* base lib: container methods check object immutability
* more meaningful error for wrong enum field
* put 'stream' class into target table instead of root
Also expose expicit sqstd_init_streamclass() to allow placing
stream class into specific table
* register base lib as compile-time bindings
* remove setroottable()/setconsttable() script functions
* base lib: add println() and errorln() functions
***version 4.3.0 stable***
* baselib: move some global constants to getbuildinfo() method
* always use modules in commandline interpreter
* use compile-time bindings for reference modules implementation
* check thread-safety during code execution
* str.indexof and str.contains now throws error on empty substring.
* (bugfix) don't add object to ref table in GetRefCount()
* (experimental) new operator ':=' for assignment inside if, for, while, switch
***version 4.2.0 stable***
* make commas in destructuring assignment optional
* change constant tables handling by compiler
Earlier only enums could be found in compile-time constants. But now we have immutable objects
***version 4.1.0 stable***
-introduced immutable objects
-switched to semantic versioning
-changed SQUIRREL_VERSION_NUMBER to SQUIRREL_VERSION_NUMBER_MAJOR, SQUIRREL_VERSION_NUMBER_MINOR
and SQUIRREL_VERSION_PATCH and removed sq_getversion() because of ambiguity of encoding
semantic version into single integer number
***version 4.0.0 stable***
-renamed to Quirrel
-bumped version
-lots of changes - see diff_from_original_squirrel
***version 3.2 stable***
-added sq_tailcall
-added rawcall keyword
-added post call initializer syntax
-added table.keys() and table.values()
-added table.filter()
-additional parameters in array.map() and array.apply()
-additional optional initializer in array.reduce()
-closure.call() is now a "native tailcall" and the invoked function can now be suspended
-fixed sq_newmember and sq_rawnewmember properly pop parameters
-fixed capturing free variable on for loop counter before a break statement
-fixed \u in lexer
-various bugfixes
***version 3.1.1 stable***
-sq_gettypetag doesn't set last error(it's treated as SQBool function but keeps a SQRESULT for backward compatibility)
-fixed _set method in userdata delegates
-fixed some warnings
***version 3.1 stable***
-added slice range for tolower and toupper
-added startswith() and endswith() in string lib
-added SQ_EXCLUDE_DEFAULT_MEMFUNCTIONS to exclude default mem fuction from compilation
-added sq_getreleasehook
-added thread.wakeupthrow()
-added sq_pushthread
-added \u and \U escape sequence for UTF8,UTF16 or UCS4 characters
-added CMake scripts(thx Fabian Wolff)
-the escape character \x is based on sizeof(SQChar)
-fixed several warnings(thx Markus Oberhumer)
-fixed optimizer bug in compound arith oprators(+=,-= etc...)
-fixed sq_getrefvmcount() (thx Gerrit)
-fixed sq_getrefcount() when no references were added with sq_addref() (thx Gerrit)
-fixed bug in string.tointeger() (thx Domingo)
-fixed weakref comparison in 32bit builds using doubles(thx Domingo)
-fixed compiler bug(thx Peter)
-fixed some error in the documentation(thx Alexander)
-fixed some error reporting in compiler(thx Alexander)
-fixed incorrect optional semicolon after "if block"(thx Alexander)
-fixed crash bug in compiler related to compound arith operators(+=,-= etc...) (thx Jeff1)
***2015-01-10 ***
***version 3.1 RC 1***
-added new header sqconfig.h for all optional type declarations(unicode, 64bits etc..)
-added sq_setsharedforeignptr sq_getsharedforeignptr
-added sq_setsharedreleasehook sq_getsharedreleasehook
-added escape() in sqstd string library
-added __LINE__ and __FILE__ (thx mingodad)
-widechar support on gcc builds
-now boolean can be used in constants
-reduced dependencies on C runtime library
-newthread and sq_newthread() no longer reinitialize the root table on friend VMs(thx Lucas Cardellini)
-exceptions in the _inherited metamethod are propagated(thx Lucas Cardellini)
-'in' operator performance improvement(thx unagipai and mingodad)
-fixes crash in compiler when trying to write 'base'
-fixed bug in switch statement when using locals as case values (thx mingodad)
-fixed bug in print()(thx Lucas Cardellini)
***2013-08-30 ***
***version 3.1 beta 1***
-added new scoping rule(root attached to closures)
-added closure.setroot() closure.getroot()
-added sq_setclosureroot() and sq_getclosureroot()
-added sq_setvmreleasehook() and sq_getvmreleasehook()
-added documentaion for sq_getbase()
-now string.tointeger() accepts an optional parameter 'base'
-now format accepts zeroes in the format string (thx mingodad)
-fixed bug in sqstd_createfile() (thx mingodad)
-minor buxfixes
***2012-11-10 ***
***version 3.0.4 stable***
-sq_deleteslot slot now pops the key in case of failure
-fixed bug when _get metamethod throws null
-fixed a bug in rstrip
-added some error handling
-minor bugfixes
***2012-06-19 ***
***version 3.1.0 alpha 1***
-changed in and instanceof operator precendence
-root object in closures
-added closure.setroot closure.getroot
-added sq_setclosureroot and sq_getclosureroot
***version 3.0.3 stable***
-improved error messages for _cmp(when a non integer value is returned) (thx Yexo)
-added class.newmember() built in method (thx Nam)
-added class.rawnewmember() built in method (thx Nam)
-added sq_rawnewmember() (thx Nam)
-added sq_getversion()
-added sq_typeof()
-added sq_getclosurename()
-added file.close() in stdlib
-documented closure.getinfos() built-in method
-fixed string iteration doesn't return negative numbers for characters > 127
-fixed bug in tofloat() when converting a string with scientific notation without a decimal point (thx wr2)
-fixed potential infinite loop in array.sort() when the _cmp function is inconsistent (thx Yexo)
-fixed obscure bug in the compiler(thx yishin)
-fixed some minor bug
***2011-11-28 ***
***version 3.0.2 stable***
-added sq_gethash API
-now array.sort() is implemented with heapsort
-now floats in scientific notation also accept numbers with no '.' (eg. 1e+6 or 1e6)
-fixed some warning
-fixed some documentation
-fixed bug in GC
***2011-09-08 ***
***version 3.0.1 stable***
-added # as alternative symbol for "line comment"(mostly useful for shell scripts)
-added sq_throwobject() to throw an arbitrary object from the C API
-added alignement flag for userdata types, SQ_ALIGNMENT (thx Shigemasa)
-added rawset() and rawget() to class and instance default delegate
-changed bytecode format now ensures matching integer size and float size
-now inherited classes also inherit userdatasize
-added SQUIRREL_VERSION_NUMBER in squirrel.h and _versionnumber_ global symbol
-fixed sq_getmemberhandle
-fixed sq_getrefcount
-refactored some sqstdio code
-refactored some clone code
-refactored some stuff in the string lib
-added -s and -fno-exceptions in GCC makefile(better performance when using GCC)
***2011-03-13 ***
***version 3.0 stable***
-added sq_getcallee()
-sq_getfreevariable() also works for native closures
-minior optimizations
-removed several warning when compiling with GCC 4.x
-fixed some errors in the documentation
-fixed bug when using SQUSEDOUBLE and 32bits intengers
-fixed bug when invoking generators with closure.call() (thx huntercool)
***2010-12-19 ***
***version 3.0 release candidate 1(RC 1)***
-improved metamethods error handling
-added parameter 'isstatic' to _newmember metamethod(thx G.Meyer)
-added sq_getrefcount() to return number of refences from C++(thx G.Meyer)
***2010-11-07 ***
***version 3.0 beta 3***
-license changed to "MIT license"
-added sq_resurrectunreachable() and resurrectunreachable()
-added callee() built in function, returns the current running closure
-added thread.getstackinfos()
-added sq_objtouserpointer()
-added sq_newtableex()
-various refactoring and optimizations
-fixed several 64bits issues regarding integer to string conversions
-fixed some bugs when SQUSEDOUBLE is used in 32bits systems
***2010-08-18 ***
***version 3.0 beta 2.1***
-fixed bug in class constructor
-fixed bug in compound arith
***2010-08-12 ***
***version 3.0 beta 2***
-class methods can be added or replaced after the class as been instantiated
-JSON compliant table syntax, this is currently an experimental feature (thx atai)
-sq_getsize() now returns userdatasize for classes and instances
-now setroottable() and setconsttable() return the previous value of the respective table
-fixed bug in compound arith operators when used on a free variable (thx ellon)
-fixed some x64 minor bugs
-fixed minor bug in the compiler
-refactored some VM internals
-documented sq_getmemberhandle, sq_getbyhandle, sq_setbyhandle to set and get value from classes
***2009-11-15 ***
***version 3.0 beta 1***
-various refactoring and optimizations
-fixed bug in free variables (thx mokehehe)
-fixed bug in functions with default parameters (thx ara & Yexo)
-fixed bug in exception handling
-improved error propagation in _set and _get metamethods ( and 'throw null' for clean failure)
-added sq_getmemberhandle, sq_getbyhandle, sq_setbyhandle to set and get value from classes
***2009-06-30 ***
***version 3.0 alpha 2***
-added real free variables(thx Paul Ruizendaal)
-added refactored function call implementation and compiler(thx Paul Ruizendaal)
-added sq_getfunctioninfo
-added compile time flag SQUSEDOUBLE to use double precision floats
-added global slot _floatsize_ int the base lib to recognize single precision and double precision builds
-sq_wakeupvm can now resume the vm with an exception
-added sqstd_format
-now blobs can be cloned
-generators can now be instantiated by calling sq_call() or closure.call()
-fixed debughook bug
-fixed cooroutine error propagation
***2008-07-23 ***
***version 3.0 alpha 1***
-first branch from 2.x source tree
-added 'base' keyword
-removed 'delegate' keyword
-now compiled scripts are vararg functions
-added setdelegate() and getdelegate() table builtin methods
-added <=> 3 ways compare operator
-added lambda expression @(a,b) a + b
-added local function statement
-added array built-in map(),reduce(),apply(),filter() and find()
-generators hold only a weak reference of the enviroment object
-removed 'vargv' and 'vargc' keywords
-now var args are passed as an array called vargv(as a paramter)
-removed 'parent' keyword
-added class getbase() built in method
-instanceof doesn't throw an exception if the left expression is not a class
-lexical scoping for free variables(free variables are no longer in the second parameter list)
-sq_setprintfunc accept error func
-sq_geterrorfunc()
-added sq_arrayremove() and sq_arrayinsert()
-error() built in function(works like print but prints using the errorfunc)
-added native debug hook
***2008-02-17 ***
***version 2.2 stable***
-added _newslot metamethod in classes
-added enums added constants
-added sq_pushconsttable, sq_setconsttable
-added default param
-added octal literals(thx Dinosaur)
-fixed debug hook, 'calls' and 'returns' are properly notified in the same number.
-fixed a coroutine bug
***2007-07-29 ***
***version 2.1.2 stable***
-new behaviour for generators iteration using foreach
now when a generator is iterated by foreach the value returned by a 'return val' statement
will terminate the iteration but will not be returned as foreach iteration
-added sq_setclassudsize()
-added sq_clear()
-added table.clear(), array.clear()
-fixed sq_cmp() (thx jyuill)
-fixed minor bugs
***2006-08-21 ***
***version 2.1.1 stable***
-vm refactoring
-optimized internal function memory layout
-new global symbol _version_ (is the version string)
-code size optimization for float literals(on 32bits float builts)
-now the raw ref API(sq_addref etc...) is fully reentrant.
-fixed a bug in sq_getdelegate() now pushes null if the object doesn't have a delegate(thx MatzeB)
-improved C reference performances in NO_GARBAGE_COLLECTOR builds
-sq_getlocal() now enumerates also outer values.
-fixed regexp library for GCC users.
***2006-03-19 ***
***version 2.1 stable***
-added static class fields, new keyword static
-added 64bits architecture support
-added global slot _intsize_ int the base lib to recognize 32bits and 64bits builds
-added functions with fixed environment, closure.bindenv() built-in function
-all types except userdata and null implement the tostring() method
-string concatenation now invokes metamethod _tostring
-new metamethods for class objects _newmember and _inherited
-sq_call() sq_resume() sq_wakeupvm() have a new signature
-new C referencing implementation(scales more with the amount of references)
-refactored hash table
-new api functions sq_newslot(),sq_tobool(),sq_getbase(), sq_instanceof(), sq_bindenv()
-the api func sq_createslot was deprecated but still supported in form of C macro on top of sq_newslot
-sq_setreleasehook() now also works for classes
-stream.readstr() and stream.writestr() have been deprecated(this affects file and blob)
-fixed squirrel.h undeclared api calls
-fixed few minor bugs
-SQChar is now defined as wchar_t
-removed warning when building with -Wall -pedantic for GCC users
-added new std io function writeclosuretofile()
-added new std string functions strip(),rstrip(),lstrip() and split()
-regular expressions operators (+,*) now have more POSIX greedyness behaviour
-class constructors are now invoked as normal functions
***2005-10-02 ***
***version 2.0.5 stable***
-fixed some 64bits incompatibilities (thx sarge)
-fixed minor bug in the stdlib format() function (thx Rick)
-fixed a bug in dofile() that was preventing to compile empty files
-added new API sq_poptop() & sq_getfreevariable()
-some performance improvements
***2005-08-14 ***
***version 2.0.4 stable***
-weak references and related API calls
-added sq_objtobool()
-class instances memory policies improved(1 mem allocation for the whole instance)
-typetags are now declared as SQUserPointer instead of unsigned int
-first pass for 64bits compatibility
-fixed minor bug in the stdio stream
-fixed a bug in format()
-fixed bug in string.tointeger() and string.tofloat()
***2005-06-24 ***
***version 2.0.3 stable***
-dofile() and loadfile() in the iolib now can decode ASCII, UTF8 files UCS2 big-endian and little-endian
-sq_setparamscheck() : now typemesk can check for null
-added string escape sequence \xhhhh
-fixed some C++ standard incompatibilities
***2005-05-15 ***
***version 2.0.2 stable***
-performances improvements (expecially for GCC users)
-removed all dependencies from C++ exception handling
-various bugfixes
***2005-04-12 ***
***version 2.0.1 stable***
-various bugfixes
-sq_setparamscheck() now allows spaces in the typemask
***2005-04-03 ***
***version 2.0 stable***
-added API sq_gettypetag()
-added built-in function to the bool type(tointeger, tostring etc...)
***2005-02-27 ***
***version 2.0 release candidate 1(RC 1)***
-added API sq_reseterror()
-modified sq_release()
-now class instances can be cloned
-various bufixes
***2005-01-26 ***
***version 2.0 beta 1***
-added bool type
-class properties can be redefined in a derived class
-added ops *= /= and %=
-new syntax for class attributes declaration </ and /> instead of ( and )
-increased the max number of literals per function from 65535 to 16777215
-now free variables have proper lexical scoping
-added API sq_createinstance(), sq_pushbool(), sq_getbool()
-added built-in function type()
-added built-in function obj.rawin(key) in table,class and instance
-sq_rawget() and sq_rawset() now work also on classes and instances
-the VM no longer uses C++ exception handling (more suitable for embedded devices)
-various bufixes
***2004-12-21 ***
***version 2.0 alpha 2***
-globals scoping changed, now if :: is omitted the VM automatically falls back on the root table
-various bufixes
-added class level attributes
***2004-12-12 ***
***version 2.0 alpha 1***
-codebase branch from version 1.x
-added classes
-added functions with variable number of parameters(vargc & vargv and the ...)
-0 and 0.0 are now considered 'false' by all conditional statements(if,while,for,?,do-while)
-added new api functions sq_newclass() sq_setinstanceup() sq_getinstanceup() sq_getattributes() sq_setattributes()
-modified api sq_settypetag()
***2004-11-01 ***
***version 1.0 stable***
-fixed some minor bug
-improved operator 'delete' performances
-added scientific notation for float numbers( eg. 2.e16 or 2.e-2)
***2004-08-30 ***
***version 1.0 release candidate 2(RC 2)***
-fixed bug in the vm(thx Pierre Renaux)
-fixed bug in the optimizer(thx Pierre Renaux)
-fixed some bug in the documentation(thx JD)
-added new api functions for raw object handling
-removed nested multiline comments
-reduced memory footprint in C references
***2004-08-23 ***
***version 1.0 release candidate 1(RC 1)***
-fixed division by zero
-the 'in' operator and obj.rawget() do not query the default delegate anymore
-added function sq_getprintfunc()
-added new standard library 'auxlib'(implements default error handlers)
***2004-07-12 ***
***version 1.0 beta 4***
-fixed a bug in the integer.tochar() built-in method
-fixed unary minus operator
-fixed bug in dofile()
-fixed inconsistency between != and == operators(on float/integer comparison)
-added javascript style unsigned right shift operator '>>>'
-added array(size) constructor built-in function
-array.resize(size,[fill]) built-in function accepts an optional 'fill' value
-improved debug API, added sq_getclosureinfo() and sq_setnativeclosurename()
***2004-05-23 ***
***version 1.0 beta 3***
-minor vm bug fixes
-string allocation is now faster
-tables and array memory usage is now less conservative(they shrink)
-added regular expression routines in the standard library
-The 'c' expression now accepts only 1 character(thx irbrian)
-multiline strings <[ ]> have been substituted with C# style verbatim strings (eg. @"string")
-added new keyword 'parent' for accessing the delegate of tables and unserdata
-The metamethod '_clone' has been renamed '_cloned'
-the _delslot metamethod's behaviour and prototype have been changed
-new default function in the integer and float object 'tochar()'
-the built-in function chcode2string has been removed
-the default method [table].getdelegate() has been removed
-new api sq_rawdeleteslot()
-new table built-in method rawdelete(key)
-the dynamic mudule loading has been removed from the standard distribution
-some optimizations in the VM
***2004-04-21 ***
***version 1.0 beta 2***
-minor compiler/parser bug fixes
-sq_newclosure has a different prototype, the "paramscheck" of paramter has been moved to the new function sq_setparamscheck()
-sq_setparamscheck allows to add automatic parameters type checking in native closures
-sq_compile() lost the lineinfo parameter
-new api sq_enabledebuginfo() globally sets compiler's debug info generation
-added consistency check on bytecode serialization
-fixed += operator, now works on strings like +
-added global slot in the base lib _charsize_ to recognize unicode builds from ascii builds runtime
-added registry table
-new api call sq_pushregistrytable()
-added type tag to the userdata type sq_settypetag()
-sq_getuserdata now queries the userdata typetag
-the built in function collect_garbage() as been renamed collectgarbage() for consistency reasons
-new standard libraries(sqlibs are now obsolete)
***2004-02-20 ***
***version 1.0 beta 1***
-fixed a bug in the compiler (thanks Martin Kofler)
-fixed bug in the switch case statement
-fixed the _unm metamethod
-fixed minor bugs in the API
-fixed automatic stack resizing
-first beta version
first pass code clean up in the VM and base lib
first pass code coverege test has been done on VM and built-in lib
-new VM creation API sq_open() sq_close() (sq_newvm and sq_releasevm are now obsolete)
-new api allows to specifiy a "print" function to output text(sq_printfunc)
-added some small optimizations
-new cooperative multi-threading capabilities in the base library(coroutines), VMs are now a built in type("thread")
-new built in functions have been added for manipulating the new "thread" type
-friend virtual machines share the same root table, error handler and debug hook by default
-new compile time options
***2004-01-19 ***
***version 0.9 alpha***
-fixed a garbage collection bug
-fixed some API bugs(thanks to Joshua Jensen)
-fixed tail calls (in the version 0.8 the tail call optimization was erroneously disabled)
-new function parameters semantic, now passing a wrong number of parameters generates an exception
-native closures have now a built in parameter number checking
-sq_rawget and sq_rawset now work also on arrays
-sq_getsize now woks also on userdata
-the userdata release hook prototype is changed(now passes the size of the userdata)
-the lexer reader function now returns an integer instead of a char that allows better error checking on the input(thx Joshua Jensen)
-faster compiler
-try/catch blocks do not cause any runtime memory allocation anymore
***2003-12-06 ***
***version 0.8 alpha***
-fixed a bug that was preventing to have callable userdata throught the metamethod _call
-fixed a garbage collection bug
-fixed == operator now can compare correctly different types
-new built in method getstackinfos(level)
-improved line informations precision for the debug hook
-new api call sq_compilebuffer()
-new built-in api function compilestring()
-new syntactic sugar for function declarations inside tables
-the debug API has been finalized
***2003-11-17 ***
***version 0.7 alpha***
-fixed critical bug SQInteger the tail call system
-fixed bug in the continue statement code generation
-fixed func call param issue(thanks to Rewoonenco Andrew)
-added _delslot metamethod(thanks to Rewoonenco Andrew)
-new multiline string expression ( delimited by <[ and ]> )
-normal strings ("") do not allow embedded new line anymore
-reduced vm memory footprint(C refs are shared between friend VMs)
-new api method sq_deleteslot()
-new debug hook event 'r' is triggered when a function returns
***2003-11-04 ***
***version 0.6 alpha***
-fixed switch statement(was executing the default case after a break)
-sq_call() doesn't pop the closure (just the params)
-the vm execution can be suspended from the C API anytime (micro-threads)
-new api calls sq_suspendvm() sq_wakeupvm() sq_getvmstate() and sq_reservestack()
***2003-10-13 ***
***version 0.5 alpha***
-fixed some minor bug
-tested with non ASCII identifiers in unicode mode(I've tried chinese chars)
-added built-in function string.find()
-the built-in function array.sort() optionally accepts a cmp(a,b) function
-the debug hook function now has a new prototype debug_hook(event_type,sourcefile,line,functionname)
-fixed some debug info imprecision
***2003-10-01 ***
***version 0.4 alpha***
-faster VM
-sq_call will pop arguments and closure also in case of failure
-fixed a bug in sq_remove
-now the VM detects delegation cycles(and throws an exception)
-new operators ++ and --
-new operator ',' comma operator
-fixed some expression precedence issue
-fixed bug in sq_arraypop
***2003-09-15 ***
***version 0.3 alpha***
-fixed a bug in array::insert()
-optional Unicode core(define SQUNICODE or _UNICODE on Win32)
-sq_compiler uses a new reader function SQLEXREADFUNC
-the debug hook passes 'l' instead of 'line' for line callbacks
and 'c' instead of 'call' for call callbacks
-new array.extend() bulit-in function
-new API sq_clone()
***2003-09-10 ***
***version 0.2 pre-alpha***
-new completely reentrant VM (sq_open and sq_close are now obsolete)
-sq_newvm() has a new prototype
-allocators are now global and linked in the VM
-_newslot meta method added
-rawset creates a slot if doesn't exists
-the compiler error callback pass the vm handle(thanks Pierre Renaux)
-sq_setforeignptr() sq_getforeingptr() are now public
-sq_resume() now is possible to resume generators from C
-sq_getlasterror() retrieve the last thrown error
-improved docs
***2003-09-06 ***
***version 0.1 pre-alpha***
first release
================================================
FILE: README.md
================================================
# Quirrel
Quirrel is a fast, high-level imperative programming language, designed to be a lightweight but powerful
scripting tool that fits within the size, memory bandwidth, and real-time requirements of
applications like games.
It is a mature scripting language used in dozens of games and other apps
(including web servers and embeddable platforms)
with hundreds of millions of installations.
Millions of devices are running Quirrel VMs daily.
Quirrel has simple integration and bindings into any C++ application.
Quirrel has C/Java/C++-like syntax with a clear, rich and simple type system,
but the language has a very dynamic nature like Python/Lua/JavaScript.
Easy to start while being much safer than Lua and JS, with equal performance to Lua.
The whole [syntax and documentation](http://quirrel.io/doc/reference/language.html) can be read in approximately an hour.
It is based on the [Squirrel scripting language](http://www.squirrel-lang.org/), but modified to be safer, stricter and faster.
It branched off as a separate language in 2019.
Gaijin Entertainment has used Squirrel with modifications since 2006, transitioning to Quirrel since 2019,
across all its projects and platforms (X360, PS3, PS4, XBoxOne, Switch, iOS, Android, Windows/Mac/Linux PC).
Quirrel offers a wide range of features like dynamic typing, higher order functions, generators,
tail recursion, exception handling, coroutines, automatic memory management,
modules with hot reload, static code analysis.
Feedback, PRs and suggestions are appreciated!
[Documentation project page](http://quirrel.io)
[GitHub page](https://github.com/GaijinEntertainment/quirrel)
================================================
FILE: appveyor.yml
================================================
version: 0.0.{build}
platform:
- x86
- x64
configuration:
- Debug
- Release
clone_folder: c:\sq
before_build:
- mkdir build
- cd build
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %platform%
- echo %platform%
- if %platform%==X64 (cmake .. -G "Visual Studio 14 2015 Win64")
- if %platform%==x86 (cmake .. -G "Visual Studio 14 2015")
build_script:
- cmake --build . --config %configuration% -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
artifacts:
- path: build\*\%configuration%\*.exe
- path: build\*\%configuration%\*.dll
test: off
================================================
FILE: doc/.gitignore
================================================
build
*.pyc
================================================
FILE: doc/Makefile
================================================
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/testy_sphinxy.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/testy_sphinxy.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/testy_sphinxy"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/testy_sphinxy"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
================================================
FILE: doc/make.bat
================================================
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=call python3 -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\testy_sphinxy.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\testy_sphinxy.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end
================================================
FILE: doc/repl/.gitignore
================================================
build
================================================
FILE: doc/repl/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.5)
project(sqjsrepl VERSION 4.0 LANGUAGES C CXX)
option(ENABLE_VAR_TRACE "Enable variable change tracing feature." OFF)
add_subdirectory(../../squirrel "${PROJECT_BINARY_DIR}/squirrel")
add_subdirectory(../../squirrel/compiler "${PROJECT_BINARY_DIR}/quirrel-compiler")
add_subdirectory(../../sqstdlib "${PROJECT_BINARY_DIR}/sqstdlib")
add_subdirectory(../../sqmodules "${PROJECT_BINARY_DIR}/sqmodules")
#add_library(sqjsrepl native.cpp)
add_executable(sqjsrepl native.cpp)
target_link_libraries(sqjsrepl squirrel sqstdlib sqmodules quirrel-compiler)
target_include_directories(squirrel PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../include>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../internal>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../helpers>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../squirrel>"
)
target_include_directories(quirrel-compiler PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../include>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../squirrel>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../squirrel/compiler>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../helpers>"
)
target_include_directories(sqstdlib PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../include>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../internal>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../squirrel>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../..>"
)
target_include_directories(sqmodules PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../include>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../sqrat/include>"
)
target_include_directories(sqjsrepl PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../include>"
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../../sqmodules>"
)
set_target_properties(sqjsrepl PROPERTIES LINK_FLAGS "--bind -sFILESYSTEM=0 -sNO_DISABLE_EXCEPTION_CATCHING")
set_target_properties(sqjsrepl PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/static"
)
================================================
FILE: doc/repl/build.txt
================================================
Build instructions:
* Install Emscripten SDK
* mkdir build
* cd build
* emcmake cmake ..
* emmake make
================================================
FILE: doc/repl/native.cpp
================================================
#include "../../include/squirrel.h"
#include "../../include/sqstdaux.h"
#include "../../sqmodules/sqmodules.h"
#include <emscripten/bind.h>
#include <cstdio>
#include <cstdarg>
// Not using file system
static struct WasmSqModulesFileAccess : public ISqModulesFileAccess
{
virtual void destroy() override {}
virtual void getSearchTargets(const char * /*fn*/, bool &search_native, bool &search_script) override {
search_native = true;
search_script = false; // No file system in Wasm build
}
virtual void resolveFileName(const char *requested_fn, const char *running_script, string &res) override {
// No relative paths because there's no file systems
res = requested_fn;
}
virtual bool readFile(const string &resolved_fn, const char *requested_fn, vector<char> &buf, string &out_err_msg) override {
// Should not get here, but just in case
out_err_msg = std::string("Cannot read '") + resolved_fn.c_str() + "' module from file";
return false;
}
} wasm_file_access;
static std::string output;
static const std::string vlformat(const char * const fmt, va_list va)
{
va_list vaCopy;
va_copy(vaCopy, va);
const int iLen = std::vsnprintf(nullptr, 0, fmt, vaCopy);
va_end(vaCopy);
std::vector<char> zc(iLen + 1);
std::vsnprintf(zc.data(), zc.size(), fmt, va);
return std::string(zc.data(), iLen);
}
static const std::string vaformat(const char * const fmt, ...)
{
va_list vl;
va_start(vl, fmt);
std::string res = vlformat(fmt, vl);
va_end(vl);
return res;
}
static void script_print_func(HSQUIRRELVM /*v*/, const char* s,...)
{
va_list vl;
va_start(vl, s);
output += vlformat(s, vl);
va_end(vl);
}
static void script_err_print_func(HSQUIRRELVM /*v*/, const char* s,...)
{
va_list vl;
va_start(vl, s);
output += vlformat(s, vl);
va_end(vl);
}
static void compile_error_handler(HSQUIRRELVM /*v*/, SQMessageSeverity sev, const char *desc, const char *source,
SQInteger line, SQInteger column, const char *extra_info)
{
const char *sevName = "error";
if (sev == SEV_HINT) sevName = "hint";
else if (sev == SEV_WARNING) sevName = "warning";
output += vaformat("Squirrel compile %s: %s (%d:%d): %s", sevName, source, int(line), int(column), desc);
if (extra_info)
{
output += "\n";
output += extra_info;
}
}
static SQInteger runtime_error_handler(HSQUIRRELVM v)
{
assert(sq_gettop(v) == 2);
const char *errMsg = nullptr;
if (SQ_FAILED(sq_getstring(v, 2, &errMsg)))
errMsg = "Unknown error";
output.append(errMsg);
if (SQ_SUCCEEDED(sqstd_formatcallstackstring(v)))
{
const char* callstack = nullptr;
sq_getstring(v, -1, &callstack);
output.append("\n");
output.append(callstack);
sq_pop(v, 1);
}
else
output += "No stack";
return 0;
}
static std::string runScript(const std::string &source_text)
{
output.clear();
HSQUIRRELVM vm = sq_open(1024);
assert(vm);
std::unique_ptr<SqModules> moduleMgr;
moduleMgr.reset(new SqModules(vm, &wasm_file_access));
sq_setprintfunc(vm, script_print_func, script_err_print_func);
sq_setcompilererrorhandler(vm, compile_error_handler);
sq_newclosure(vm, runtime_error_handler, 0);
sq_seterrorhandler(vm);
sq_enablevartrace(vm, false);
moduleMgr->registerMathLib();
moduleMgr->registerStringLib();
moduleMgr->registerSystemLib();
moduleMgr->registerDebugLib();
moduleMgr->registerIoStreamLib();
//moduleMgr->registerIoLib(); // not needed in browser version
moduleMgr->registerDateTimeLib();
sq_newtable(vm);
HSQOBJECT hBindings;
sq_getstackobj(vm, -1, &hBindings);
moduleMgr->bindBaseLib(hBindings);
moduleMgr->bindRequireApi(hBindings);
if (SQ_SUCCEEDED(sq_compile(vm, source_text.c_str(), source_text.length(), "console", true, &hBindings)))
{
sq_pushnull(vm); //environment
if (SQ_FAILED(sq_call(vm, 1, SQTrue, SQTrue)))
output += "\nScript execution failed";
else
{
if (sq_gettype(vm, -1) != OT_NULL)
{
if (SQ_SUCCEEDED(sq_tostring(vm, -1)))
{
const char *resStr = nullptr;
sq_getstring(vm, -1, &resStr);
output += "\n";
output += resStr;
sq_pop(vm, 1);
}
}
}
sq_pop(vm, 1); // script closure
}
sq_pop(vm, 1); // bindings table
std::string result = output;
output.clear();
moduleMgr.reset();
sq_close(vm);
return result;
}
EMSCRIPTEN_BINDINGS(native) { emscripten::function("runScript", &runScript); }
================================================
FILE: doc/repl/static/repl-rst.css
================================================
#repl-root {
display: none; /* shown by script after initialization */
}
.editor-container {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
margin: 8px;
}
.container-source {
height:32rem;
}
.container-output {
height:16rem;
}
.editor-container:first-child {
margin-right: 0;
}
.editor-header {
margin: 0;
padding: 0;
display: flex;
list-style: none;
}
.editor-header > li {
list-style: none;
}
.editor-header > li:last-child {
margin-left: auto;
}
.editor-header > li > span {
height: 38px;
line-height: 38px;
}
.editor-header > li > a {
height: 38px;
line-height: 38px;
padding: .3em .5em;
border: 1px solid red;
}
.editor-area {
flex: 1;
border: 1px solid lightgray;
}
.editor-info {
margin-top: 6px;
height: 160px;
border: 1px solid lightgray;
padding: 8px;
overflow-y: auto;
}
.editor-info li {
cursor: pointer;
}
.editor-sub-header {
padding: 4px 8px;
}
.output {
border: 1px solid lightgray;
padding: 8px;
overflow-y: auto;
flex: 1;
}
button#btn-run {
margin-left:auto;
}
================================================
FILE: doc/repl/static/repl.css
================================================
#repl-root {
display: none; /* shown by script after initialization */
height: 100vh;
}
.editor-container {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
margin: 8px;
}
.editor-container:first-child {
margin-right: 0;
}
.editor-header {
margin: 0;
padding: 0;
display: flex;
list-style: none;
}
.editor-header > li {
list-style: none;
}
.editor-header > li:last-child {
margin-left: auto;
}
.editor-header > li > span {
height: 38px;
line-height: 38px;
}
.editor-header > li > a {
height: 38px;
line-height: 38px;
padding: .3em .5em;
border: 1px solid red;
}
.editor-area {
flex: 1;
border: 1px solid lightgray;
}
.editor-info {
margin-top: 6px;
height: 160px;
border: 1px solid lightgray;
padding: 8px;
overflow-y: auto;
}
.editor-info li {
cursor: pointer;
}
.editor-sub-header {
padding: 4px 8px;
}
.output {
border: 1px solid lightgray;
padding: 8px;
overflow-y: auto;
flex: 1;
}
button#btn-run {
padding: 0.25rem 1rem;
}
================================================
FILE: doc/repl/static/repl.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<title>Quirrel REPL</title>
<link rel="stylesheet" href="repl.css" media="all">
<link rel="icon" type="image/x-icon" href="repl.ico">
</head>
<body>
<div id="repl-root">
<div class="editor-container">
<ul class="editor-header">
<li><span>Source code</span></li>
<li><span><button id="btn-run">Run (F9)</button></span></li>
</ul>
<pre id="source-editor" class="editor-area"></pre>
</div>
<div class="editor-container">
<ul class="editor-header">
<li><span>Result</span></li>
<li></li>
</ul>
<pre id="output" class="output"></pre>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/ace.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="replmain.js"></script>
<script src="sqjsrepl.js"></script>
</body>
</html>
================================================
FILE: doc/repl/static/replmain.js
================================================
// Setup editor
const sourceEditor = ace.edit("source-editor")
sourceEditor.setShowPrintMargin(false)
sourceEditor.setValue(localStorage.getItem('sourceCode') || 'println("Hello, Quirrel!")')
sourceEditor.moveCursorTo(0, 0)
function execute() {
const sourceCode = sourceEditor.getValue()
localStorage.setItem('sourceCode', sourceCode)
const result = Module.runScript(sourceCode)
$('#output').text(result)
}
$('#btn-run').on('click', execute)
document.addEventListener('keyup', (e)=>{
if (e.key === 'F9')
execute()
}, false)
// Show page
$('#repl-root').css({'display': 'flex'})
// WebAssembly
var Module = {
onRuntimeInitialized: function() {
// Initialize here
}
}
================================================
FILE: doc/requirements.txt
================================================
Sphinx==8.2.3
myst-parser==4.0.1
sphinx-rtd-theme==3.0.2
================================================
FILE: doc/source/_static/custom.css
================================================
.toggle .header {
display: block;
clear: both;
}
.toggle .header:after {
content: " ▶";
}
.toggle .header.open:after {
content: " ▼";
}
/* Bar charts on the performance page.*/
/* Licensed with MIT license from https://github.com/wren-lang/wren */
table.chart {
margin: 4px 0 0 0;
padding: 0 0 0 25px;
}
table.chart td, th {
line-height: 15px;
margin: 0;
padding: 1px 0;
}
table.chart th {
font-size: 14px;
width: 200px;
}
table.chart .chart-bar {
display: inline-block;
padding: 2px 0 0 0;
color: #eeeeee;
background: hsl(200, 60%, 50%);
border-bottom: solid 1px hsl(210, 60%, 20%);
text-align: right;
border-radius: 2px;
}
table.chart .chart-bar.featured {
background: hsl(200, 60%, 25%);
border-bottom: solid 1px hsl(210, 60%, 20%);
}
/* End of wren style */
================================================
FILE: doc/source/_templates/page.html
================================================
{% extends "!page.html" %}
{% block footer %}
<script type="text/javascript">
$(document).ready(function() {
$(".toggle > *").hide();
$(".toggle .header").show();
$(".toggle .header").click(function() {
$(this).parent().children().not(".header").toggle(400);
$(this).parent().children(".header").toggleClass("open");
})
});
</script>
{% endblock %}
================================================
FILE: doc/source/conf.py
================================================
# -*- coding: utf-8 -*-
#
# Quirrel documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 31 00:26:52 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import time
import re
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
sys.path.insert(0, os.path.abspath('.'))
extensions = [
'quirrel',
'myst_parser',
'quirrel_pygment_lexer'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = ['.rst', '.md']
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Quirrel documentation'
copyright = '2003-2016, Alberto Demichelis; 2016-%s, Gaijin Entertainment' % time.strftime('%Y')
author = u'Alberto Demichelis; Vasiliy Ryabtsev; Gaijin Entertainment'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
def read_version_from_source():
"""Extract version from squirrel.h"""
header_path = os.path.join(os.path.dirname(__file__), '..', '..', 'include', 'squirrel.h')
header_path = os.path.abspath(header_path)
with open(header_path, 'r') as f:
content = f.read()
major = re.search(r'#define\s+SQUIRREL_VERSION_NUMBER_MAJOR\s+(\d+)', content).group(1)
minor = re.search(r'#define\s+SQUIRREL_VERSION_NUMBER_MINOR\s+(\d+)', content).group(1)
patch = re.search(r'#define\s+SQUIRREL_VERSION_NUMBER_PATCH\s+(\d+)', content).group(1)
return f'{major}.{minor}.{patch}'
version = read_version_from_source()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = 'simple_nut.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = 'nut.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static', '../repl/static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'squirrel_doc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
_stdauthor = r'Alberto Demichelis; Vasiliy Ryabtsev; Gaijin Entertainment'
latex_documents = [
('reference/index', 'reference.tex',
'Quirrel Reference Manual', _stdauthor, 'manual'),
('stdlib/index', 'stdlib.tex',
'Quirrel Standard Library', _stdauthor, 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'Quirrel', u'Quirrel Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Quirrel', u'Quirrel Documentation',
author, 'Quirrel', 'The Programming Language.',
'Miscellaneous'),
]
def setup(app):
app.add_css_file('custom.css')
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
================================================
FILE: doc/source/diff_from_squirrel.rst
================================================
.. _diff_from_squirrel:
*******************************************
Differences from Squirrel language
*******************************************
.. index::
single: diff_from_squirrel
Squirrel language was used a lot in all Gaijin projects since 2006.
Gaijin used Lua before but found Lua too unsafe and hard to debug, and also hard sometimes to bind with native code due to lack of types.
It is well known and there are lot info on this in the Internet.
Squirrel has not only C++ like syntax (which is helpful for C++ programmers sometimes), but also has type system much closer to C/C++ code.
It also has safer syntax and semantic.
However during heavy usage we found that some features of language are not used in our real codebase of millions of LoC in 20+ projects on 10+ platforms.
Some language features were also not very safe, or inconsistent. We needed stricter language with tools for easier refactor and support.
And of course in game-development any extra performance is always welcome.
Basically in any doubt we used 'Zen of Python'.
We renamed language from Squirrel to Quirrel to avoid ambiguity.
------------
New features
------------
Language syntax
===============
* Template strings: ``$"Hello {name}"`` for string interpolation
* Documentation strings: ``@@"docstring"`` for inline documentation
* Compiler directives: ``#pragma`` for configuring compiler options
* Type method access: ``obj.$method`` and ``obj?.$method``
* Numeric literal separators: ``1_000_000`` for better readability
* Supports destructuring assignment to unpack values from arrays and objects (e.g., ``let {a, b} = table``), including destructuring in function parameters with default values and type annotations
* ES2015-style shorthand table initialization: ``{x, y}`` instead of ``{x=x, y=y}``
* Named functions in expressions: ``let foo = function foo() {}``
* Null-safety operators:
* ``?.`` - Null-conditional member access: ``obj?.property``
* ``?[`` - Null-conditional indexing: ``arr?[index]``
* ``?(`` - Null-conditional function call: ``func?(args)``
* ``??`` - Null-coalescing operator: ``value ?? default``
* New keywords:
* ``let`` - Immutable binding declaration (alternative to ``local``)
* ``global`` - Explicit global variable declaration
* ``not in`` - For membership testing, alternative to ``!(x in y)``
* ``static`` - For evaluating expressions once on first access and memoizing the result
* ``const`` can also be used for inline declaration inside expressions
Static analysis
===============
* Comprehensive static analyzer 90+ diagnostic checks
(including reporting unused variables, functions, imports, parameters,
unreachable code detection, type mismatches and null safety violations,
data flow analysis, scope and visibility checks and more)
Compiler architecture
=====================
* AST-based multi-pass compilation (vs. Squirrel's single-pass direct compilation)
VM architecture
====================
* Class method hinting for performance optimization (approaching LuaJIT non-JIT performance)
* Added tracking of changing values of container fields (saving the stack of code that modifies the values)
Type system & immutability
===========================
* Immutability support:
* ``freeze()`` function for protecting references to instances, tables, arrays from modification
* ``let`` keyword for non-assignable bindings
* Pure function marking for optimization hints and use in constants
Standard library
================
* Base library additions:
* ``println()``, ``errorln()`` - print/error with newline variants
* ``print()``, ``println()``, ``error()``, ``errorln()`` accept arbitrary number of parameters to print
* ``freeze(obj)`` - return an immutable reference to an object
(also ``getobjflags(obj)`` to get object flags (e.g., SQOBJ_FLAG_IMMUTABLE) and
``is_frozen()`` for container types.
* ``deduplicate_object(obj)`` - deduplicate table/array contents for memory efficiency
* Enhanced ``assert()`` - accepts closures for lazy message evaluation
* Support for ``call()``/``acall()`` type methods for classes
* Support negative indexes in ``array.slice()`` and ``string.slice()``
* String type methods:
* Added: ``.hash()``, ``.contains()``, ``.hasindex()``, ``.subst()``, ``.replace()``, ``.join()``, ``.concat()``,
``.clone()``, plus moved from stdlib: ``.strip()``, ``.lstrip()``, ``.rstrip()``, ``.split()``,
``.split_by_chars()``, ``.escape()``, ``.startswith()``, ``.endswith()`` (some are shared with the string stardard library)
* Changed: ``.find()`` renamed to ``.indexof()`` to reduce ambiguity
* Table type methods:
* Added:** ``.each()``, ``.reduce()``, ``.findindex()``, ``.findvalue()``, ``.topairs()``, ``.swap()``,
``.__merge()``, ``.__update()``, ``.replace_with()``, ``.hasindex()``, ``.hasvalue()``, ``.clone()``,
``.is_frozen()``, ``.getfuncinfos()``
* Removed: ``.setdelegate()``, ``.getdelegate()``
* Array type methods:
* Added: ``.each()``, ``.findindex()``, ``.findvalue()``, ``.contains()``, ``.hasindex()``, ``.hasvalue()``,
``.totable()``, ``.replace_with()``, ``.swap()``, ``.clone()``, ``.is_frozen()``
* Changed:
* ``.find()`` renamed to ``.indexof()``
* ``.append()`` and ``.extend()`` now accept multiple arguments
* Removed: ``.push()`` (use ``.append()`` instead)
* Standard library modules:
* Added: datetime, debug, and serialization modules
* String module: Functions moved to string type methods for convenience (still available as module functions)
Module system
=============
Support for modules. Two APIs - runtime (``require()`` function) and compile-time (``import`` statement)
----------------
Removed features
----------------
Language features
=================
* Octal number literals - was error-prone, ``0123`` syntax now produces an error
* Comma operator - removed from expressions (was never used, but error-prone)
* Class and member attributes - ``</`` and ``/>`` XML-style attribute syntax removed (were never used in real code)
* ``#`` single line comments - only ``//`` comments supported now (consistency - "one obvious way")
* ``rawcall`` keyword
* Post-initializer syntax - removed due to ambiguity (especially with optional commas)
* ``class::method`` syntax sugar - adding table/class methods this way disallowed
(as There should be one -- and preferably only one -- obvious way to do it).
Declare methods in-place or explicitly add slots with ``<-`` operator.
Base library functions
======================
The following functions were removed for security, simplicity, or architectural reasons:
``setroottable()``, ``setconsttable()``, ``seterrorhandler()``
----------------
Changes
----------------
Scoping and declarations
=========================
* Functions and classes are locally scoped
* Constants and enums are locally scoped by default - use ``global`` keyword for global declarations
* ``global`` keyword required for declaring global constants and enums explicitly
* Referencing the closure environment object (``this``) is explicit - no implicit ``this`` lookup
* Usage of the root table is deprecated
* No fallback to global root table for undeclared variables - must use ``::`` operator to access globals (if root table is enabled at all)
Compilation Model
=================
* AST-based compiler (vs. Squirrel's single-pass direct bytecode generation):
* Multi-pass compilation with intermediate AST representation
* AST optimizations (closure hoisting, constant folding)
* Static analyzer operates on AST
C/C++ Binding API
=================
* Human-readable function type declarations:
* Replaces cryptic type masks (``"ac."``) with readable syntax
* Example: ``split_by_chars(str: string, separators: string, [skip_empty: bool]): array``
* Non-stack-based C APIs for better performance
Class declaration syntax
========================
* Python-style class inheritance: ``class Baz(Bar)`` instead of ``class Baz extends Bar``
* Class ``extends`` keyword removed in favor of parentheses-based syntax
Operators
=========
* ``delete`` is deprecated:
* Now configurable via pragmas: ``#forbid-delete-operator`` / ``#allow-delete-operator``
* Recommended to use ``table.$rawdelete()`` or ``table.rawdelete()`` instead
Type methods
=================
* ``.find()`` renamed to ``.indexof()`` for arrays and strings
* ``array.append()`` and ``array.extend()`` now accept multiple arguments
* ``array.filter()`` argument order changed to match map/reduce conventions
(and in certain degree the one of ``foreach`` by making key argument optional)
* ``array.filter()``, ``array.map()`` and ``array.reduce()`` callbacks optionally accept the reference
to the container being processed (instead of passing it via ``this``)
* ``getinfos()`` renamed to ``getfuncinfos()`` and now works on callable objects (instances, tables)
Error handling
==============
* Structured diagnostics with severity levels
* Error callback with source location, diagnostic ID, and extra information
* Configurable static analyzer warnings
--------------------------------
Possible future changes
--------------------------------
See RFCs page
================================================
FILE: doc/source/index.rst
================================================
.. Quirrel documentation master file, created by
sphinx-quickstart on Sun Jan 31 00:26:52 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Quirrel documentation
=========================================
.. toctree::
:maxdepth: 1
introduction.rst
diff_from_squirrel.rst
reference/index.rst
stdlib/index.rst
modules/index.rst
modules/bindings.rst
repl/index.rst
rfcs/STATUS.md
rfcs/README.md
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
================================================
FILE: doc/source/introduction.rst
================================================
.. _introduction:
************
Introduction
************
.. index::
single: introduction
Quirrel is a fast, high-level imperative, OO programming language, designed to be a lightweight but powerful
scripting tool that fits within the size, memory bandwidth, and real-time requirements of
applications like games.
Quirrel has simple integration and bindings in any C++ application.
Quirrel has C/Java/C++ like syntax with clear, rich and simple type system,
but the language has a very dynamic nature like Python/Lua/JavaScript.
Easy to start while being much safer than Lua and JS, having the equal performance with Lua.
It is based on Squirrel Script language (http://www.squirrel-lang.org/), but modified to be safer, stricter and faster.
Quirrel is not compatible with the original Squirrel (see :ref:`Diff from Squirrel <diff_from_squirrel>`),
but conversion usually can be done easily.
Quirrel offers a wide range of features like dynamic typing, higher
order functions, generators, tail recursion, exception handling, coroutines, automatic memory
management.
Repository is available on https://github.com/GaijinEntertainment/quirrel and your PR's and feedback are welcome!
.. _more_details_on_quirrel:
----------------------------
More details on Quirrel
----------------------------
.. index::
single: more details on quirrel
- Quirrel is a mature scripting language used in tens of games and other apps (including web servers and embeddable platforms)
with hundreds of millions installations.
It was created to be embeddable language to C/C++ applications with easy bindings and clear mental model.
- Quirrel is familiar and convenient for those who have experience with C, C++, JavaScript or Python.
It has a small and simple but sufficient :ref:`types system <datatypes_and_values>`:
float and integer types (not just 'numeric'), built-in tables, classes and arrays,
functions, closures, generators and coroutines (as well as null, string and boolean types).
In most cases it is completely obvious how to bind native code, class or function, how to call native code and work with native types.
And of course, arrays indices start with 0.
To be obvious for C++ programmer in both programming and binding is one of the main ideas Quirrel Language
Python and JavaScript are not lightweight nor easily embeddable; JS has also an infamous type system with all its implicitness.
Lua on the other hand is as small as Quirrel, but because of many differences from C/C++
it often confuses even experienced programmers.
- Quirrel has a robust and predictable :ref:`memory model <embedding_memory_management>`.
In most cases with reference count you never have unexpected freezes in runtime as well as predictable memory consumption.
However, we are planning to add GC memory management without reference count,
as it can be more beneficial in some ways of using language
(when you always have enough computational time in separate thread to manage memory it allows you to have less latency)
- Quirrel supports concurrency with :ref:`coroutines <threads>`.
- Quirrel wants to be safe. The main intent to evolve Squirrel into Quirrel was to make it safer.
Being a dynamic language by its nature doesn't mean that you can be more safe.
Safety comes from different small syntactic and semantic changes, allowing more compile time validations and explicitly,
making code less ambiguous and clear to reader and writer.
Things like 'let' :ref:`Named bindings declaration <statements>`, :ref:`freezing <builtin_functions>` of tables and arrays,
:ref:`Destructuring assignment <destructuring_assignment>` and imports, deprecation of modifying classes,
redefine table keys and several others, as well as implementing static analyzer, helps to prevent many errors and allow code to be stricter.
- Quirrel is fast.
It is at least as fast as Lua (on compilation and runtime),
with some tweaks to be sometimes closer to LuaJit with no JIT.
We are also going to implement AST-based compiler with optimizations on AST,
allowing code to become even faster in real-time (that will also allow making code safer and to add power of macros).
Class hinting allows classes to be as fast as in `Wren <https://wren.io>`_ or LuaJIT.
================================================
FILE: doc/source/modules/bindings.rst
================================================
Quirrel bindings
-----------------------------------
Guide in bindings
=================
Not full guide but some brief introduction.
To get deeper into bindings you need to study samples or read the code of SqRat
Sqrat is a C++ binding library designed for the Quirrel scripting language.
Sqrat simplifies the process of exposing C++ functions and classes to Quirrel scripts.
It automates type conversion between C++ and Quirrel, making it easier to register functions, methods,
and classes without needing to manually handle the Quirrel stack in every case.
Example
^^^^^^^^^^^^^^^^^^
Basic Includes
^^^^^^^^^^^^^^^^^^
.. code-block:: cpp
#include <sqrat.h>
#include <sqModules.h>
Create a module
^^^^^^^^^^^^^^^^^^^^^
SqModules allows to export Quirrel objects (usually tables and classes) as script modules.
Example of module creation:
::
Sqrat::Table exports(vm); // Create a table to hold the exported functions and classes
exports
.Func("function_name", function) // Export a C++ function with automatic handling of arguments and return values
.SquirrelFuncDeclString(add, "add(a: int, b: int): int", "Returns the sum of two integers, optional string")// Export a C++ function that works with the Quirrel stack, fully documented
.SquirrelFunc("function_name", low_level_function) // Export a C++ function that works with the Quirrel stack
.SetValue("SOME_ID", value) // Exports is a table, so it can hold any Quirrel value
;
module_manager->addNativeModule("module_name", exports); // Expose the table as a module to the Quirrel scripts
Simple bind of cpp function
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can use Sqrat::Table::Func() or Sqrat::Class::Func() to register a C++ function for use in a Quirrel script.
Sqrat automatically handles argument and return value conversions between Quirrel and C++ types.
C++:
::
Sqrat::Table exports(vm);
exports.Func("pow", &std::pow); // Register pow function in the script
module_manager->addNativeModule("math_demo", exports);
Usage in Quirrel:
::
from "math_demo" import pow
// or
let { pow } = require("math_demo")
local result = pow(2, 3) // Calls the C++ std::pow(2, 3)
print(result) // Output: 8
Bind function that works with Quirrel stack
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For more control, you can manually handle the Quirrel stack by using SquirrelFunc.
This allows you to specify custom logic for processing function arguments and returning values.
For instance, you may need this for variadic functions, arguments of varying types, or functions with complex logic that can't be automatically bound.
::
SQInteger sum_all_args(HSQUIRRELVM v) {
SQInteger n = sq_gettop(v); // Number of arguments
SQFloat sum = 0;
for (SQInteger i = 2; i <= n; ++i) { // Sum all arguments, starting from 2 (#1 is `this`)
SQFloat val;
if (SQ_SUCCEEDED(sq_getfloat(v, i, &val))) // For demo purposes, we only handle numbers and ignore other types
sum += val;
}
sq_pushfloat(v, sum); // Push the result
return 1; // Number of return values (0 for void, 1 for return value, SQ_ERROR for error)
}
exports.SquirrelFunc("sum_all_args", sum_all_args, -2); // -2: variable arguments, at least 2 (`this` and a number
In script:
::
local result = sum_all_args(1, 2, 3, 4) // Calls the C++ function
print(result) // Output: 10
Full signature of SquirrelFunc:
.. cpp:function:: TableBase& Table::SquirrelFunc(const char* name, SQFUNCTION func, SQInteger nparamscheck, const char *typemask=nullptr, const char *docstring=nullptr, SQInteger nfreevars=0, const Object *freevars=nullptr)
:param name: should be string, func should be function that works with Quirrel
:param nparamscheck: number of arguments of function. If negative - function can have at least this number of arguments but can accept more.
:param typemask: optional typemask (see sq_setparamscheck in :ref:`API <api_ref_object_creation_and_handling>`)
:param docstring: optional docstring, nfreevars and freevars - free variables of function.
:param nfreevars: number of free variables
:param freevars: free variables to capture
:remarks: The typemask is a string that represent the expected parameter type. The types are expressed as follows: 'o' null, 'i' integer, 'f' float, 'n' integer or float, 's' string, 't' table, 'a' array, 'u' userdata, 'c' closure and nativeclosure, 'g' generator, 'p' userpointer, 'v' thread, 'x' instance(class instance), 'y' class, 'b' bool. and '.' any type. The symbol '|' can be used as 'or' to accept multiple types on the same parameter. There isn't any limit on the number of 'or' that can be used. Spaces are ignored so can be inserted between types to increase readability. For instance to check a function that expect a table as 'this' a string as first parameter and a number or a userpointer as second parameter, the string would be "tsn|p" (table,string,number or userpointer). If the parameters mask is contains fewer parameters than 'nparamscheck', the remaining parameters will not be typechecked.
The preferred method for binding C++ functions that work with the Quirrel stack is to use `.SquirrelFuncDeclString`.
This declarative method allows you to specify the function signature, argument types (including optional/default values), return type, and documentation string all in one place.
**Example:**
.. code-block:: cpp
.SquirrelFuncDeclString(
do_math,
"pure do_math(a: int, [b: number = 2]): float",
"Performs math operation. Optional argument 'b' defaults to 2."
)
This approach allows the engine to:
- Parse argument types and generate typemasks for type checking
- Reflect metadata for documentation and scripting tools
- Recognize pure functions for optimization
**Why use SquirrelFuncDeclString?**
- **Declarative:** Full signature, types, defaults, and docstring in a single place.
- **Robust:** More accurate binding and automatic validation.
- **Documentation-friendly:** Signature and docs are automatically extracted.
**Deprecation Notice:**
The older `.SquirrelFunc` macro is now **deprecated**.
It required manually handling arguments from the Quirrel VM stack, which is more error-prone and lacks reflection support.
**Always prefer `.SquirrelFuncDeclString` for new bindings.**
Bind classes, constants and values
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sqrat allows to register C++ classes with member variables and methods that can be accessed from Quirrel scripts.
Toy example:
::
class Rect {
public:
float width, height;
Rect(float w, float h) : width(w), height(h) {}
float area() const {
return width * height;
}
float perimeter() const {
return 2 * (width + height);
}
};
Sqrat::Class<Rect> rectClass(table.GetVM(), "Rect");
rectClass
.Ctor()
.Var("width", &Rect::width)
.Var("height", &Rect::height)
.Func("area", &Rect::area)
.Prop("perimeter", &Rect::perimeter)
;
exports.Bind("Rect", rectClass); // Bind the class to the table
module_manager->addNativeModule("geometry", exports);
In script:
::
from "geometry" import Rect
local r = Rect(1, 3)
r.width = 2
print(r.area()) // Output: 6
print(r.perimeter) // Output: 10
SquirrelCtor() may be used for a constructor with a flexible behavior.
It has to implement an actual native instance creation.
Example:
::
static SQInteger rect_ctor(HSQUIRRELVM v) {
SQInteger n = sq_gettop(v);
if (n == 2) { // copy constructor
if (!Sqrat::check_signature<Rect *>(vm, 2))
return sq_throwerror(vm, "Invalid type passed to copy ctor");
}
else if (n != 1 && n != 3)
return sqstd_throwerrorf(vm, "Invalid arguments count %d", n);
Rect *instance = new Rect(0, 0);
if (n == 1) // no arguments
; // already initialized with default 0, 0
else if (n == 3) { // instance and 2 numbers
SQFloat w, h;
sq_getfloat(v, 2, &w); // Should always succeed, because types are specified in type mask (see SquirrelCtor)
sq_getfloat(v, 3, &h);
instance->width = w;
instance->height = h;
}
else if (n == 2) { // copy constructor (self instance and another instance)
Rect *other = Sqrat::Var<Rect *>(vm, 2).value;
instance->width = other->width;
instance->height = other->height;
}
Sqrat::ClassType<Rect>::SetManagedInstance(vm, 1, instance); // Link with script instance
return 1;
}
Sqrat::Class<Rect> rectClass(table.GetVM(), "Rect");
rectClass
.SquirrelCtor(rect_ctor, 0, "x y|n n") // 0 - no argument count check, "x y|n n" - type mask (instance('this') and instance or 2 numbers)
.Var("width", &Rect::width)
.Var("height", &Rect::height)
.Func("area", &Rect::area)
.Prop("perimeter", &Rect::perimeter)
;
In script:
::
from "geometry" import Rect
local r1 = Rect(1, 3)
local r2 = Rect(r1)
local r3 = Rect()
Consttable - not documented
Class property (setter) - not documented
Static functions - not documented
================================================
FILE: doc/source/modules/index.rst
================================================
.. _index:
************
Modules
************
Project source code is available at https://github.com/GaijinEntertainment/quirrel
Quirrel provides modules functionality via separate library.
Modules are useful to encapsulate code (only explicitly exported data/methods become
available outside), to make the code reusable and to prevent contaminating global namespace
(root table).
The provided reference implementation also allows reloading of script code while keeping
data intact.
==================
Script API
==================
.. index::
single: Script API
Module code is executed with a special table as context ('this').
It has the following functions bound:
.. sq:function:: require(filename)
If given module was not loaded yet, reads the file, executes it and returns module exports.
Module exports are data returned by module body code.
If module was loaded before, just returns its exports.
If file was not found, throws an error.
.. sq:function:: require_optional(filename)
The same as require(), but for missing file it returns null instead of throwing an error.
.. sq:function:: persist(key, initializer)
Used to keep data between sequential execution of the same file for hot reloading.
For the first run of the module calls provided initializer function and returns the result.
Also it stores a reference to the result in a special table that is later reused when
the file with the same name is executed.
The 'key' parameter is the unique-per-module identifier of the variable.
Example: ::
let counter = persist("counter", @() {value=0})
.. sq:function:: keepref(var)
An utility function that keeps a reference to the given object.
Might be useful to keep an object from deleting itself if it is not exported outside the module.
Also module 'this' table contains field __name__ which is set to file name for module loaded
by script require() function or parameter __name__ passed to C++ requireModule() function (defaults
to "__main__" for entry point script).
.. quirrel.native_modules
Module that allow to list all registered native modules.
Example: ::
require("quirrel.native_modules").each(println)
Will print all currently registered native modules.
==================
Native API
==================
.. index::
single: Native API
Module functionality is implemented in SqModules C++ class with the following public methods:
.. cpp:function:: SqModules::SqModules(HSQUIRRELVM vm)
Constructs a module manager instance for the given Quirrel VM.
.. cpp:function:: HSQUIRRELVM SqModules::getVM()
Returns module manager VM.
.. cpp:function:: bool SqModules::requireModule(const char *fn, bool must_exist, const char *__name__, SqObjPtr &exports, std::string &out_err_msg)
:param const char \*fn: name of the file to load
:param bool must_exist: if set to false treat missing file as success (return true)
:param const char \*__name__: value of module's __name__ field (set nullptr to use actual file name)
:param SqObjPtr &exports: object to store export to
:param std\:\:string &out_err_msg: receives error message if call failed
:returns: true if succeeded
:remarks: Actually this is a function bound to script as require()
Loads and executes script module or just returns its exports if it was already run.
.. cpp:function:: bool SqModules::reloadModule(const char *fn, bool must_exist, const char *__name__, SqObjPtr &exports, std::string &out_err_msg)
Basically the same as requireModule, but it unloads all previously loaded modules and newly executes
all modules pulled by require() calls.
This can also be used for initial module execution - so that the first call to
reloadModule(entry_point_fn) will load all modules and initialize persistent data and subsequent calls
to reloadModule(entry_point_fn) will reload the module and all it depends on while reusing kept persistent data.
.. cpp:function:: bool SqModules::addNativeModule(const char *module_name, const SqObjPtr &exports)
Registers a Quirrel object 'exports' under the provided 'module_name', so that it can be require()-d in script.
.. cpp:function:: void SqModules::registerMathLib()
Registers standard "math" native library
.. cpp:function:: void SqModules::registerStringLib()
Registers standard "string" native library
.. cpp:function:: void SqModules::registerIoStreamLib()
Registers standard "iostream" native library module (blob and stream classes)
.. cpp:function:: void SqModules::registerDateTimeLib()
Registers standard "datetime" native library
.. cpp:function:: void SqModules::registerDebugLib()
Registers "debug" native library
.. cpp:function:: void SqModules::registerSystemLib()
Registers standard 'system' library as "system" native module
.. cpp:function:: void SqModules::registerIoLib()
Registers standard 'io' library as "io" native module
================================================
FILE: doc/source/quirrel.py
================================================
# -*- coding: utf-8 -*-
"""
quirrel
~~~~~~~~~~~~~~~~~~~~~~~~~
The Quirrel domain.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
NOTE: this is just modified copypaste of javascript from sphinx
"""
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx import addnodes
from sphinx.directives import ObjectDescription
from sphinx.domains import Domain, ObjType
from sphinx.locale import _
from sphinx.roles import XRefRole
from sphinx.util.docfields import Field, GroupedField, TypedField
from sphinx.util.docutils import SphinxDirective
from sphinx.util.nodes import make_refnode
if False:
# For type annotation
from typing import Any, Dict, Iterator, List, Tuple # NOQA
from docutils import nodes # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
class SQObject(ObjectDescription):
"""
Description of a Quirrel object.
"""
#: If set to ``True`` this object is callable and a `desc_parameterlist` is
#: added
has_arguments = False
#: what is displayed right before the documentation entry
display_prefix = None # type: unicode
#: If ``allow_nesting`` is ``True``, the object prefixes will be accumulated
#: based on directive nesting
allow_nesting = False
def handle_signature(self, sig, signode):
# type: (unicode, addnodes.desc_signature) -> Tuple[unicode, unicode]
"""Breaks down construct signatures
Parses out prefix and argument list from construct definition. The
namespace and class will be determined by the nesting of domain
directives.
"""
sig = sig.strip()
if '(' in sig and sig[-1:] == ')':
member, arglist = sig.split('(', 1)
member = member.strip()
arglist = arglist[:-1].strip()
else:
member = sig
arglist = None
# If construct is nested, prefix the current prefix
prefix = self.env.ref_context.get('sq:object', None)
mod_name = self.env.ref_context.get('sq:module')
name = member
try:
member_prefix, member_name = member.rsplit('.', 1)
except ValueError:
member_name = name
member_prefix = ''
finally:
name = member_name
if prefix and member_prefix:
prefix = '.'.join([prefix, member_prefix])
elif prefix is None and member_prefix:
prefix = member_prefix
fullname = name
if prefix:
fullname = '.'.join([prefix, name])
signode['module'] = mod_name
signode['object'] = prefix
signode['fullname'] = fullname
if self.display_prefix:
signode += addnodes.desc_annotation(self.display_prefix,
self.display_prefix)
if prefix:
signode += addnodes.desc_addname(prefix + '.', prefix + '.')
elif mod_name:
signode += addnodes.desc_addname(mod_name + '.', mod_name + '.')
signode += addnodes.desc_name(name, name)
if self.has_arguments:
paramlist = addnodes.desc_parameterlist()
if arglist:
paramlist += addnodes.desc_parameter(arglist, arglist)
signode += paramlist
return fullname, prefix
def add_target_and_index(self, name_obj, sig, signode):
# type: (Tuple[unicode, unicode], unicode, addnodes.desc_signature) -> None
mod_name = self.env.ref_context.get('sq:module')
fullname = (mod_name and mod_name + '.' or '') + name_obj[0]
if fullname not in self.state.document.ids:
signode['names'].append(fullname)
signode['ids'].append(fullname.replace('$', '_S_'))
signode['first'] = not self.names
self.state.document.note_explicit_target(signode)
objects = self.env.domaindata['sq']['objects']
if fullname in objects:
self.state_machine.reporter.warning(
'duplicate object description of %s, ' % fullname +
'other instance in ' +
self.env.doc2path(objects[fullname][0]),
line=self.lineno)
objects[fullname] = self.env.docname, self.objtype
indextext = self.get_index_text(mod_name, name_obj)
if indextext:
self.indexnode['entries'].append(('single', indextext,
fullname.replace('$', '_S_'),
'', None))
def get_index_text(self, objectname, name_obj):
# type: (unicode, Tuple[unicode, unicode]) -> unicode
name, obj = name_obj
if self.objtype == 'function':
if not obj:
return _('%s() (built-in function)') % name
return _('%s() (%s method)') % (name, obj)
elif self.objtype == 'class':
return _('%s() (class)') % name
elif self.objtype == 'data':
return _('%s (global variable or constant)') % name
elif self.objtype == 'attribute':
return _('%s (%s attribute)') % (name, obj)
return ''
def before_content(self):
# type: () -> None
"""Handle object nesting before content
:py:class:`SQObject` represents Quirrel language constructs. For
constructs that are nestable, this method will build up a stack of the
nesting hierarchy so that it can be later de-nested correctly, in
:py:meth:`after_content`.
For constructs that aren't nestable, the stack is bypassed, and instead
only the most recent object is tracked. This object prefix name will be
removed with :py:meth:`after_content`.
The following keys are used in ``self.env.ref_context``:
sq:objects
Stores the object prefix history. With each nested element, we
add the object prefix to this list. When we exit that object's
nesting level, :py:meth:`after_content` is triggered and the
prefix is removed from the end of the list.
sq:object
Current object prefix. This should generally reflect the last
element in the prefix history
"""
prefix = None
if self.names:
(obj_name, obj_name_prefix) = self.names.pop()
prefix = obj_name_prefix.strip('.') if obj_name_prefix else None
if self.allow_nesting:
prefix = obj_name
if prefix:
self.env.ref_context['sq:object'] = prefix
if self.allow_nesting:
objects = self.env.ref_context.setdefault('sq:objects', [])
objects.append(prefix)
def after_content(self):
# type: () -> None
"""Handle object de-nesting after content
If this class is a nestable object, removing the last nested class prefix
ends further nesting in the object.
If this class is not a nestable object, the list of classes should not
be altered as we didn't affect the nesting levels in
:py:meth:`before_content`.
"""
objects = self.env.ref_context.setdefault('sq:objects', [])
if self.allow_nesting:
try:
objects.pop()
except IndexError:
pass
self.env.ref_context['sq:object'] = (objects[-1] if len(objects) > 0
else None)
class SQCallable(SQObject):
"""Description of a Quirrel function, method or constructor."""
has_arguments = True
doc_field_types = [
TypedField('arguments', label=_('Arguments'),
names=('argument', 'arg', 'parameter', 'param'),
typerolename='func', typenames=('paramtype', 'type')),
GroupedField('errors', label=_('Throws'), rolename='err',
names=('throws', ),
can_collapse=True),
Field('returnvalue', label=_('Returns'), has_arg=False,
names=('returns', 'return')),
Field('returntype', label=_('Return type'), has_arg=False,
names=('rtype',)),
]
class SQConstructor(SQCallable):
"""Like a callable but with a different prefix."""
display_prefix = 'class '
allow_nesting = True
class SQModule(SphinxDirective):
"""
Directive to mark description of a new Quirrel module.
This directive specifies the module name that will be used by objects that
follow this directive.
Options
-------
noindex
If the ``noindex`` option is specified, no linkable elements will be
created, and the module won't be added to the global module index. This
is useful for splitting up the module definition across multiple
sections or files.
:param mod_name: Module name
"""
has_content = False
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = False
option_spec = {
'noindex': directives.flag
}
def run(self):
# type: () -> List[nodes.Node]
mod_name = self.arguments[0].strip()
self.env.ref_context['sq:module'] = mod_name
noindex = 'noindex' in self.options
ret = []
if not noindex:
self.env.domaindata['sq']['modules'][mod_name] = self.env.docname
# Make a duplicate entry in 'objects' to facilitate searching for
# the module in QuirrelDomain.find_obj()
self.env.domaindata['sq']['objects'][mod_name] = (self.env.docname, 'module')
targetnode = nodes.target('', '', ids=['module-' + mod_name],
ismod=True)
self.state.document.note_explicit_target(targetnode)
ret.append(targetnode)
indextext = _('%s (module)') % mod_name
inode = addnodes.index(entries=[('single', indextext,
'module-' + mod_name, '', None)])
ret.append(inode)
return ret
class SQXRefRole(XRefRole):
def process_link(self, env, refnode, has_explicit_title, title, target):
# type: (BuildEnvironment, nodes.Node, bool, unicode, unicode) -> Tuple[unicode, unicode] # NOQA
# basically what sphinx.domains.python.PyXRefRole does
refnode['sq:object'] = env.ref_context.get('sq:object')
refnode['sq:module'] = env.ref_context.get('sq:module')
if not has_explicit_title:
title = title.lstrip('.')
target = target.lstrip('~')
if title[0:1] == '~':
title = title[1:]
dot = title.rfind('.')
if dot != -1:
title = title[dot + 1:]
if target[0:1] == '.':
target = target[1:]
refnode['refspecific'] = True
return title, target
class QuirrelDomain(Domain):
"""Quirrel language domain."""
name = 'sq'
label = 'Quirrel'
# if you add a new object type make sure to edit SQObject.get_index_string
object_types = {
'function': ObjType(_('function'), 'func'),
'method': ObjType(_('method'), 'meth'),
'class': ObjType(_('class'), 'class'),
'data': ObjType(_('data'), 'data'),
'attribute': ObjType(_('attribute'), 'attr'),
'module': ObjType(_('module'), 'mod'),
}
directives = {
'function': SQCallable,
'method': SQCallable,
'class': SQConstructor,
'data': SQObject,
'attribute': SQObject,
'module': SQModule,
}
roles = {
'func': SQXRefRole(fix_parens=True),
'meth': SQXRefRole(fix_parens=True),
'class': SQXRefRole(fix_parens=True),
'data': SQXRefRole(),
'attr': SQXRefRole(),
'mod': SQXRefRole(),
}
initial_data = {
'objects': {}, # fullname -> docname, objtype
'modules': {}, # mod_name -> docname
} # type: Dict[unicode, Dict[unicode, Tuple[unicode, unicode]]]
def clear_doc(self, docname):
# type: (unicode) -> None
for fullname, (pkg_docname, _l) in list(self.data['objects'].items()):
if pkg_docname == docname:
del self.data['objects'][fullname]
for mod_name, pkg_docname in list(self.data['modules'].items()):
if pkg_docname == docname:
del self.data['modules'][mod_name]
def merge_domaindata(self, docnames, otherdata):
# type: (List[unicode], Dict) -> None
# XXX check duplicates
for fullname, (fn, objtype) in otherdata['objects'].items():
if fn in docnames:
self.data['objects'][fullname] = (fn, objtype)
for mod_name, pkg_docname in otherdata['modules'].items():
if pkg_docname in docnames:
self.data['modules'][mod_name] = pkg_docname
def find_obj(self, env, mod_name, prefix, name, typ, searchorder=0):
# type: (BuildEnvironment, unicode, unicode, unicode, unicode, int) -> Tuple[unicode, Tuple[unicode, unicode]] # NOQA
if name[-2:] == '()':
name = name[:-2]
objects = self.data['objects']
searches = []
if mod_name and prefix:
searches.append('.'.join([mod_name, prefix, name]))
if mod_name:
searches.append('.'.join([mod_name, name]))
if prefix:
searches.append('.'.join([prefix, name]))
searches.append(name)
if searchorder == 0:
searches.reverse()
newname = None
for search_name in searches:
if search_name in objects:
newname = search_name
return newname, objects.get(newname)
def resolve_xref(self, env, fromdocname, builder, typ, target, node,
contnode):
# type: (BuildEnvironment, unicode, Builder, unicode, unicode, nodes.Node, nodes.Node) -> nodes.Node # NOQA
mod_name = node.get('sq:module')
prefix = node.get('sq:object')
searchorder = node.hasattr('refspecific') and 1 or 0
name, obj = self.find_obj(env, mod_name, prefix, target, typ, searchorder)
if not obj:
return None
return make_refnode(builder, fromdocname, obj[0],
name.replace('$', '_S_'), contnode, name)
def resolve_any_xref(self, env, fromdocname, builder, target, node,
contnode):
# type: (BuildEnvironment, unicode, Builder, unicode, nodes.Node, nodes.Node) -> List[Tuple[unicode, nodes.Node]] # NOQA
mod_name = node.get('sq:module')
prefix = node.get('sq:object')
name, obj = self.find_obj(env, mod_name, prefix, target, None, 1)
if not obj:
return []
return [('sq:' + self.role_for_objtype(obj[1]),
make_refnode(builder, fromdocname, obj[0],
name.replace('$', '_S_'), contnode, name))]
def get_objects(self):
# type: () -> Iterator[Tuple[unicode, unicode, unicode, unicode, unicode, int]]
for refname, (docname, type) in list(self.data['objects'].items()):
yield refname, refname, type, docname, \
refname.replace('$', '_S_'), 1
def get_full_qualified_name(self, node):
# type: (nodes.Node) -> unicode
modname = node.get('sq:module')
prefix = node.get('sq:object')
target = node.get('reftarget')
if target is None:
return None
else:
return '.'.join(filter(None, [modname, prefix, target]))
def setup(app):
# type: (Sphinx) -> Dict[unicode, Any]
app.add_domain(QuirrelDomain)
return {
'version': 'builtin',
'env_version': 1,
'parallel_read_safe': True,
'parallel_write_safe': True,
}
myst_heading_anchors = 3
myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"fieldlist",
"html_admonition",
"html_image",
# "linkify",
"replacements",
"smartquotes",
"strikethrough",
"substitution",
"tasklist",
]
================================================
FILE: doc/source/quirrel_pygment_lexer.py
================================================
"""
pygments.lexers.quirrel
~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for Quirrel.
:copyright: Copyright 2022 by the Gaijin.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import bygroups, combined, default, do_insertions, include, \
inherit, Lexer, RegexLexer, this, using, words
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
Number, Punctuation, Other, Generic, Whitespace
from pygments.util import get_bool_opt
import pygments.unistring as uni
from sphinx.highlighting import lexers
__all__ = ['QuirrelLexer']
SQ_IDENT_START = ('(?:[$_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl') +
']|\\\\u[a-fA-F0-9]{4})')
SQ_IDENT_PART = ('(?:[$' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl',
'Mn', 'Mc', 'Nd', 'Pc') +
'\u200c\u200d]|\\\\u[a-fA-F0-9]{4})')
SQ_IDENT = SQ_IDENT_START + '(?:' + SQ_IDENT_PART + ')*'
line_re = re.compile('.*?\n')
class QuirrelLexer(RegexLexer):
"""
For Quirrel source code.
"""
name = 'Quirrel'
url = 'https://quirrel.io'
aliases = ['javascript', 'js']
filenames = ['*.nut']
mimetypes = ['application/quirrel', 'application/squirrel']
flags = re.DOTALL | re.MULTILINE
tokens = {
'commentsandwhitespace': [
(r'\s+', Whitespace),
(r'<!--', Comment),
(r'//.*?$', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline)
],
'slashstartsregex': [
include('commentsandwhitespace'),
(r'/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/'
r'([gimuysd]+\b|\B)', String.Regex, '#pop'),
(r'(?=/)', Text, ('#pop', 'badregex')),
default('#pop')
],
'badregex': [
(r'\n', Whitespace, '#pop')
],
'root': [
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
# Numeric literals
(r'0[bB][01]+n?', Number.Bin),
(r'0[oO]?[0-7]+n?', Number.Oct), # Browsers support "0o7" and "07" (< ES5) notations
(r'0[xX][0-9a-fA-F]+n?', Number.Hex),
(r'[0-9]+n', Number.Integer), # Javascript BigInt requires an "n" postfix
# Javascript doesn't have actual integer literals, so every other
# numeric literal is handled by the regex below (including "normal")
# integers
(r'(\.[0-9]+|[0-9]+\.[0-9]*|[0-9]+)([eE][-+]?[0-9]+)?', Number.Float),
(r'\.\.\.|=>', Punctuation),
(r'\+\+|--|~|\?\?=?|\?|:|\\(?=\n)|'
r'(<<|>>>?|==?|!=?|(?:\*\*|\|\||&&|[-<>+*%&|^/]))=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'(typeof|instanceof|in|not in|delete)\b', Operator.Word, 'slashstartsregex'),
# Match stuff like: constructor
(r'\b(constructor|from|import)\b', Keyword.Reserved),
(r'(foreach|for|in|while|do|break|return|continue|switch|case|default|if|else|'
r'throw|try|catch|yield|this|of|static|'
r'import|base)\b', Keyword, 'slashstartsregex'),
(r'(local|let|const|function|class)\b', Keyword.Declaration, 'slashstartsregex'),
# (r'(static)\b', Keyword.Reserved),
(r'(true|false|null)\b', Keyword.Constant),
(r'(require|print|println|assert|type)\b', Name.Builtin),
(r'((?:Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\b', Name.Exception),
# Match stuff like: super(argument, list)
# (r'(super)(\s*)(\([\w,?.$\s]+\s*\))',
# bygroups(Keyword, Whitespace), 'slashstartsregex'),
# Match stuff like: function() {...}
(r'([a-zA-Z_?.$][\w?.$]*)(?=\(\) \{)', Name.Other, 'slashstartsregex'),
(SQ_IDENT, Name.Other),
(r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double),
(r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single),
(r'`', String.Backtick, 'interp'),
],
'interp': [
(r'`', String.Backtick, '#pop'),
(r'\\.', String.Backtick),
(r'\$\{', String.Interpol, 'interp-inside'),
(r'\$', String.Backtick),
(r'[^`\\$]+', String.Backtick),
],
'interp-inside': [
# TODO: should this include single-line comments and allow nesting strings?
(r'\}', String.Interpol, '#pop'),
include('root'),
],
}
lexers['sq'] = QuirrelLexer(startinline=True)
lexers['quirrel'] = QuirrelLexer(startinline=True)
def setup(app):
return {
'version': 'builtin',
'env_version': 1,
'parallel_read_safe': True,
'parallel_write_safe': True,
}
================================================
FILE: doc/source/reference/api/bytecode_serialization.rst
================================================
.. _api_ref_bytecode_serialization:
======================
Bytecode serialization
======================
.. _sq_readclosure:
.. c:function:: SQRESULT sq_readclosure(HSQUIRRELVM v, SQREADFUNC readf, SQUserPointer up)
:param HSQUIRRELVM v: the target VM
:param SQREADFUNC readf: pointer to a read function that will be invoked by the vm during the serialization.
:param SQUserPointer up: pointer that will be passed to each call to the read function
:returns: a SQRESULT
serialize (read) a closure and pushes it on top of the stack, the source is user defined through a read callback.
.. _sq_writeclosure:
.. c:function:: SQRESULT sq_writeclosure(HSQUIRRELVM v, SQWRITEFUNC writef, SQUserPointer up)
:param HSQUIRRELVM v: the target VM
:param SQWRITEFUNC writef: pointer to a write function that will be invoked by the vm during the serialization.
:param SQUserPointer up: pointer that will be passed to each call to the write function
:returns: a SQRESULT
:remarks: closures with free variables cannot be serialized
serializes(writes) the closure on top of the stack, the destination is user defined through a write callback.
================================================
FILE: doc/source/reference/api/calls.rst
================================================
.. _api_ref_calls:
=====
Calls
=====
.. _sq_call:
.. c:function:: SQRESULT sq_call(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool invoke_err_handler)
:param HSQUIRRELVM v: the target VM
:param SQInteger params: number of parameters of the function
:param SQBool retval: if true the function will push the return value in the stack
:param SQBool invoke_err_handler: if true, if a runtime error occurs during the execution of the call, the vm will invoke the error handler.
:returns: a SQRESULT
calls a closure or a native closure. The function pops all the parameters and leave the closure in the stack; if retval is true the return value of the closure is pushed. If the execution of the function is suspended through sq_suspendvm(), the closure and the arguments will not be automatically popped from the stack.
When using to create an instance, push a dummy parameter to be filled with the newly-created instance for the constructor's 'this' parameter.
.. _sq_getcallee:
.. c:function:: SQRESULT sq_getcallee(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: a SQRESULT
push in the stack the currently running closure.
.. _sq_getlasterror:
.. c:function:: SQRESULT sq_getlasterror(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: a SQRESULT
:remarks: the pushed error descriptor can be any valid quirrel type.
pushes the last error in the stack.
.. _sq_getlocal:
.. c:function:: const char * sq_getlocal(HSQUIRRELVM v, SQUnsignedInteger level, SQUnsignedInteger nseq)
:param HSQUIRRELVM v: the target VM
:param SQUnsignedInteger level: the function index in the calls stack, 0 is the current function
:param SQUnsignedInteger nseq: the index of the local variable in the stack frame (0 is 'this')
:returns: the name of the local variable if a variable exists at the given level/seq otherwise NULL.
Returns the name of a local variable given stackframe and sequence in the stack and pushes is current value. Free variables are treated as local variables, by sq_getlocal(), and will be returned as they would be at the base of the stack, just before the real local variables.
.. _sq_reseterror:
.. c:function:: void sq_reseterror(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
reset the last error in the virtual machine to null
.. _sq_resume:
.. c:function:: SQRESULT sq_resume(HSQUIRRELVM v, SQBool retval, SQBool invoke_err_handler)
:param HSQUIRRELVM v: the target VM
:param SQBool retval: if true the function will push the return value in the stack
:param SQBool invoke_err_handler: if true, if a runtime error occurs during the execution of the call, the vm will invoke the error handler.
:returns: a SQRESULT
:remarks: if retval != 0 the return value of the generator is pushed.
resumes the generator at the top position of the stack.
.. _sq_tailcall:
.. c:function:: SQRESULT sq_tailcall(HSQUIRRELVM v, SQInteger nparams)
:param HSQUIRRELVM v: the target VM
:param SQInteger params: number of parameters of the function
Calls a closure and removes the caller function from the call stack.
This function must be invoke from a native closure and
he return value of sq_tailcall must be returned by the caller function(see example).
*.eg*
::
SQInteger tailcall_something_example(HSQUIRRELVM v)
{
//push closure and parameters here
...
return sq_tailcall(v,2);
}
.. _sq_throwerror:
.. c:function:: SQRESULT sq_throwerror(HSQUIRRELVM v, const char * err)
:param HSQUIRRELVM v: the target VM
:param const char * err: the description of the error that has to be thrown
:returns: the value that has to be returned by a native closure in order to throw an exception in the virtual machine.
sets the last error in the virtual machine and returns the value that has to be returned by a native closure in order to trigger an exception in the virtual machine.
.. _sq_throwobject:
.. c:function:: SQRESULT sq_throwobject(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: the value that has to be returned by a native closure in order to throw an exception in the virtual machine.
pops a value from the stack sets it as the last error in the virtual machine. Returns the value that has to be returned by a native closure in order to trigger an exception in the virtual machine (aka SQ_ERROR).
================================================
FILE: doc/source/reference/api/compiler.rst
================================================
.. _api_ref_compiler:
========
Compiler
========
.. _sq_compile:
.. c:function:: SQRESULT sq_compile(HSQUIRRELVM v, const char* s, SQInteger size, const char * sourcename, SQBool raiseerror, const HSQOBJECT *bindings = nullptr)
:param HSQUIRRELVM v: the target VM
:param const char* s: a pointer to the buffer that has to be compiled.
:param SQInteger size: size in characters of the buffer passed in the parameter 's'.
:param const char * sourcename: the symbolic name of the program (used only for more meaningful runtime errors)
:param SQBool raiseerror: if this value true the compiler error handler will be called in case of an error
:param const HSQOBJECT \*bindings: optional compile-time bindings object (default: nullptr)
:returns: a SQRESULT. If the sq_compile fails nothing is pushed in the stack.
:remarks: in case of an error the function will call the function set by sq_setcompilererrorhandler().
compiles a quirrel program from a memory buffer; if it succeeds, push the compiled script as function in the stack.
.. _sq_notifyallexceptions:
.. c:function:: void sq_notifyallexceptions(HSQUIRRELVM v, SQBool enable)
:param HSQUIRRELVM v: the target VM
:param SQBool enable: if true enables the error callback notification of handled exceptions.
:remarks: By default the VM will invoke the error callback only if an exception is not handled (no try/catch traps are present in the call stack). If notifyallexceptions is enabled, the VM will call the error callback for any exception even if between try/catch blocks. This feature is useful for implementing debuggers.
enable/disable the error callback notification of handled exceptions.
.. _sq_setcompilererrorhandler:
.. c:function:: void sq_setcompilererrorhandler(HSQUIRRELVM v, SQCOMPILERERROR f)
:param HSQUIRRELVM v: the target VM
:param SQCOMPILERERROR f: A pointer to the error handler function
:remarks: if the parameter f is NULL no function will be called when a compiler error occurs. The compiler error handler is shared between friend VMs.
sets the compiler error handler function
.. _sq_getcompilererrorhandler:
.. c:function:: SQCOMPILERERROR sq_getcompilererrorhandler(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: a pointer to the current compiler error handler function, or NULL if no function is set
gets the current compiler error handler function
.. _sq_setcompilerdiaghandler:
.. c:function:: void sq_setcompilerdiaghandler(HSQUIRRELVM v, SQ_COMPILER_DIAG_CB f)
:param HSQUIRRELVM v: the target VM
:param SQ_COMPILER_DIAG_CB f: A pointer to the diagnostic callback function
:remarks: if the parameter f is NULL no function will be called when a compiler diagnostic occurs.
sets the compiler diagnostic callback function
================================================
FILE: doc/source/reference/api/debug_interface.rst
================================================
.. _api_ref_debug_interface:
===============
Debug interface
===============
.. _sq_getfunctioninfo:
.. c:function:: SQRESULT sq_getfunctioninfo(HSQUIRRELVM v, SQInteger level, SQFunctionInfo * fi)
:param HSQUIRRELVM v: the target VM
:param SQInteger level: calls stack level
:param SQFunctionInfo * fi: pointer to the SQFunctionInfo structure that will store the closure informations
:returns: a SQRESULT.
:remarks: the member 'funcid' of the returned SQFunctionInfo structure is a unique identifier of the function; this can be useful to identify a specific piece of quirrel code in an application like for instance a profiler. this method will fail if the closure in the stack is a native C closure.
*.eg*
::
typedef struct tagSQFunctionInfo {
SQUserPointer funcid; //unique identifier for a function (all its closures will share the same funcid)
const char *name; //function name
const char *source; //function source file name
}SQFunctionInfo;
.. _sq_setdebughook:
.. c:function:: void sq_setdebughook(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:remarks: In order to receive a 'per line' callback, is necessary to compile the scripts with the line informations. Without line informations activated, only the 'call/return' callbacks will be invoked.
pops a closure from the stack an sets it as debug hook. When a debug hook is set it overrides any previously set native or non native hooks. if the hook is null the debug hook will be disabled.
.. _sq_setnativedebughook:
.. c:function:: void sq_setnativedebughook(HSQUIRRELVM v, SQDEBUGHOOK hook)
:param HSQUIRRELVM v: the target VM
:param SQDEBUGHOOK hook: the native hook function
:remarks: In order to receive a 'per line' callback, is necessary to compile the scripts with the line informations. Without line informations activated, only the 'call/return' callbacks will be invoked.
sets the native debug hook. When a native hook is set it overrides any previously set native or non native hooks. if the hook is NULL the debug hook will be disabled.
.. _sq_stackinfos:
.. c:function:: SQRESULT sq_stackinfos(HSQUIRRELVM v, SQInteger level, SQStackInfos * si)
:param HSQUIRRELVM v: the target VM
:param SQInteger level: calls stack level
:param SQStackInfos * si: pointer to the SQStackInfos structure that will store the stack informations
:returns: a SQRESULT.
retrieve the calls stack informations of a ceratain level in the calls stack.
================================================
FILE: doc/source/reference/api/garbage_collector.rst
================================================
.. _api_ref_garbage_collector:
=================
Garbage Collector
=================
.. _sq_collectgarbage:
.. c:function:: SQInteger sq_collectgarbage(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined)
runs the garbage collector and returns the number of reference cycles found (and deleted)
.. _sq_resurrectunreachable:
.. c:function:: SQRESULT sq_resurrectunreachable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:remarks: this api only works with garbage collector builds (NO_GARBAGE_COLLECTOR is not defined)
runs the garbage collector and pushes an array in the stack containing all unreachable object found. If no unreachable object is found, null is pushed instead. This function is meant to help debug reference cycles.
================================================
FILE: doc/source/reference/api/object_creation_and_handling.rst
================================================
.. _api_ref_object_creation_and_handling:
============================
Object creation and handling
============================
.. _sq_bindenv:
.. c:function:: SQRESULT sq_bindenv(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target closure
:returns: a SQRESULT
:remarks: the cloned closure holds the environment object as weak reference
pops an object from the stack (must be a table, instance, or class); clones the closure at position idx in the stack and sets the popped object as environment of the cloned closure. Then pushes the new cloned closure on top of the stack.
.. _sq_createinstance:
.. c:function:: SQRESULT sq_createinstance(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target class
:returns: a SQRESULT
:remarks: the function doesn't invoke the instance contructor. To create an instance and automatically invoke its contructor, sq_call must be used instead.
creates an instance of the class at 'idx' position in the stack. The new class instance is pushed on top of the stack.
.. _sq_getbool:
.. c:function:: SQRESULT sq_getbool(HSQUIRRELVM v, SQInteger idx, SQBool * b)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQBool * b: A pointer to the bool that will store the value
:returns: a SQRESULT
gets the value of the bool at the idx position in the stack.
.. _sq_getbyhandle:
.. c:function:: SQRESULT sq_getbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack pointing to the class or instance
:param HSQMEMBERHANDLE* handle: a pointer to the member handle
:returns: a SQRESULT
pushes the value of a class or instance member using a member handle (see sq_getmemberhandle)
.. _sq_getclosureinfo:
.. c:function:: SQRESULT sq_getclosureinfo(HSQUIRRELVM v, SQInteger idx, SQInteger * nparams, SQInteger * nfreevars)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target closure
:param SQInteger * nparams: a pointer to an integer that will store the number of parameters
:param SQInteger * nfreevars: a pointer to an integer that will store the number of free variables
:returns: an SQRESULT
retrieves number of parameters and number of freevariables from a quirrel closure.
.. _sq_getclosurename:
.. c:function:: SQRESULT sq_getclosurename(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target closure
:returns: an SQRESULT
pushes the name of the closure at position idx in the stack. Note that the name can be a string or null if the closure is anonymous or a native closure with no name assigned to it.
.. _sq_getfloat:
.. c:function:: SQRESULT sq_getfloat(HSQUIRRELVM v, SQInteger idx, SQFloat * f)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQFloat * f: A pointer to the float that will store the value
:returns: a SQRESULT
gets the value of the float at the idx position in the stack.
.. _sq_gethash:
.. c:function:: SQHash sq_gethash(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:returns: the hash key of the value at the position idx in the stack
:remarks: the hash value function is the same used by the VM.
returns the hash key of a value at the idx position in the stack.
.. _sq_getinstanceup:
.. c:function:: SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer * up, SQUSerPointer typetag)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQUserPointer * up: a pointer to the userpointer that will store the result
:param SQUSerPointer typetag: the typetag that has to be checked, if this value is set to 0 the typetag is ignored.
:returns: a SQRESULT
gets the userpointer of the class instance at position idx in the stack. if the parameter 'typetag' is different than 0, the function checks that the class or a base class of the instance is tagged with the specified tag; if not the function fails. If 'typetag' is 0 the function will ignore the tag check.
.. _sq_getinteger:
.. c:function:: SQRESULT sq_getinteger(HSQUIRRELVM v, SQInteger idx, SQInteger * i)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQInteger * i: A pointer to the integer that will store the value
:returns: a SQRESULT
gets the value of the integer at the idx position in the stack.
.. _sq_getmemberhandle:
.. c:function:: SQRESULT sq_getmemberhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack pointing to the class
:param HSQMEMBERHANDLE* handle: a pointer to the variable that will store the handle
:returns: a SQRESULT
:remarks: This method works only with classes. A handle retrieved through a class can be later used to set or get values from one of the class instances. Handles retrieved from base classes are still valid in derived classes and respect inheritance rules.
pops a value from the stack and uses it as index to fetch the handle of a class member. The handle can be later used to set or get the member value using sq_getbyhandle(), sq_setbyhandle().
.. _sq_getreleasehook:
.. c:function:: SQRELEASEHOOK sq_getreleasehook(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:remarks: if the object that position idx is not an userdata, class instance or class the function returns NULL.
gets the release hook of the userdata, class instance or class at position idx in the stack.
.. _sq_getscratchpad:
.. c:function:: char * sq_getscratchpad(HSQUIRRELVM v, SQInteger minsize)
:param HSQUIRRELVM v: the target VM
:param SQInteger minsize: the requested size for the scratchpad buffer
:remarks: the buffer is valid until the next call to sq_getscratchpad
returns a pointer to a memory buffer that is at least as big as minsize.
.. _sq_getsize:
.. c:function:: SQObjectType sq_getsize(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:returns: the size of the value at the position idx in the stack
:remarks: this function only works with strings, arrays, tables, classes, instances, and userdata if the value is not a valid type, the function will return -1.
returns the size of a value at the idx position in the stack. If the value is a class or a class instance the size returned is the size of the userdata buffer (see sq_setclassudsize).
.. _sq_getstring:
.. c:function:: SQRESULT sq_getstring(HSQUIRRELVM v, SQInteger idx, const char ** c)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param const char ** c: a pointer to the pointer that will point to the string
:returns: a SQRESULT
gets a pointer to the string at the idx position in the stack.
.. _sq_getstringandsize:
.. c:function:: SQRESULT sq_getstringandsize(HSQUIRRELVM v, SQInteger idx, const char ** c, SQInteger* size)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param const char ** c: a pointer to the pointer that will point to the string
:param SQInteger * size: a pointer to a SQInteger which will receive the size of the string
:returns: a SQRESULT
gets a pointer to the string at the idx position in the stack; additionally retrieves its size.
.. _sq_getthread:
.. c:function:: SQRESULT sq_getthread(HSQUIRRELVM v, SQInteger idx, HSQUIRRELVM* vthread)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param HSQUIRRELVM* vthread: A pointer to the variable that will store the thread pointer
:returns: a SQRESULT
gets a pointer to the thread the idx position in the stack.
.. _sq_gettype:
.. c:function:: SQObjectType sq_gettype(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:returns: the type of the value at the position idx in the stack
returns the type of the value at the position idx in the stack
.. _sq_gettypetag:
.. c:function:: SQRESULT sq_gettypetag(HSQUIRRELVM v, SQInteger idx, SQUserPointer * typetag)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQUserPointer * typetag: a pointer to the variable that will store the tag
:returns: a SQRESULT
:remarks: the function works also with instances. if the target object is an instance, the typetag of its base class is fetched.
gets the typetag of the object (userdata or class) at position idx in the stack.
.. _sq_getuserdata:
.. c:function:: SQRESULT sq_getuserdata(HSQUIRRELVM v, SQInteger idx, SQUserPointer * p, SQUserPointer * typetag)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQUserPointer * p: A pointer to the userpointer that will point to the userdata's payload
:param SQUserPointer * typetag: A pointer to a SQUserPointer that will store the userdata tag(see sq_settypetag). The parameter can be NULL.
:returns: a SQRESULT
gets a pointer to the value of the userdata at the idx position in the stack.
.. _sq_getuserpointer:
.. c:function:: SQRESULT sq_getuserpointer(HSQUIRRELVM v, SQInteger idx, SQUserPointer * p)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQUserPointer * p: A pointer to the userpointer that will store the value
:returns: a SQRESULT
gets the value of the userpointer at the idx position in the stack.
.. _sq_newarray:
.. c:function:: void sq_newarray(HSQUIRRELVM v, SQInteger size)
:param HSQUIRRELVM v: the target VM
:param SQInteger size: the size of the array that as to be created
creates a new array and pushes it in the stack
.. _sq_newclass:
.. c:function:: SQRESULT sq_newclass(HSQUIRRELVM v, SQBool hasbase)
:param HSQUIRRELVM v: the target VM
:param SQBool hasbase: if the parameter is true the function expects a base class on top of the stack.
:returns: a SQRESULT
creates a new class object. If the parameter 'hasbase' is different than 0, the function pops a class from the stack and inherits the new created class from it. The new class is pushed in the stack.
.. _sq_newclosure:
.. c:function:: void sq_newclosure(HSQUIRRELVM v, HSQFUNCTION func, SQInteger nfreevars)
:param HSQUIRRELVM v: the target VM
:param HSQFUNCTION func: a pointer to a native-function
:param SQInteger nfreevars: number of free variables(can be 0)
create a new native closure, pops n values set those as free variables of the new closure, and push the new closure in the stack.
.. _sq_newtable:
.. c:function:: void sq_newtable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
creates a new table and pushes it in the stack
.. _sq_newtableex:
.. c:function:: void sq_newtableex(HSQUIRRELVM v, SQInteger initialcapacity)
:param HSQUIRRELVM v: the target VM
:param SQInteger initialcapacity: number of key/value pairs to preallocate
creates a new table and pushes it in the stack. This function allows you to specify the initial capacity of the table to prevent unnecessary rehashing when the number of slots required is known at creation-time.
.. _sq_newuserdata:
.. c:function:: SQUserPointer sq_newuserdata(HSQUIRRELVM v, SQUnsignedInteger size)
:param HSQUIRRELVM v: the target VM
:param SQUnsignedInteger size: the size of the userdata that as to be created in bytes
creates a new userdata and pushes it in the stack
.. _sq_pushbool:
.. c:function:: void sq_pushbool(HSQUIRRELVM v, SQBool b)
:param HSQUIRRELVM v: the target VM
:param SQBool b: the bool that has to be pushed(SQTrue or SQFalse)
pushes a bool into the stack
.. _sq_pushfloat:
.. c:function:: void sq_pushfloat(HSQUIRRELVM v, SQFloat f)
:param HSQUIRRELVM v: the target VM
:param SQFloat f: the float that has to be pushed
pushes a float into the stack
.. _sq_pushinteger:
.. c:function:: void sq_pushinteger(HSQUIRRELVM v, SQInteger n)
:param HSQUIRRELVM v: the target VM
:param SQInteger n: the integer that has to be pushed
pushes an integer into the stack
.. _sq_pushnull:
.. c:function:: void sq_pushnull(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pushes a null value into the stack
.. _sq_pushstring:
.. c:function:: void sq_pushstring(HSQUIRRELVM v, const char * s, SQInteger len)
:param HSQUIRRELVM v: the target VM
:param const char * s: pointer to the string that has to be pushed
:param SQInteger len: length of the string pointed by s
:remarks: if the parameter len is less than 0 the VM will calculate the length using strlen(s)
pushes a string in the stack
.. _sq_pushuserpointer:
.. c:function:: void sq_pushuserpointer(HSQUIRRELVM v, SQUserPointer p)
:param HSQUIRRELVM v: the target VM
:param SQUserPointer p: the pointer that as to be pushed
pushes a userpointer into the stack
.. _sq_setbyhandle:
.. c:function:: SQRESULT sq_setbyhandle(HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack pointing to the class
:param HSQMEMBERHANDLE* handle: a pointer the member handle
:returns: a SQRESULT
pops a value from the stack and sets it to a class or instance member using a member handle (see sq_getmemberhandle)
.. _sq_setclassudsize:
.. c:function:: SQRESULT sq_setclassudsize(HSQUIRRELVM v, SQInteger idx, SQInteger udsize)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack pointing to the class
:param SQInteger udsize: size in bytes reserved for user data
:returns: a SQRESULT
Sets the user data size of a class. If a class 'user data size' is greater than 0. When an instance of the class is created additional space will be reserved at the end of the memory chunk where the instance is stored. The userpointer of the instance will also be automatically set to this memory area. This allows you to minimize allocations in applications that have to carry data along with the class instance.
.. _sq_setinstanceup:
.. c:function:: SQRESULT sq_setinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer up)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQUserPointer up: an arbitrary user pointer
:returns: a SQRESULT
sets the userpointer of the class instance at position idx in the stack.
.. _sq_setnativeclosurename:
.. c:function:: SQRESULT sq_setnativeclosurename(HSQUIRRELVM v, SQInteger idx, const char * name)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target native closure
:param const char * name: the name that has to be set
:returns: an SQRESULT
sets the name of the native closure at the position idx in the stack. The name of a native closure is purely for debug purposes. The name is retrieved through the function sq_stackinfos() while the closure is in the call stack.
.. _sq_setparamscheck:
.. c:function:: SQRESULT sq_setparamscheck(HSQUIRRELVM v, SQInteger nparamscheck, const char * typemask)
:param HSQUIRRELVM v: the target VM
:param SQInteger nparamscheck: defines the parameters number check policy (0 disables the param checking). If nparamscheck is greater than 0, the VM ensures that the number of parameters is exactly the number specified in nparamscheck (eg. if nparamscheck == 3 the function can only be called with 3 parameters). If nparamscheck is less than 0 the VM ensures that the closure is called with at least the absolute value of the number specified in nparamcheck (eg. nparamscheck == -3 will check that the function is called with at least 3 parameters). The hidden parameter 'this' is included in this number; free variables aren't. If SQ_MATCHTYPEMASKSTRING is passed instead of the number of parameters, the function will automatically infer the number of parameters to check from the typemask (eg. if the typemask is ".sn", it is like passing 3).
:param const char * typemask: defines a mask to validate the parametes types passed to the function. If the parameter is NULL, no typechecking is applied (default).
:remarks: The typemask consists in a zero terminated string that represent the expected parameter type. The types are expressed as follows: 'o' null, 'i' integer, 'f' float, 'n' integer or float, 's' string, 't' table, 'a' array, 'u' userdata, 'c' closure and nativeclosure, 'g' generator, 'p' userpointer, 'v' thread, 'x' instance(class instance), 'y' class, 'b' bool. and '.' any type. The symbol '|' can be used as 'or' to accept multiple types on the same parameter. There isn't any limit on the number of 'or' that can be used. Spaces are ignored so can be inserted between types to increase readability. For instance to check a function that expect a table as 'this' a string as first parameter and a number or a userpointer as second parameter, the string would be "tsn|p" (table,string,number or userpointer). If the parameters mask is contains fewer parameters than 'nparamscheck', the remaining parameters will not be typechecked.
Sets the parameter validation scheme for the native closure at the top position in the stack. Allows you to validate the number of parameters accepted by the function and optionally their types. If the function call does not comply with the parameter schema set by sq_setparamscheck, an exception is thrown.
*.eg*
::
//example
SQInteger testy(HSQUIRRELVM v)
{
SQUserPointer p;
const char *s;
SQInteger i;
//no type checking, if the call complies with the mask
//surely the functions will succeed.
sq_getuserdata(v,1,&p,NULL);
sq_getstring(v,2,&s);
sq_getinteger(v,3,&i);
//... do something
return 0;
}
//the reg code
//....stuff
sq_newclosure(v,testy,0);
//expects exactly 3 parameters(userdata,string,number)
sq_setparamscheck(v,3,"usn");
//....stuff
.. _sq_setreleasehook:
.. c:function:: void sq_setreleasehook(HSQUIRRELVM v, SQInteger idx, SQRELEASEHOOK hook)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQRELEASEHOOK hook: a function pointer to the hook(see sample below)
:remarks: the function hook is called by the VM before the userdata memory is deleted.
sets the release hook of the userdata, class instance, or class at position idx in the stack.
*.eg*
::
/* tyedef SQInteger (*SQRELEASEHOOK)(SQUserPointer,SQInteger size); */
SQInteger my_release_hook(SQUserPointer p,SQInteger size)
{
/* do something here */
return 1;
}
.. _sq_settypetag:
.. c:function:: SQRESULT sq_settypetag(HSQUIRRELVM v, SQInteger idx, SQUserPointer typetag)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQUserPointer typetag: an arbitrary SQUserPointer
:returns: a SQRESULT
sets the typetag of the object (userdata or class) at position idx in the stack.
.. _sq_tobool:
.. c:function:: void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool * b)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:param SQBool * b: A pointer to the bool that will store the value
:remarks: if the object is not a bool the function converts the value to bool according to quirrel's rules. For instance the number 1 will result in true, and the number 0 in false.
gets the value at position idx in the stack as bool.
.. _sq_tostring:
.. c:function:: void sq_tostring(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
converts the object at position idx in the stack to string and pushes the resulting string in the stack.
.. _sq_typeof:
.. c:function:: SQObjectType sq_typeof(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: an index in the stack
:returns: a SQRESULT
pushes the type name of the value at the position idx in the stack. It also invokes the _typeof metamethod for tables and class instances that implement it; in that case the pushed object could be something other than a string (is up to the _typeof implementation).
================================================
FILE: doc/source/reference/api/object_manipulation.rst
================================================
.. _api_ref_object_manipulation:
====================
Object manipulation
====================
.. _sq_arrayappend:
.. c:function:: SQRESULT sq_arrayappend(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target array in the stack
:returns: a SQRESULT
:remarks: Only works on arrays.
pops a value from the stack and pushes it in the back of the array at the position idx in the stack.
.. _sq_arrayinsert:
.. c:function:: SQRESULT sq_arrayinsert(HSQUIRRELVM v, SQInteger idx, SQInteger destpos)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target array in the stack
:param SQInteger destpos: the position in the array where the item has to be inserted
:returns: a SQRESULT
:remarks: Only works on arrays.
pops a value from the stack and inserts it in an array at the specified position
.. _sq_arraypop:
.. c:function:: SQRESULT sq_arraypop(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target array in the stack
:returns: a SQRESULT
:remarks: Only works on arrays.
pops a value from the back of the array at the position idx in the stack.
.. _sq_arrayremove:
.. c:function:: SQRESULT sq_arrayremove(HSQUIRRELVM v, SQInteger idx, SQInteger itemidx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target array in the stack
:param SQInteger itemidx: the index of the item in the array that has to be removed
:returns: a SQRESULT
:remarks: Only works on arrays.
removes an item from an array
.. _sq_arrayresize:
.. c:function:: SQRESULT sq_arrayresize(HSQUIRRELVM v, SQInteger idx, SQInteger newsize)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target array in the stack
:param SQInteger newsize: requested size of the array
:returns: a SQRESULT
:remarks: Only works on arrays. If newsize if greater than the current size the new array slots will be filled with nulls.
resizes the array at the position idx in the stack.
.. _sq_arrayreverse:
.. c:function:: SQRESULT sq_arrayreverse(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target array in the stack
:returns: a SQRESULT
:remarks: Only works on arrays.
reverses an array in place.
.. _sq_clear:
.. c:function:: SQRESULT sq_clear(HSQUIRRELVM v, SQInteger idx, SQBool freemem)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:param SQBool freemem: free allocated memory if needed. SQTrue by default.
:returns: a SQRESULT
:remarks: Only works on tables and arrays.
clears all the elements of the table/array at position idx in the stack.
.. _sq_clone:
.. c:function:: SQRESULT sq_clone(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
pushes a clone of the table, array, or class instance at the position idx.
.. _sq_deleteslot:
.. c:function:: SQRESULT sq_deleteslot(HSQUIRRELVM v, SQInteger idx, SQBool pushval)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target table in the stack
:param SQBool pushval: if this param is true the function will push the value of the deleted slot.
:returns: a SQRESULT
:remarks: invoke the _delslot metamethod in the table delegate. it only works on tables.
pops a key from the stack and delete the slot indexed by it from the table at position idx in the stack; if the slot does not exist, nothing happens.
.. _sq_get:
.. c:function:: SQRESULT sq_get(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
:remarks: this call will invokes the delegation system like a normal dereference it only works on tables, arrays, classes, instances and userdata; if the function fails, nothing will be pushed in the stack.
pops a key from the stack and performs a get operation on the object at the position idx in the stack; and pushes the result in the stack.
.. _sq_getbase:
.. c:function:: SQRESULT sq_getbase(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target class in the stack
:returns: a SQRESULT
pushes the base class of the 'class' at stored position idx in the stack.
.. _sq_getclass:
.. c:function:: SQRESULT sq_getclass(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target class instance in the stack
:returns: a SQRESULT
pushes the class of the 'class instance' at stored position idx in the stack.
.. _sq_getdelegate:
.. c:function:: SQRESULT sq_getdelegate(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
pushes the current delegate of the object at the position idx in the stack.
.. _sq_getfreevariable:
.. c:function:: const char * sq_getfreevariable(HSQUIRRELVM v, SQInteger idx, SQInteger nval)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack(closure)
:param SQInteger nval: 0 based index of the free variable(relative to the closure).
:returns: the name of the free variable for pure quirrel closures. NULL in case of error or if the index of the variable is out of range. In case the target closure is a native closure, the return name is always "@NATIVE".
:remarks: The function works for both quirrel closure and native closure.
gets the value of the free variable of the closure at the position idx in the stack.
.. _sq_getweakrefval:
.. c:function:: SQRESULT sq_getweakrefval(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target weak reference
:returns: a SQRESULT
:remarks: if the function fails, nothing is pushed in the stack.
pushes the object pointed by the weak reference at position idx in the stack.
.. _sq_instanceof:
.. c:function:: SQBool sq_instanceof(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: SQTrue if the instance at position -2 in the stack is an instance of the class object at position -1 in the stack.
:remarks: The function doesn't pop any object from the stack.
Determines if an object is an instance of a certain class. Expects an instance and a class in the stack.
.. _sq_newmember:
.. c:function:: SQRESULT sq_newmember(HSQUIRRELVM v, SQInteger idx, SQBool bstatic)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target table in the stack
:param SQBool bstatic: if SQTrue creates a static member.
:returns: a SQRESULT
pops a key and a value from the stack and performs a new slot operation on the class that is at position idx in the stack; if the slot does not exist, it will be created.
.. _sq_newslot:
.. c:function:: SQRESULT sq_newslot(HSQUIRRELVM v, SQInteger idx, SQBool bstatic)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target table in the stack
:param SQBool bstatic: if SQTrue creates a static member. This parameter is only used if the target object is a class.
:returns: a SQRESULT
:remarks: Invokes the _newslot metamethod in the table delegate. it only works on tables and classes.
pops a key and a value from the stack and performs a set operation on the table or class that is at position idx in the stack, if the slot does not exist it will be created.
.. _sq_next:
.. c:function:: SQRESULT sq_next(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
Pushes in the stack the next key and value of an array, table, or class slot. To start the iteration this function expects a null value on top of the stack; at every call the function will substitute the null value with an iterator and push key and value of the container slot. Every iteration the application has to pop the previous key and value but leave the iterator(that is used as reference point for the next iteration). The function will fail when all slots have been iterated(see Tables and arrays manipulation).
.. _sq_rawdeleteslot:
.. c:function:: SQRESULT sq_rawdeleteslot(HSQUIRRELVM v, SQInteger idx, SQBool pushval)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target table in the stack
:param SQBool pushval: if this param is true the function will push the value of the deleted slot.
:returns: a SQRESULT
Deletes a slot from a table without employing the _delslot metamethod. Pops a key from the stack and delete the slot indexed by it from the table at position idx in the stack; if the slot does not exist nothing happens.
.. _sq_rawget:
.. c:function:: SQRESULT sq_rawget(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
:remarks: Only works on tables and arrays.
pops a key from the stack and performs a get operation on the object at position idx in the stack, without employing delegation or metamethods.
.. _sq_rawset:
.. c:function:: SQRESULT sq_rawset(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
:remarks: it only works on tables and arrays. if the function fails nothing will be pushed in the stack.
pops a key and a value from the stack and performs a set operation on the object at position idx in the stack, without employing delegation or metamethods.
.. _sq_set:
.. c:function:: SQRESULT sq_set(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
:remarks: this call will invoke the delegation system like a normal assignment, it only works on tables, arrays and userdata.
pops a key and a value from the stack and performs a set operation on the object at position idx in the stack.
.. _sq_setdelegate:
.. c:function:: SQRESULT sq_setdelegate(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:returns: a SQRESULT
:remarks: to remove the delegate from an object, set a null value.
pops a table from the stack and sets it as the delegate of the object at the position idx in the stack.
.. _sq_setfreevariable:
.. c:function:: SQRESULT sq_setfreevariable(HSQUIRRELVM v, SQInteger idx, SQInteger nval)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:param SQInteger nval: 0 based index of the free variable(relative to the closure).
:returns: a SQRESULT
pops a value from the stack and sets it as a free variable of the closure at the position idx in the stack.
.. _sq_weakref:
.. c:function:: void sq_weakref(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index to the target object in the stack
:returns: a SQRESULT
:remarks: if the object at idx position is one of (integer, float, bool, null), the object itself is pushed instead of a weak ref.
pushes a weak reference to the object at position idx in the stack.
================================================
FILE: doc/source/reference/api/raw_object_handling.rst
================================================
.. _api_ref_raw_object_handling:
===================
Raw object handling
===================
.. _sq_addref:
.. c:function:: void sq_addref(HSQUIRRELVM v, HSQOBJECT* po)
:param HSQUIRRELVM v: the target VM
:param HSQOBJECT* po: pointer to an object handler
adds a reference to an object handler.
.. _sq_getobjtypetag:
.. c:function:: SQRESULT sq_getobjtypetag(HSQOBJECT* o, SQUserPointer* typetag)
:param HSQOBJECT* o: pointer to an object handler
:param SQUserPointer* typetag: a pointer to the variable that will store the tag
:returns: a SQRESULT
:remarks: the function works also with instances. if the target object is an instance, the typetag of its base class is fetched.
gets the typetag of a raw object reference(userdata or class).
.. _sq_getrefcount:
.. c:function:: SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v, HSQOBJECT* po)
:param HSQUIRRELVM v: the target VM
:param HSQOBJECT* po: object handler
returns the number of references of a given object.
.. _sq_getstackobj:
.. c:function:: SQRESULT sq_getstackobj(HSQUIRRELVM v, SQInteger idx, HSQOBJECT* po)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the target object in the stack
:param HSQOBJECT* po: pointer to an object handler
:returns: a SQRESULT
gets an object from the stack and stores it in a object handler.
.. _sq_objtobool:
.. c:function:: SQBool sq_objtobool(HSQOBJECT* po)
:param HSQOBJECT* po: pointer to an object handler
:remarks: If the object is not a bool will always return false.
return the bool value of a raw object reference.
.. _sq_objtofloat:
.. c:function:: SQFloat sq_objtofloat(HSQOBJECT* po)
:param HSQOBJECT* po: pointer to an object handler
:remarks: If the object is an integer will convert it to float. If the object is not a number will always return 0.
return the float value of a raw object reference.
.. _sq_objtointeger:
.. c:function:: SQInteger sq_objtointeger(HSQOBJECT* po)
:param HSQOBJECT* po: pointer to an object handler
:remarks: If the object is a float will convert it to integer. If the object is not a number will always return 0.
return the integer value of a raw object reference.
.. _sq_objtostring:
.. c:function:: const char* sq_objtostring(HSQOBJECT* po)
:param HSQOBJECT* po: pointer to an object handler
:remarks: If the object doesn't reference a string it returns NULL.
return the string value of a raw object reference.
.. _sq_objtouserpointer:
.. c:function:: SQUserPointer sq_objtouserpointer(HSQOBJECT* po)
:param HSQOBJECT* po: pointer to an object handler
:remarks: If the object doesn't reference a userpointer it returns NULL.
return the userpointer value of a raw object reference.
.. _sq_pushobject:
.. c:function:: void sq_pushobject(HSQUIRRELVM v, HSQOBJECT obj)
:param HSQUIRRELVM v: the target VM
:param HSQOBJECT obj: object handler
push an object referenced by an object handler into the stack.
.. _sq_release:
.. c:function:: SQBool sq_release(HSQUIRRELVM v, HSQOBJECT* po)
:param HSQUIRRELVM v: the target VM
:param HSQOBJECT* po: pointer to an object handler
:returns: SQTrue if the object handler released has lost all is references(the ones added with sq_addref). SQFalse otherwise.
:remarks: the function will reset the object handler to null when it loses all references.
remove a reference from an object handler.
.. _sq_resetobject:
.. c:function:: void sq_resetobject(HSQOBJECT* po)
:param HSQOBJECT* po: pointer to an object handler
:remarks: Every object handler has to be initialized with this function.
resets(initialize) an object handler.
================================================
FILE: doc/source/reference/api/stack_operations.rst
================================================
.. _api_ref_stack_operations:
================
Stack Operations
================
.. _sq_cmp:
.. c:function:: SQInteger sq_cmp(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: > 0 if obj1>obj2
:returns: == 0 if obj1==obj2
:returns: < 0 if obj1<obj2
compares 2 object from the top of the stack. obj2 should be pushed before obj1.
.. _sq_gettop:
.. c:function:: SQInteger sq_gettop(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: an integer representing the index of the top of the stack
returns the index of the top of the stack
.. _sq_pop:
.. c:function:: void sq_pop(HSQUIRRELVM v, SQInteger nelementstopop)
:param HSQUIRRELVM v: the target VM
:param SQInteger nelementstopop: the number of elements to pop
pops n elements from the stack
.. _sq_poptop:
.. c:function:: void sq_poptop(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pops 1 object from the stack
.. _sq_push:
.. c:function:: void sq_push(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: the index in the stack of the value that has to be pushed
pushes in the stack the value at the index idx
.. _sq_remove:
.. c:function:: void sq_remove(HSQUIRRELVM v, SQInteger idx)
:param HSQUIRRELVM v: the target VM
:param SQInteger idx: index of the element that has to be removed
removes an element from an arbitrary position in the stack
.. _sq_reservestack:
.. c:function:: SQRESULT sq_reservestack(HSQUIRRELVM v, SQInteger nsize)
:param HSQUIRRELVM v: the target VM
:param SQInteger nsize: required stack size
:returns: a SQRESULT
ensure that the stack space left is at least of a specified size.If the stack is smaller it will automatically grow. If there's a metamethod currently running the function will fail and the stack will not be resized, this situation has to be considered a "stack overflow".
.. _sq_settop:
.. c:function:: void sq_settop(HSQUIRRELVM v, SQInteger newtop)
:param HSQUIRRELVM v: the target VM
:param SQInteger newtop: the new top index
resize the stack. If new top is bigger then the current top the function will push nulls.
================================================
FILE: doc/source/reference/api/virtual_machine.rst
================================================
.. _api_ref_virtual_machine:
===============
Virtual Machine
===============
.. _sq_close:
.. c:function:: void sq_close(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
releases a quirrel VM and all related friend VMs
.. _sq_geterrorfunc:
.. c:function:: SQPRINTFUNCTION sq_geterrorfunc(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: a pointer to a SQPRINTFUNCTION, or NULL if no function has been set.
returns the current error function of the given Virtual machine. (see sq_setprintfunc())
.. _sq_getforeignptr:
.. c:function:: SQUserPointer sq_getforeignptr(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: the current VMs foreign pointer.
Returns the foreign pointer of a VM instance.
.. _sq_getprintfunc:
.. c:function:: SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: a pointer to a SQPRINTFUNCTION, or NULL if no function has been set.
returns the current print function of the given Virtual machine. (see sq_setprintfunc())
.. _sq_getsharedforeignptr:
.. c:function:: SQUserPointer sq_getsharedforeignptr(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: the current VMs shared foreign pointer
Returns the shared foreign pointer of a group of friend VMs
.. _sq_getsharedreleasehook:
.. c:function:: SQUserPointer sq_getsharedreleasehook(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: the current VMs release hook.
Returns the shared release hook of a group of friend VMs
.. _sq_getvmreleasehook:
.. c:function:: SQUserPointer sq_getvmreleasehook(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: the current VMs release hook.
Returns the release hook of a VM instance
.. _sq_getvmstate:
.. c:function:: SQInteger sq_getvmstate(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: the state of the vm encoded as integer value. The following constants are defined: SQ_VMSTATE_IDLE, SQ_VMSTATE_RUNNING, SQ_VMSTATE_SUSPENDED.
returns the execution state of a virtual machine
.. _sq_move:
.. c:function:: void sq_move(HSQUIRRELVM dest, HSQUIRRELVM src, SQInteger idx)
:param HSQUIRRELVM dest: the destination VM
:param HSQUIRRELVM src: the source VM
:param SQInteger idx: the index in the source stack of the value that has to be moved
pushes the object at the position 'idx' of the source vm stack in the destination vm stack
.. _sq_newthread:
.. c:function:: HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize)
:param HSQUIRRELVM friendvm: a friend VM
:param SQInteger initialstacksize: the size of the stack in slots(number of objects)
:returns: a pointer to the new VM.
:remarks: By default the roottable is shared with the VM passed as first parameter. The new VM lifetime is bound to the "thread" object pushed in the stack and behave like a normal quirrel object.
creates a new vm friendvm of the one passed as first parmeter and pushes it in its stack as "thread" object.
.. _sq_open:
.. c:function:: HSQUIRRELVM sq_open(SQInteger initialstacksize)
:param SQInteger initialstacksize: the size of the stack in slots(number of objects)
:returns: an handle to a quirrel vm
:remarks: the returned VM has to be released with sq_releasevm
creates a new instance of a quirrel VM that consists in a new execution stack.
.. _sq_pushconsttable:
.. c:function:: void sq_pushconsttable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pushes the current const table in the stack
.. _sq_pushregistrytable:
.. c:function:: void sq_pushregistrytable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pushes the registry table in the stack
.. _sq_pushroottable:
.. c:function:: void sq_pushroottable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pushes the current root table in the stack
.. _sq_setconsttable:
.. c:function:: void sq_setconsttable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pops a table from the stack and set it as const table
.. _sq_seterrorhandler:
.. c:function:: void sq_seterrorhandler(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:remarks: the error handler is shared by friend VMs
pops from the stack a closure or native closure an sets it as runtime-error handler.
.. _sq_setforeignptr:
.. c:function:: void sq_setforeignptr(HSQUIRRELVM v, SQUserPointer p)
:param HSQUIRRELVM v: the target VM
:param SQUserPointer p: The pointer that has to be set
Sets the foreign pointer of a certain VM instance. The foreign pointer is an arbitrary user defined pointer associated to a VM (by default is value id 0). This pointer is ignored by the VM.
.. _sq_setprintfunc:
.. c:function:: void sq_setprintfunc(HSQUIRRELVM v, SQPRINTFUNCTION printfunc, SQPRINTFUNCTION errorfunc)
:param HSQUIRRELVM v: the target VM
:param SQPRINTFUNCTION printfunc: a pointer to the print func or NULL to disable the output.
:param SQPRINTFUNCTION errorfunc: a pointer to the error func or NULL to disable the output.
:remarks: the print func has the following prototype: void printfunc(HSQUIRRELVM v,const char \*s,...)
sets the print function of the virtual machine. This function is used by the built-in function 'print()' to output text.
.. _sq_setroottable:
.. c:function:: void sq_setroottable(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
pops a table from the stack and set it as root table
.. _sq_setsharedforeignptr:
.. c:function:: void sq_setsharedforeignptr(HSQUIRRELVM v, SQUserPointer p)
:param HSQUIRRELVM v: the target VM
:param SQUserPointer p: The pointer that has to be set
Sets the shared foreign pointer. The foreign pointer is an arbitrary user defined pointer associated to a group of friend VMs (by default is value id 0). After a "main" VM is created using sq_open() all friend VMs created with sq_newthread share the same shared pointer.
.. _sq_setsharedreleasehook:
.. c:function:: void sq_setsharedreleasehook(HSQUIRRELVM v, SQRELESEHOOK hook)
:param HSQUIRRELVM v: the target VM
:param SQRELESEHOOK hook: The hook that has to be set
Sets the release hook of a certain VM group. The release hook is invoked when the last vm of the group vm is destroyed (usually when sq_close() is invoked). The userpointer passed to the function is the shared foreignpointer(see sq_getsharedforeignptr()). After a "main" VM is created using sq_open() all friend VMs created with sq_newthread() share the same shared release hook.
.. _sq_setvmreleasehook:
.. c:function:: void sq_setvmreleasehook(HSQUIRRELVM v, SQRELESEHOOK hook)
:param HSQUIRRELVM v: the target VM
:param SQRELESEHOOK hook: The hook that has to be set
Sets the release hook of a certain VM instance. The release hook is invoked when the vm is destroyed. The userpointer passed to the function is the vm foreignpointer (see sq_setforeignpointer())
.. _sq_suspendvm:
.. c:function:: HRESULT sq_suspendvm(HSQUIRRELVM v)
:param HSQUIRRELVM v: the target VM
:returns: an SQRESULT(that has to be returned by a C function)
:remarks: sq_result can only be called as return expression of a C function. The function will fail is the suspension is done through more C calls or in a metamethod.
Suspends the execution of the specified vm.
*.eg*
::
SQInteger suspend_vm_example(HSQUIRRELVM v)
{
return sq_suspendvm(v);
}
.. _sq_wakeupvm:
.. c:function:: HRESULT sq_wakeupvm(HSQUIRRELVM v, SQBool resumedret, SQBool retval, SQBool invoke_err_handler, SQBool throwerror)
:param HSQUIRRELVM v: the target VM
:param SQBool resumedret: if true the function will pop a value from the stack and use it as return value for the function that has previously suspended the virtual machine.
:param SQBool retval: if true the function will push the return value of the function that suspend the excution or the main function one.
:param SQBool invoke_err_handler: if true, if a runtime error occurs during the execution of the call, the vm will invoke the error handler.
:param SQBool throwerror: if true, the vm will thow an exception as soon as is resumed. the exception payload must be set beforehand invoking sq_thowerror().
:returns: an HRESULT.
wake up the execution a previously suspended virtual machine
================================================
FILE: doc/source/reference/api_reference.rst
================================================
.. _api_reference:
*************
API Reference
*************
.. toctree::
api/virtual_machine.rst
api/compiler.rst
api/stack_operations.rst
api/object_creation_and_handling.rst
api/calls.rst
api/object_manipulation.rst
api/bytecode_serialization.rst
api/raw_object_handling.rst
api/garbage_collector.rst
api/debug_interface.rst
================================================
FILE: doc/source/reference/embedding/build_configuration.rst
================================================
.. _embedding_build_configuration:
========================
Build Configuration
========================
.. _squirrel_64bits:
--------------------------------
Quirrel on 64-bit architectures
--------------------------------
.. index::
single: Quirrel on 64-bit architectures
single: 64 bits
Quirrel can be compiled on 64-bit architectures by defining '_SQ64' in the C++
preprocessor. This flag should be defined in any project that includes 'squirrel.h'.
.. _userdata_alignment:
------------------
Userdata Alignment
------------------
.. index:: single: Userdata Alignment
Both class instances and userdatas can have a buffer associated to them.
Quirrel specifies the alignment(in bytes) through the preprocessor defining 'SQ_ALIGNMENT'.
By default SQ_ALIGNMENT is defined as 4 for 32-bit builds and 8 for 64-bit builds and builds that use 64-bit floats.
It is possible to override the value of SQ_ALIGNMENT respecting the following rules.
SQ_ALIGNMENT shall be less than or equal to SQ_MALLOC alignments, and it shall be power of 2.
.. note:: This only applies for userdata allocated by the VM, specified via sq_setclassudsize() or belonging to a userdata object.
userpointers specified by the user are not affected by alignment rules.
.. _standalone_vm:
------------------------------------
Stand-alone VM without compiler
------------------------------------
.. index:: single: Stand-alone VM without compiler
Quirrel's VM can be compiled without its compiler by defining 'NO_COMPILER' in the C++ preprocessor.
When 'NO_COMPILER' is defined all function related to the compiler (eg. sq_compile) will fail. Other functions
that conditionally load precompiled bytecode or compile a file (eg. sqstd_dofile) will only work with
precompiled bytecode.
================================================
FILE: doc/source/reference/embedding/calling_a_function.rst
================================================
.. _embedding_calling_a_function:
==================
Calling a function
==================
To call a quirrel function it is necessary to push the function in the stack followed by the
parameters and then call the function sq_call.
The function will pop the parameters and push the return value if the last sq_call
parameter is > 0. ::
sq_pushroottable(v);
sq_pushstring(v,"foo",-1);
sq_get(v,-2); //get the function from the root table
sq_pushroottable(v); //'this' (function environment object)
sq_pushinteger(v,1);
sq_pushfloat(v,2.0);
sq_pushstring(v,"three",-1);
sq_call(v,4,SQFalse,SQFalse);
sq_pop(v,2); //pops the roottable and the function
this is equivalent to the following Quirrel code::
foo(1,2.0,"three");
If a runtime error occurs (or a exception is thrown) during the quirrel code execution
the sq_call will fail.
================================================
FILE: doc/source/reference/embedding/compiling_a_script.rst
================================================
.. embedding_compiling_a_script:
==================
Compiling a script
==================
You can compile a Quirrel script with the function *sq_compile*.::
SQRESULT sq_compile(HSQUIRRELVM v, const char* s, SQInteger size,
const char *sourcename, SQBool raiseerror,
const HSQOBJECT *bindings = nullptr);
The function compiles a script from a memory buffer. The parameters are:
* ``v``: the target VM
* ``s``: pointer to the buffer containing the script source code
* ``size``: size in characters of the buffer
* ``sourcename``: symbolic name of the program (used for runtime errors)
* ``raiseerror``: if true, the compiler error handler will be called on errors
* ``bindings``: optional compile-time bindings object (can be nullptr)
If sq_compile succeeds, the compiled script will be pushed as Quirrel function in the
stack.
.. :note::
In order to execute the script, the function generated by *sq_compile()* has
to be called through *sq_call()*
When the compiler fails for a syntax error it will try to call the 'compiler error handler';
this function must be declared as follow: ::
typedef void (*SQCOMPILERERROR)(HSQUIRRELVM v, SQMessageSeverity severity,
const char *desc, const char *source,
SQInteger line, SQInteger column, const char *extra_info);
where ``severity`` indicates the message severity (error, warning, etc.), ``desc`` is the error description,
``source`` is the source filename, ``line`` and ``column`` are the location, and ``extra_info`` provides
additional context.
The handler can be set with the following API call::
void sq_setcompilererrorhandler(HSQUIRRELVM v, SQCOMPILERERROR f);
================================================
FILE: doc/source/reference/embedding/creating_a_c_function.rst
================================================
.. _embedding_creating_a_c_function:
===================
Create a C function
===================
A native C function must have the following prototype: ::
typedef SQInteger (*SQFUNCTION)(HSQUIRRELVM);
The parameters is an handle to the calling VM and the return value is an integer
respecting the following rules:
* 1 if the function returns a value
* 0 if the function does not return a value
* SQ_ERROR runtime error is thrown
In order to obtain a new callable quirrel function from a C function pointer, is necessary
to call sq_newclosure() passing the C function to it; the new Quirrel function will be
pushed in the stack.
When the function is called, the stackbase is the first parameter of the function and the
top is the last. In order to return a value the function has to push it in the stack and
return 1.
Function parameters are in the stack from position 1 ('this') to *n*.
*sq_gettop()* can be used to determinate the number of parameters.
If the function has free variables, those will be in the stack after the explicit parameters
an can be handled as normal parameters. Note also that the value returned by *sq_gettop()* will be
affected by free variables. *sq_gettop()* will return the number of parameters plus
number of free variables.
Here an example, the following function print the value of each argument and return the
number of arguments. ::
SQInteger print_args(HSQUIRRELVM v)
{
SQInteger nargs = sq_gettop(v); //number of arguments
for(SQInteger n=1;n<=nargs;n++)
{
printf("arg %d is ",n);
switch(sq_gettype(v,n))
{
case OT_NULL:
printf("null");
break;
case OT_INTEGER:
printf("integer");
break;
case OT_FLOAT:
printf("float");
break;
case OT_STRING:
printf("string");
break;
case OT_TABLE:
printf("table");
break;
case OT_ARRAY:
printf("array");
break;
case OT_USERDATA:
printf("userdata");
break;
case OT_CLOSURE:
printf("closure(function)");
break;
case OT_NATIVECLOSURE:
printf("native closure(C function)");
break;
case OT_GENERATOR:
printf("generator");
break;
case OT_USERPOINTER:
printf("userpointer");
break;
case OT_CLASS:
printf("class");
break;
case OT_INSTANCE:
printf("instance");
break;
case OT_WEAKREF:
printf("weak reference");
break;
default:
return sq_throwerror(v,"invalid param"); //throws an exception
}
}
printf("\n");
sq_pushinteger(v,nargs); //push the number of arguments as return value
return 1; //1 because 1 value is returned
}
Here an example of how to register a function::
SQInteger register_global_func(HSQUIRRELVM v,SQFUNCTION f,const char *fname)
{
sq_pushroottable(v);
sq_pushstring(v,fname,-1);
sq_newclosure(v,f,0); //create a new function
sq_newslot(v,-3,SQFalse);
sq_pop(v,1); //pops the root table
return 0;
}
================================================
FILE: doc/source/reference/embedding/debug_interface.rst
================================================
.. _embedding_debug_interface:
===============
Debug Interface
===============
The quirrel VM exposes a very simple debug interface that allows to easily built a full
featured debugger.
Through the functions sq_setdebughook and sq_setnativedebughook is possible in fact to set a callback function that
will be called every time the VM executes an new line of a script or if a function get
called/returns. The callback will pass as argument the current line the current source and the
current function name (if any).::
SQUIRREL_API void sq_setdebughook(HSQUIRRELVM v);
or ::
SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook);
The following code shows how a debug hook could look like(obviously is possible to
implement this function in C as well). ::
function debughook(event_type, sourcefile, line, funcname) {
local fname=funcname?funcname:"unknown"
local srcfile=sourcefile?sourcefile:"unknown"
switch (event_type) {
case 'l': //called every line(that contains some code)
println($"LINE line [{line}] func [{fname}] file [{srcfile}]")
break
case 'c': //called when a function has been called
println($"LINE line [{line}] func [{fname}] file [{srcfile}]")
break
case 'r': //called when a function returns
println($"LINE line [{line}] func [{fname}] file [{srcfile}]")
break
}
}
The parameter *event_type* can be 'l' ,'c' or 'r' ; a hook with a 'l' event is called for each line that
gets executed, 'c' every time a function gets called and 'r' every time a function returns.
A full-featured debugger always allows displaying local variables and calls stack.
The call stack information are retrieved through sq_getstackinfos()::
SQInteger sq_stackinfos(HSQUIRRELVM v,SQInteger level,SQStackInfos *si);
While the local variables info through sq_getlocal()::
SQInteger sq_getlocal(HSQUIRRELVM v,SQUnsignedInteger level,SQUnsignedInteger nseq);
================================================
FILE: doc/source/reference/embedding/error_conventions.rst
================================================
.. _embedding_error_convetions:
========================
Error Conventions
========================
.. index::
single: Error Conventions
Most of the functions in the API return a SQRESULT value; SQRESULT indicates if a
function completed successfully or not.
The macros SQ_SUCCEEDED() and SQ_FAILED() are used to test the result of a function.::
if(SQ_FAILED(sq_getstring(v,-1,&s)))
printf("getstring failed");
================================================
FILE: doc/source/reference/embedding/memory_management.rst
================================================
.. _embedding_memory_management:
========================
Memory Management
========================
.. index:: single: Memory Management
Quirrel uses reference counting (RC) as primary system for memory management;
however, the virtual machine (VM) has an auxiliary
mark and sweep garbage collector that can be invoked on demand.
There are 2 possible compile time options:
* The default configuration consists in RC plus a mark and sweep garbage collector.
The host program can call the function sq_collectgarbage() and perform a garbage collection cycle
during the program execution. The garbage collector isn't invoked by the VM and has to
be explicitly called by the host program.
* The second a situation consists in RC only(define NO_GARBAGE_COLLECTOR); in this case is impossible for
the VM to detect reference cycles, so is the programmer that has to solve them explicitly in order to
avoid memory leaks.
The only advantage introduced by the second option is that saves 2 additional
pointers that have to be stored for each object in the default configuration with
garbage collector(8 bytes for 32 bits systems).
The types involved are: tables, arrays, functions, threads, userdata and generators; all other
types are untouched. These options do not affect execution speed.
================================================
FILE: doc/source/reference/embedding/references_from_c.rst
================================================
.. embedding_references_from_c:
========================================================
Mantaining references to Quirrel values from the C API
========================================================
Quirrel allows to reference values through the C API; the function sq_getstackobj() gets
a handle to a quirrel object(any type). The object handle can be used to control the lifetime
of an object by adding or removing references to it( see sq_addref() and sq_release()).
The object can be also re-pushed in the VM stack using sq_pushobject().::
HSQOBJECT obj;
sq_resetobject(&obj); //initialize the handle
sq_getstackobj(v,-2,&obj); //retrieve an object handle from the pos -2
sq_addref(v,&obj); //adds a reference to the object
... //do stuff
sq_pushobject(v,obj); //push the object in the stack
sq_release(v,&obj); //relese the object
================================================
FILE: doc/source/reference/embedding/runtime_error_handling.rst
================================================
.. _embedding_runtime_error_handling:
======================
Runtime error handling
======================
When an exception is not handled by Quirrel code with a try/catch statement, a runtime
error is raised and the execution of the current program is interrupted. It is possible to
set a call back function to intercept the runtime error from the host program; this is
useful to show meaningful errors to the script writer and for implementing visual
debuggers.
The following API call pops a Quirrel function from the stack and sets it as error handler.::
SQUIRREL_API void sq_seterrorhandler(HSQUIRRELVM v);
The error handler is called with 2 parameters, an environment object (this) and a object.
The object can be any quirrel type.
================================================
FILE: doc/source/reference/embedding/tables_and_arrays_manipulation.rst
================================================
.. _embedding_tables_and_arrays_manipulation:
==============================
Tables and arrays manipulation
==============================
A new table is created calling sq_newtable, this function pushes a new table in the stack.::
void sq_newtable(HSQUIRRELVM v);
To create a new slot::
SQRESULT sq_newslot(HSQUIRRELVM v,SQInteger idx,SQBool bstatic);
To set or get the table delegate::
SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx);
SQRESULT sq_getdelegate(HSQUIRRELVM v,SQInteger idx);
A new array is created calling sq_newarray, the function pushes a new array in the
stack; if the parameters size is bigger than 0 the elements are initialized to null.::
void sq_newarray (HSQUIRRELVM v,SQInteger size);
To append a value to the back of the array::
SQRESULT sq_arrayappend(HSQUIRRELVM v,SQInteger idx);
To remove a value from the back of the array::
SQRESULT sq_arraypop(HSQUIRRELVM v,SQInteger idx,SQInteger pushval);
To resize the array::
SQRESULT sq_arrayresize(HSQUIRRELVM v,SQInteger idx,SQInteger newsize);
To retri
gitextract_7iu7af3r/ ├── .github/ │ └── workflows/ │ └── docs_build_deploy.yaml ├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── COPYRIGHT ├── HISTORY ├── README.md ├── appveyor.yml ├── doc/ │ ├── .gitignore │ ├── Makefile │ ├── make.bat │ ├── repl/ │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── build.txt │ │ ├── native.cpp │ │ └── static/ │ │ ├── repl-rst.css │ │ ├── repl.css │ │ ├── repl.html │ │ └── replmain.js │ ├── requirements.txt │ └── source/ │ ├── _static/ │ │ └── custom.css │ ├── _templates/ │ │ └── page.html │ ├── conf.py │ ├── diff_from_squirrel.rst │ ├── index.rst │ ├── introduction.rst │ ├── modules/ │ │ ├── bindings.rst │ │ └── index.rst │ ├── quirrel.py │ ├── quirrel_pygment_lexer.py │ ├── reference/ │ │ ├── api/ │ │ │ ├── bytecode_serialization.rst │ │ │ ├── calls.rst │ │ │ ├── compiler.rst │ │ │ ├── debug_interface.rst │ │ │ ├── garbage_collector.rst │ │ │ ├── object_creation_and_handling.rst │ │ │ ├── object_manipulation.rst │ │ │ ├── raw_object_handling.rst │ │ │ ├── stack_operations.rst │ │ │ └── virtual_machine.rst │ │ ├── api_reference.rst │ │ ├── embedding/ │ │ │ ├── build_configuration.rst │ │ │ ├── calling_a_function.rst │ │ │ ├── compiling_a_script.rst │ │ │ ├── creating_a_c_function.rst │ │ │ ├── debug_interface.rst │ │ │ ├── error_conventions.rst │ │ │ ├── memory_management.rst │ │ │ ├── references_from_c.rst │ │ │ ├── runtime_error_handling.rst │ │ │ ├── tables_and_arrays_manipulation.rst │ │ │ ├── the_registry_table.rst │ │ │ ├── the_stack.rst │ │ │ ├── userdata_and_userpointers.rst │ │ │ └── vm_initialization.rst │ │ ├── embedding_squirrel.rst │ │ ├── index.rst │ │ ├── language/ │ │ │ ├── arrays.rst │ │ │ ├── builtin_functions.rst │ │ │ ├── classes.rst │ │ │ ├── compiler_directives.rst │ │ │ ├── constants_and_enumerations.rst │ │ │ ├── datatypes.rst │ │ │ ├── destructuring_assignment.rst │ │ │ ├── expressions.rst │ │ │ ├── functions.rst │ │ │ ├── generators.rst │ │ │ ├── lexical_structure.rst │ │ │ ├── limitations.rst │ │ │ ├── metamethods.rst │ │ │ ├── statements.rst │ │ │ ├── string_interpolation.rst │ │ │ ├── tables.rst │ │ │ ├── threads.rst │ │ │ ├── type_annotations.rst │ │ │ └── weak_references.rst │ │ └── language.rst │ ├── repl/ │ │ └── index.rst │ ├── rfcs/ │ │ ├── README.md │ │ └── STATUS.md │ └── stdlib/ │ ├── index.rst │ ├── introduction.rst │ ├── stdauxlib.rst │ ├── stddatetimelib.rst │ ├── stddebuglib.rst │ ├── stdiolib.rst │ ├── stdiostreamlib.rst │ ├── stdmathlib.rst │ ├── stdstringlib.rst │ └── stdsystemlib.rst ├── helpers/ │ └── keyValueFile.h ├── include/ │ ├── sq_char_class.h │ ├── sqconfig.h │ ├── sqext.h │ ├── sqio.h │ ├── sqstdaux.h │ ├── sqstdblob.h │ ├── sqstddatetime.h │ ├── sqstddebug.h │ ├── sqstdio.h │ ├── sqstdmath.h │ ├── sqstdstring.h │ ├── sqstdsystem.h │ └── squirrel.h ├── internal/ │ ├── sq_safe_shift.h │ └── sqstringlib.h ├── scripts/ │ ├── samples/ │ │ ├── ackermann.nut │ │ ├── array.nut │ │ ├── class.nut │ │ ├── fibonacci.nut │ │ ├── flow.nut │ │ ├── generators.nut │ │ ├── hello.nut │ │ ├── list.nut │ │ ├── loops.nut │ │ ├── matrix.nut │ │ ├── metamethods.nut │ │ ├── methcall.nut │ │ ├── module_1.nut │ │ ├── module_2.nut │ │ ├── module_demo.nut │ │ ├── regex.nut │ │ └── tailstate.nut │ └── std/ │ ├── analyzer.nut │ └── functools.nut ├── sq/ │ ├── CMakeLists.txt │ ├── sq.cpp │ └── sq_test_natives.cpp ├── sqmodules/ │ ├── CMakeLists.txt │ ├── deffileaccess.cpp │ ├── helpers.cpp │ ├── helpers.h │ ├── path.cpp │ ├── path.h │ ├── span.h │ ├── sqmodules.cpp │ └── sqmodules.h ├── sqrat/ │ ├── README.txt │ └── include/ │ ├── sqrat/ │ │ ├── sqratAllocator.h │ │ ├── sqratArray.h │ │ ├── sqratClass.h │ │ ├── sqratClassType.h │ │ ├── sqratConst.h │ │ ├── sqratFunction.h │ │ ├── sqratGlobalMethods.h │ │ ├── sqratMemberMethods.h │ │ ├── sqratObject.h │ │ ├── sqratScript.h │ │ ├── sqratTable.h │ │ ├── sqratTypes.h │ │ └── sqratUtil.h │ └── sqrat.h ├── sqstdlib/ │ ├── CMakeLists.txt │ ├── sqstdaux.cpp │ ├── sqstdblob.cpp │ ├── sqstdblobimpl.h │ ├── sqstddatetime.cpp │ ├── sqstddebug.cpp │ ├── sqstdhash.cpp │ ├── sqstdhash.h │ ├── sqstdio.cpp │ ├── sqstdmath.cpp │ ├── sqstdrex.cpp │ ├── sqstdserialization.cpp │ ├── sqstdserialization.h │ ├── sqstdstream.cpp │ ├── sqstdstream.h │ ├── sqstdstring.cpp │ └── sqstdsystem.cpp ├── squirrel/ │ ├── CMakeLists.txt │ ├── ast_tools/ │ │ └── ast_indent_render.h │ ├── compiler/ │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── arena.h │ │ ├── ast.cpp │ │ ├── ast.h │ │ ├── codegen.cpp │ │ ├── codegen.h │ │ ├── compilationcontext.cpp │ │ ├── compilationcontext.h │ │ ├── compiler.cpp │ │ ├── compiler.h │ │ ├── constgen.cpp │ │ ├── constgen.h │ │ ├── lex_tokens.h │ │ ├── lexer.cpp │ │ ├── lexer.h │ │ ├── optimizations/ │ │ │ ├── closureHoisting.cpp │ │ │ └── closureHoisting.h │ │ ├── optimizer.cpp │ │ ├── optimizer.h │ │ ├── parser.cpp │ │ ├── parser.h │ │ ├── sourceloc.h │ │ ├── sqdump.cpp │ │ ├── sqfuncstate.cpp │ │ ├── sqfuncstate.h │ │ ├── sqio.cpp │ │ ├── sqtypeparser.cpp │ │ ├── sqtypeparser.h │ │ ├── static_analyzer/ │ │ │ ├── analyzer.cpp │ │ │ ├── analyzer.h │ │ │ ├── analyzer_internal.h │ │ │ ├── assign_seq_terminator.h │ │ │ ├── ast_helpers.h │ │ │ ├── breakable_scope.h │ │ │ ├── checker_visitor.cpp │ │ │ ├── checker_visitor.h │ │ │ ├── config.cpp │ │ │ ├── config.h │ │ │ ├── function_info.h │ │ │ ├── function_ret_type_eval.cpp │ │ │ ├── function_ret_type_eval.h │ │ │ ├── global_state.cpp │ │ │ ├── global_state.h │ │ │ ├── loop_terminator_collector.h │ │ │ ├── modification_checker.h │ │ │ ├── name_shadowing_checker.cpp │ │ │ ├── name_shadowing_checker.h │ │ │ ├── naming.cpp │ │ │ ├── naming.h │ │ │ ├── node_complexity_counter.h │ │ │ ├── node_diff_computer.h │ │ │ ├── node_equal_checker.h │ │ │ ├── operator_classification.h │ │ │ ├── symbol_info.h │ │ │ ├── value_ref.cpp │ │ │ ├── value_ref.h │ │ │ ├── var_scope.cpp │ │ │ └── var_scope.h │ │ └── typeinference.cpp │ ├── opcodes.h │ ├── sqapi.cpp │ ├── sqarray.h │ ├── sqbaselib.cpp │ ├── sqclass.cpp │ ├── sqclass.h │ ├── sqclosure.h │ ├── sqdebug.cpp │ ├── sqdedupshrinker.cpp │ ├── sqext.cpp │ ├── sqfuncproto.h │ ├── sqmem.cpp │ ├── sqobject.cpp │ ├── sqobject.h │ ├── sqpcheader.h │ ├── sqstate.cpp │ ├── sqstate.h │ ├── sqstring.h │ ├── sqstringlib.cpp │ ├── sqtable.cpp │ ├── sqtable.h │ ├── squserdata.h │ ├── squtils.h │ ├── sqvm.cpp │ ├── sqvm.h │ ├── vartrace.cpp │ ├── vartrace.h │ └── vartracestub.cpp ├── squirrel-config.cmake.in ├── testData/ │ ├── ast/ │ │ ├── ast_render/ │ │ │ ├── all_syntax.nut │ │ │ └── all_syntax.opt.txt │ │ └── optimizations/ │ │ └── closureHoisting/ │ │ ├── classCrossFunc.nut │ │ ├── classCrossFunc.opt.txt │ │ ├── classSimple.nut │ │ ├── classSimple.opt.txt │ │ ├── constDep.nut │ │ ├── constDep.opt.txt │ │ ├── constFunc.nut │ │ ├── constFunc.opt.txt │ │ ├── deepUnchained.nut │ │ ├── deepUnchained.opt.txt │ │ ├── externalSymbol.nut │ │ ├── externalSymbol.opt.txt │ │ ├── implicitChainedFuncs.nut │ │ ├── implicitChainedFuncs.opt.txt │ │ ├── implicitChainedFuncs2.nut │ │ ├── implicitChainedFuncs2.opt.txt │ │ ├── indirectLocalCapture.nut │ │ ├── indirectLocalCapture.opt.txt │ │ ├── manyFuncs.nut │ │ ├── manyFuncs.opt.txt │ │ ├── multiDepthCapture.nut │ │ ├── multiDepthCapture.opt.txt │ │ ├── nestedParamShadow.nut │ │ ├── nestedParamShadow.opt.txt │ │ ├── paramDefaultCapture.nut │ │ ├── paramDefaultCapture.opt.txt │ │ ├── recursion1.nut │ │ ├── recursion1.opt.txt │ │ ├── simple.nut │ │ ├── simple.opt.txt │ │ ├── simple2.nut │ │ ├── simple2.opt.txt │ │ ├── tooManyLocals.nut │ │ ├── tooManyLocals.opt.txt │ │ ├── typedDefaultReturnType.nut │ │ └── typedDefaultReturnType.opt.txt │ ├── diagnostics/ │ │ ├── 1000_local_variables.diag.txt │ │ ├── 1000_local_variables.nut │ │ ├── 50k_access_member.diag.txt │ │ ├── 50k_access_member.nut │ │ ├── 50k_curly_brackets.diag.txt │ │ ├── 50k_curly_brackets.nut │ │ ├── 50k_function_calls.diag.txt │ │ ├── 50k_function_calls.nut │ │ ├── 50k_lambdas.diag.txt │ │ ├── 50k_lambdas.nut │ │ ├── 50k_nested_tables.diag.txt │ │ ├── 50k_nested_tables.nut │ │ ├── 50k_not.diag.txt │ │ ├── 50k_not.nut │ │ ├── 50k_paren_brackets.diag.txt │ │ ├── 50k_paren_brackets.nut │ │ ├── 50k_square_brackets.diag.txt │ │ ├── 50k_square_brackets.nut │ │ ├── 50r_binop.diag.txt │ │ ├── 50r_binop.nut │ │ ├── assign_to_expr.diag.txt │ │ ├── assign_to_expr.nut │ │ ├── assign_to_expr2.diag.txt │ │ ├── assign_to_expr2.nut │ │ ├── assign_to_optional_7.diag.txt │ │ ├── assign_to_optional_7.nut │ │ ├── base_as_array_assign.diag.txt │ │ ├── base_as_array_assign.nut │ │ ├── base_as_array_pp.diag.txt │ │ ├── base_as_array_pp.nut │ │ ├── base_pp.diag.txt │ │ ├── base_pp.nut │ │ ├── base_x_pp.diag.txt │ │ ├── base_x_pp.nut │ │ ├── binding_assign.diag.txt │ │ ├── binding_assign.nut │ │ ├── clone_op_allowed.diag.txt │ │ ├── clone_op_allowed.nut.txt │ │ ├── clone_op_forbiden.diag.txt │ │ ├── clone_op_forbiden.nut.txt │ │ ├── compilation_errors/ │ │ │ ├── lex_errors/ │ │ │ │ ├── empty_literal.diag.txt │ │ │ │ ├── empty_literal.nut │ │ │ │ ├── fp_exp_expected.diag.txt │ │ │ │ ├── fp_exp_expected.nut │ │ │ │ ├── hex_digits_expected.diag.txt │ │ │ │ ├── hex_digits_expected.nut │ │ │ │ ├── hex_numbers_expected.diag.txt │ │ │ │ ├── hex_numbers_expected.nut │ │ │ │ ├── hex_too_many_digits.diag.txt │ │ │ │ ├── hex_too_many_digits.nut │ │ │ │ ├── invalid_token.diag.txt │ │ │ │ ├── invalid_token.nut │ │ │ │ ├── literal_overflow.diag.txt │ │ │ │ ├── literal_overflow.nut │ │ │ │ ├── literal_underflow.diag.txt │ │ │ │ ├── literal_underflow.nut │ │ │ │ ├── malformed_number.diag.txt │ │ │ │ ├── malformed_number.nut │ │ │ │ ├── newline_in_const.diag.txt │ │ │ │ ├── newline_in_const.nut │ │ │ │ ├── octal_not_supported.diag.txt │ │ │ │ ├── octal_not_supported.nut │ │ │ │ ├── trailing_block_comment.diag.txt │ │ │ │ ├── trailing_block_comment.nut │ │ │ │ ├── unexpected_char.diag.txt │ │ │ │ ├── unexpected_char.nut │ │ │ │ ├── unfinished_string.diag.txt │ │ │ │ ├── unfinished_string.nut │ │ │ │ ├── unrecognised_escape.diag.txt │ │ │ │ └── unrecognised_escape.nut │ │ │ ├── sema_errors/ │ │ │ │ ├── assign_to_binding.diag.txt │ │ │ │ ├── assign_to_binding.nut │ │ │ │ ├── assign_to_expr.diag.txt │ │ │ │ ├── assign_to_expr.nut │ │ │ │ ├── cannot_delete.diag.txt │ │ │ │ ├── cannot_delete.nut │ │ │ │ ├── conflicts_with.diag.txt │ │ │ │ ├── conflicts_with.nut │ │ │ │ ├── constant_field_not_found.diag.txt │ │ │ │ ├── constant_field_not_found.nut │ │ │ │ ├── constant_slot_not_found.diag.txt │ │ │ │ ├── constant_slot_not_found.nut │ │ │ │ ├── duplicate_func_attr.diag.txt │ │ │ │ ├── duplicate_func_attr.nut │ │ │ │ ├── duplicate_key.diag.txt │ │ │ │ ├── duplicate_key.nut │ │ │ │ ├── id_is_not_const.diag.txt │ │ │ │ ├── id_is_not_const.nut │ │ │ │ ├── inc_dec_not_assignable.diag.txt │ │ │ │ ├── inc_dec_not_assignable.nut │ │ │ │ ├── initialization_required.diag.txt │ │ │ │ ├── initialization_required.nut │ │ │ │ ├── invalid_enum.diag.txt │ │ │ │ ├── invalid_enum.nut │ │ │ │ ├── local_slot_create.diag.txt │ │ │ │ ├── local_slot_create.nut │ │ │ │ ├── loop_controller_not_in_loop_break.diag.txt │ │ │ │ ├── loop_controller_not_in_loop_break.nut │ │ │ │ ├── loop_controller_not_in_loop_continue.diag.txt │ │ │ │ ├── loop_controller_not_in_loop_continue.nut │ │ │ │ ├── not_allowed_in_const.diag.txt │ │ │ │ ├── not_allowed_in_const.nut │ │ │ │ ├── only_single_variable_declaration.diag.txt │ │ │ │ ├── only_single_variable_declaration.nut │ │ │ │ ├── same_foreach_kv_names.diag.txt │ │ │ │ ├── same_foreach_kv_names.nut │ │ │ │ ├── space_sep_field_name.diag.txt │ │ │ │ ├── space_sep_field_name.nut │ │ │ │ ├── too_many_locals.diag.txt │ │ │ │ ├── too_many_locals.nut │ │ │ │ ├── type_differs.diag.txt │ │ │ │ ├── type_differs.nut │ │ │ │ ├── uninitialized_binding.diag.txt │ │ │ │ ├── uninitialized_binding.nut │ │ │ │ ├── unknown_symbol.diag.txt │ │ │ │ └── unknown_symbol.nut │ │ │ ├── syntax_errors/ │ │ │ │ ├── assign_inside_forbidden.diag.txt │ │ │ │ ├── assign_inside_forbidden.nut │ │ │ │ ├── broken_slot_declaration.diag.txt │ │ │ │ ├── broken_slot_declaration.nut │ │ │ │ ├── compiler_internals_forbidden.diag.txt │ │ │ │ ├── compiler_internals_forbidden.nut │ │ │ │ ├── delete_op_forbidden.diag.txt │ │ │ │ ├── delete_op_forbidden.nut │ │ │ │ ├── end_of_stmt_expected.diag.txt │ │ │ │ ├── end_of_stmt_expected.nut │ │ │ │ ├── expected_bracket.diag.txt │ │ │ │ ├── expected_bracket.nut │ │ │ │ ├── expected_colnum.diag.txt │ │ │ │ ├── expected_colnum.nut │ │ │ │ ├── expected_expression.diag.txt │ │ │ │ ├── expected_expression.nut │ │ │ │ ├── expected_identifier.diag.txt │ │ │ │ ├── expected_identifier.nut │ │ │ │ ├── expected_linenum.diag.txt │ │ │ │ ├── expected_linenum.nut │ │ │ │ ├── expected_token_brace.diag.txt │ │ │ │ ├── expected_token_brace.nut │ │ │ │ ├── expected_token_paren.diag.txt │ │ │ │ ├── expected_token_paren.nut │ │ │ │ ├── expected_while.diag.txt │ │ │ │ ├── expected_while.nut │ │ │ │ ├── global_consts_only.diag.txt │ │ │ │ ├── global_consts_only.nut │ │ │ │ ├── invalid_type_name.diag.txt │ │ │ │ ├── invalid_type_name.nut │ │ │ │ ├── invalid_type_name_suggestion.diag.txt │ │ │ │ ├── invalid_type_name_suggestion.nut │ │ │ │ ├── multiple_docstrings.diag.txt │ │ │ │ ├── multiple_docstrings.nut │ │ │ │ ├── root_table_forbidden.diag.txt │ │ │ │ ├── root_table_forbidden.nut │ │ │ │ ├── scalar_expected.diag.txt │ │ │ │ ├── scalar_expected.nut │ │ │ │ ├── unsupported_directive.diag.txt │ │ │ │ ├── unsupported_directive.nut │ │ │ │ ├── vararg_with_default.diag.txt │ │ │ │ └── vararg_with_default.nut │ │ │ └── type_inference/ │ │ │ ├── test_arithmetic_mismatch.diag.txt │ │ │ ├── test_arithmetic_mismatch.nut │ │ │ ├── test_array_literal.diag.txt │ │ │ ├── test_array_literal.nut │ │ │ ├── test_array_return.diag.txt │ │ │ ├── test_array_return.nut │ │ │ ├── test_array_to_int.diag.txt │ │ │ ├── test_array_to_int.nut │ │ │ ├── test_assignment_chain.diag.txt │ │ │ ├── test_assignment_chain.nut │ │ │ ├── test_call_result_type.diag.txt │ │ │ ├── test_call_result_type.nut │ │ │ ├── test_call_union_return.diag.txt │ │ │ ├── test_call_union_return.nut │ │ │ ├── test_class_literal.diag.txt │ │ │ ├── test_class_literal.nut │ │ │ ├── test_comparison_to_int.diag.txt │ │ │ ├── test_comparison_to_int.nut │ │ │ ├── test_complex_assign_mismatch.diag.txt │ │ │ ├── test_complex_assign_mismatch.nut │ │ │ ├── test_complex_bitwise.diag.txt │ │ │ ├── test_complex_bitwise.nut │ │ │ ├── test_complex_call_chain.diag.txt │ │ │ ├── test_complex_call_chain.nut │ │ │ ├── test_complex_deep_nesting.diag.txt │ │ │ ├── test_complex_deep_nesting.nut │ │ │ ├── test_complex_logical.diag.txt │ │ │ ├── test_complex_logical.nut │ │ │ ├── test_complex_mega.diag.txt │ │ │ ├── test_complex_mega.nut │ │ │ ├── test_complex_mixed_arithmetic.diag.txt │ │ │ ├── test_complex_mixed_arithmetic.nut │ │ │ ├── test_complex_multifunction.diag.txt │ │ │ ├── test_complex_multifunction.nut │ │ │ ├── test_complex_nested_ternary.diag.txt │ │ │ ├── test_complex_nested_ternary.nut │ │ │ ├── test_complex_nullcoalesce.diag.txt │ │ │ ├── test_complex_nullcoalesce.nut │ │ │ ├── test_complex_pure_chain.diag.txt │ │ │ ├── test_complex_pure_chain.nut │ │ │ ├── test_complex_return_expr.diag.txt │ │ │ ├── test_complex_return_expr.nut │ │ │ ├── test_complex_table_ternary.diag.txt │ │ │ ├── test_complex_table_ternary.nut │ │ │ ├── test_const_array.diag.txt │ │ │ ├── test_const_array.nut │ │ │ ├── test_const_array2.diag.txt │ │ │ ├── test_const_array2.nut │ │ │ ├── test_const_array3.diag.txt │ │ │ ├── test_const_array3.nut │ │ │ ├── test_const_array4.diag.txt │ │ │ ├── test_const_array4.nut │ │ │ ├── test_const_function.diag.txt │ │ │ ├── test_const_function.nut │ │ │ ├── test_const_inline.diag.txt │ │ │ ├── test_const_inline.nut │ │ │ ├── test_const_table.diag.txt │ │ │ ├── test_const_table.nut │ │ │ ├── test_destructure_array_default_mismatch.diag.txt │ │ │ ├── test_destructure_array_default_mismatch.nut │ │ │ ├── test_destructure_complex.diag.txt │ │ │ ├── test_destructure_complex.nut │ │ │ ├── test_destructure_table_mismatch.diag.txt │ │ │ ├── test_destructure_table_mismatch.nut │ │ │ ├── test_field_access_unknown.diag.txt │ │ │ ├── test_field_access_unknown.nut │ │ │ ├── test_freeze_type_mismatch.diag.txt │ │ │ ├── test_freeze_type_mismatch.nut │ │ │ ├── test_function_literal.diag.txt │ │ │ ├── test_function_literal.nut │ │ │ ├── test_instance_from_class.diag.txt │ │ │ ├── test_instance_from_class.nut │ │ │ ├── test_literal_float_to_int.diag.txt │ │ │ ├── test_literal_float_to_int.nut │ │ │ ├── test_literal_int_to_string.diag.txt │ │ │ ├── test_literal_int_to_string.nut │ │ │ ├── test_literal_string_to_int.diag.txt │ │ │ ├── test_literal_string_to_int.nut │ │ │ ├── test_return_float_to_int.diag.txt │ │ │ ├── test_return_float_to_int.nut │ │ │ ├── test_return_literal_mismatch.diag.txt │ │ │ ├── test_return_literal_mismatch.nut │ │ │ ├── test_slot_access_unknown.diag.txt │ │ │ ├── test_slot_access_unknown.nut │ │ │ ├── test_string_concat_to_int.diag.txt │ │ │ ├── test_string_concat_to_int.nut │ │ │ ├── test_table_literal.diag.txt │ │ │ ├── test_table_literal.nut │ │ │ ├── test_table_return.diag.txt │ │ │ ├── test_table_return.nut │ │ │ ├── test_table_to_string.diag.txt │ │ │ ├── test_table_to_string.nut │ │ │ ├── test_ternary_mismatch.diag.txt │ │ │ ├── test_ternary_mismatch.nut │ │ │ ├── test_typeof_to_int.diag.txt │ │ │ ├── test_typeof_to_int.nut │ │ │ ├── test_unknown_passthrough.diag.txt │ │ │ └── test_unknown_passthrough.nut │ │ ├── const_scope_1.diag.txt │ │ ├── const_scope_1.nut │ │ ├── const_scope_2.diag.txt │ │ ├── const_scope_2.nut │ │ ├── const_scope_3.diag.txt │ │ ├── const_scope_3.nut │ │ ├── continue_in_codeblock.diag.txt │ │ ├── continue_in_codeblock.nut │ │ ├── delete_base.diag.txt │ │ ├── delete_base.nut │ │ ├── delete_forbid_pragma.diag.txt │ │ ├── delete_forbid_pragma.nut.txt │ │ ├── destrucuring_var_decl_in_if.diag.txt │ │ ├── destrucuring_var_decl_in_if.nut │ │ ├── float_overflow.diag.txt │ │ ├── float_overflow.nut │ │ ├── float_underflow.diag.txt │ │ ├── float_underflow.nut │ │ ├── foreach_destr_typed_default.diag.txt │ │ ├── foreach_destr_typed_default.nut │ │ ├── hex_overflow.diag.txt │ │ ├── hex_overflow.nut │ │ ├── if_var_decl_init.diag.txt │ │ ├── if_var_decl_init.nut │ │ ├── import_01.diag.txt │ │ ├── import_01.nut │ │ ├── import_02.diag.txt │ │ ├── import_02.nut │ │ ├── import_03.diag.txt │ │ ├── import_03.nut │ │ ├── import_04.diag.txt │ │ ├── import_04.nut │ │ ├── import_05.diag.txt │ │ ├── import_05.nut │ │ ├── import_06.diag.txt │ │ ├── import_06.nut │ │ ├── import_07.diag.txt │ │ ├── import_07.nut │ │ ├── import_error.diag.txt │ │ ├── import_error.nut │ │ ├── init_with_wrong_type.diag.txt │ │ ├── init_with_wrong_type.nut │ │ ├── integer_overflow.diag.txt │ │ ├── integer_overflow.nut │ │ ├── integer_overflow_2.diag.txt │ │ ├── integer_overflow_2.nut │ │ ├── integer_overflow_int_max.diag.txt │ │ ├── integer_overflow_int_max.nut │ │ ├── interp_str_hanging_missed_ccurvy.diag.txt │ │ ├── interp_str_hanging_missed_ccurvy.nut │ │ ├── interp_str_not_string.diag.txt │ │ ├── interp_str_not_string.nut │ │ ├── interp_str_not_string_2.diag.txt │ │ ├── interp_str_not_string_2.nut │ │ ├── interp_str_wrong_template.diag.txt │ │ ├── interp_str_wrong_template.nut │ │ ├── invalid_float_1.diag.txt │ │ ├── invalid_float_1.nut │ │ ├── invalid_float_2.diag.txt │ │ ├── invalid_float_2.nut │ │ ├── invalid_float_3.diag.txt │ │ ├── invalid_float_3.nut │ │ ├── invalid_string_interp_1.diag.txt │ │ ├── invalid_string_interp_1.nut │ │ ├── invalid_type_hint_1.diag.txt │ │ ├── invalid_type_hint_1.nut │ │ ├── invalid_type_hint_2.diag.txt │ │ ├── invalid_type_hint_2.nut │ │ ├── invalid_type_hint_3.diag.txt │ │ ├── invalid_type_hint_3.nut │ │ ├── leading_zero_1.diag.txt │ │ ├── leading_zero_1.nut │ │ ├── leading_zero_2.diag.txt │ │ ├── leading_zero_2.nut │ │ ├── leading_zero_3.diag.txt │ │ ├── leading_zero_3.nut │ │ ├── letAssign.diag.txt │ │ ├── letAssign.nut │ │ ├── many_args_in_function_call.diag.txt │ │ ├── many_args_in_function_call.nut │ │ ├── need_space_after_float.diag.txt │ │ ├── need_space_after_float.nut │ │ ├── need_space_after_hex.diag.txt │ │ ├── need_space_after_hex.nut │ │ ├── need_space_after_int.diag.txt │ │ ├── need_space_after_int.nut │ │ ├── return_type_check_1.diag.txt │ │ ├── return_type_check_1.nut │ │ ├── single_var_decl_in_if.diag.txt │ │ ├── single_var_decl_in_if.nut │ │ ├── space_sep_name.diag.txt │ │ ├── space_sep_name.nut.txt │ │ ├── space_sep_name_space.diag.txt │ │ ├── space_sep_name_space.nut.txt │ │ ├── too_large_static_memo_expr.diag.txt │ │ ├── too_large_static_memo_expr.nut.txt │ │ ├── too_many_locals2.diag.txt │ │ ├── too_many_locals2.nut │ │ ├── type_hints_01.diag.txt │ │ ├── type_hints_01.nut │ │ ├── type_hints_02.diag.txt │ │ ├── type_hints_02.nut │ │ ├── type_hints_03.diag.txt │ │ ├── type_hints_03.nut │ │ ├── type_hints_04.diag.txt │ │ ├── type_hints_04.nut │ │ ├── type_hints_05.diag.txt │ │ ├── type_hints_05.nut │ │ ├── type_hints_06.diag.txt │ │ ├── type_hints_06.nut │ │ ├── unfinished_hex.diag.txt │ │ ├── unfinished_hex.nut │ │ ├── var_scope_1.diag.txt │ │ ├── var_scope_1.nut │ │ ├── var_scope_2.diag.txt │ │ ├── var_scope_2.nut │ │ ├── var_scope_3.diag.txt │ │ └── var_scope_3.nut │ ├── exec/ │ │ ├── array_methods.nut │ │ ├── array_methods.out │ │ ├── basics.nut │ │ ├── basics.out │ │ ├── call_constructor_recursion.nut │ │ ├── call_constructor_recursion.out │ │ ├── class_yield.nut │ │ ├── class_yield.out │ │ ├── closure_hoist_typed_default.nut │ │ ├── closure_hoist_typed_default.out │ │ ├── closure_hoist_typed_return.nut │ │ ├── closure_hoist_typed_return.out │ │ ├── compare_int_float.nut │ │ ├── compare_int_float.out │ │ ├── compare_int_int.nut │ │ ├── compare_int_int.out │ │ ├── const_fold.nut │ │ ├── const_fold.out │ │ ├── const_in_closures.nut │ │ ├── const_in_closures.out │ │ ├── coroutines.nut │ │ ├── coroutines.out │ │ ├── deep_loop_variable.nut │ │ ├── deep_loop_variable.out │ │ ├── depth_check.nut │ │ ├── depth_check.out │ │ ├── destructuring/ │ │ │ ├── foreach_capture_destruct_idx.nut │ │ │ ├── foreach_capture_destruct_idx.out │ │ │ ├── foreach_capture_idx_val.nut │ │ │ ├── foreach_capture_idx_val.out │ │ │ ├── foreach_capture_plain_val.nut │ │ │ ├── foreach_capture_plain_val.out │ │ │ ├── foreach_capture_shadowed.nut │ │ │ ├── foreach_capture_shadowed.out │ │ │ ├── foreach_destr_default_closure.nut │ │ │ ├── foreach_destr_default_closure.out │ │ │ ├── foreach_destruct_empty_pattern.nut │ │ │ ├── foreach_destruct_empty_pattern.out │ │ │ ├── foreach_destructuring.nut │ │ │ ├── foreach_destructuring.out │ │ │ ├── foreach_destructuring_branches.nut │ │ │ ├── foreach_destructuring_branches.out │ │ │ ├── foreach_destructuring_complex.nut │ │ │ ├── foreach_destructuring_complex.out │ │ │ ├── foreach_no_capture.nut │ │ │ ├── foreach_no_capture.out │ │ │ ├── function_param_destructuring.nut │ │ │ └── function_param_destructuring.out │ │ ├── div64_by_minus_one_opt.nut │ │ ├── div64_by_minus_one_opt.out │ │ ├── div64_by_minus_one_vm.nut │ │ ├── div64_by_minus_one_vm.out │ │ ├── div_by_minus_one_opt.nut │ │ ├── div_by_minus_one_opt.out │ │ ├── div_by_minus_one_vm.nut │ │ ├── div_by_minus_one_vm.out │ │ ├── fallback_get_recursion.nut │ │ ├── fallback_get_recursion.out │ │ ├── fuzzer_seed_106.nut │ │ ├── fuzzer_seed_106.out │ │ ├── fuzzer_seed_3250.nut │ │ ├── fuzzer_seed_3250.out │ │ ├── fuzzer_seed_7200.nut │ │ ├── fuzzer_seed_7200.out │ │ ├── import_correct.nut │ │ ├── import_correct.out │ │ ├── inexpr_block/ │ │ │ ├── inexpr_block_1.nut │ │ │ ├── inexpr_block_1.out │ │ │ ├── inexpr_block_2.nut │ │ │ ├── inexpr_block_2.out │ │ │ ├── inexpr_block_3.nut │ │ │ ├── inexpr_block_3.out │ │ │ ├── inexpr_block_4.nut │ │ │ ├── inexpr_block_4.out │ │ │ ├── inexpr_block_5.nut │ │ │ ├── inexpr_block_5.out │ │ │ ├── inexpr_block_6.nut │ │ │ ├── inexpr_block_6.out │ │ │ ├── inexpr_block_7.nut │ │ │ ├── inexpr_block_7.out │ │ │ ├── inexpr_block_8.nut │ │ │ ├── inexpr_block_8.out │ │ │ ├── test_codeblock.nut │ │ │ ├── test_codeblock.out │ │ │ ├── test_codeblock_return_in_try.nut │ │ │ ├── test_codeblock_return_in_try.out │ │ │ ├── test_codeblock_try.nut │ │ │ └── test_codeblock_try.out │ │ ├── integers.nut │ │ ├── integers.out │ │ ├── is_frozen.nut │ │ ├── is_frozen.out │ │ ├── locals_chain.nut │ │ ├── locals_chain.out │ │ ├── metamethod_error.nut │ │ ├── metamethod_error.out │ │ ├── mod64_by_minus_one_opt.nut │ │ ├── mod64_by_minus_one_opt.out │ │ ├── mod64_by_minus_one_vm.nut │ │ ├── mod64_by_minus_one_vm.out │ │ ├── mod_by_minus_one_opt.nut │ │ ├── mod_by_minus_one_opt.out │ │ ├── mod_by_minus_one_vm.nut │ │ ├── mod_by_minus_one_vm.out │ │ ├── native_fields.nut │ │ ├── native_fields.out │ │ ├── opt/ │ │ │ ├── fuzz_52807_min.nut │ │ │ ├── fuzz_52807_min.out │ │ │ ├── fuzz_min.nut │ │ │ ├── fuzz_min.out │ │ │ ├── modify_local_var.nut │ │ │ ├── modify_local_var.out │ │ │ ├── opt_reassign_addi.nut │ │ │ ├── opt_reassign_addi.out │ │ │ ├── opt_reassign_arith.nut │ │ │ ├── opt_reassign_arith.out │ │ │ ├── opt_reassign_chain.nut │ │ │ ├── opt_reassign_chain.out │ │ │ ├── opt_reassign_in_scope.nut │ │ │ ├── opt_reassign_in_scope.out │ │ │ ├── opt_same_reg_fold.nut │ │ │ ├── opt_same_reg_fold.out │ │ │ ├── sqf916086.nut │ │ │ └── sqf916086.out │ │ ├── optimizer.nut │ │ ├── optimizer.out │ │ ├── optimizer_add.nut │ │ ├── optimizer_add.out │ │ ├── optimizer_mul.nut │ │ ├── optimizer_mul.out │ │ ├── parenCallee.nut │ │ ├── parenCallee.out │ │ ├── ph_optimizer_null_call_1.nut │ │ ├── ph_optimizer_null_call_1.out │ │ ├── ph_optimizer_null_call_2.nut │ │ ├── ph_optimizer_null_call_2.out │ │ ├── ph_optimizer_null_call_3.nut │ │ ├── ph_optimizer_null_call_3.out │ │ ├── runtime_type_check/ │ │ │ ├── assign_type_01.nut │ │ │ ├── assign_type_01.out │ │ │ ├── assign_type_02.nut │ │ │ ├── assign_type_02.out │ │ │ ├── assign_type_03.nut │ │ │ ├── assign_type_03.out │ │ │ ├── assign_type_04.nut │ │ │ ├── assign_type_04.out │ │ │ ├── assign_type_05.nut │ │ │ ├── assign_type_05.out │ │ │ ├── assign_type_06.nut │ │ │ ├── assign_type_06.out │ │ │ ├── assign_type_07.nut │ │ │ ├── assign_type_07.out │ │ │ ├── assign_type_08.nut │ │ │ ├── assign_type_08.out │ │ │ ├── assign_type_09.nut │ │ │ ├── assign_type_09.out │ │ │ ├── assign_type_10.nut │ │ │ ├── assign_type_10.out │ │ │ ├── assign_wrong_type_01.nut │ │ │ ├── assign_wrong_type_01.out │ │ │ ├── assign_wrong_type_02.nut │ │ │ ├── assign_wrong_type_02.out │ │ │ ├── assign_wrong_type_03.nut │ │ │ ├── assign_wrong_type_03.out │ │ │ ├── assign_wrong_type_04.nut │ │ │ ├── assign_wrong_type_04.out │ │ │ ├── assign_wrong_type_05.nut │ │ │ ├── assign_wrong_type_05.out │ │ │ ├── assign_wrong_type_06.nut │ │ │ ├── assign_wrong_type_06.out │ │ │ ├── assign_wrong_type_07.nut │ │ │ ├── assign_wrong_type_07.out │ │ │ ├── assign_wrong_type_08.nut │ │ │ ├── assign_wrong_type_08.out │ │ │ ├── assign_wrong_type_09.nut │ │ │ ├── assign_wrong_type_09.out │ │ │ ├── assign_wrong_type_10.nut │ │ │ ├── assign_wrong_type_10.out │ │ │ ├── return_type.nut │ │ │ ├── return_type.out │ │ │ ├── return_wrong_type.nut │ │ │ └── return_wrong_type.out │ │ ├── spec/ │ │ │ ├── class.nut │ │ │ ├── class.out │ │ │ ├── classInher.nut │ │ │ ├── classInher.out │ │ │ ├── class_extend.nut │ │ │ ├── class_extend.out │ │ │ ├── clone.nut │ │ │ ├── clone.out │ │ │ ├── closure.nut │ │ │ ├── closure.out │ │ │ ├── conditionalFor.nut │ │ │ ├── conditionalFor.out │ │ │ ├── const.nut │ │ │ ├── const.out │ │ │ ├── constFolding.nut │ │ │ ├── constFolding.out │ │ │ ├── constFoldingCond.nut │ │ │ ├── constFoldingCond.out │ │ │ ├── const_func.nut │ │ │ ├── const_func.out │ │ │ ├── const_func_freevars.nut │ │ │ ├── const_func_freevars.out │ │ │ ├── const_math_eval.nut │ │ │ ├── const_math_eval.out │ │ │ ├── const_with_expr.nut │ │ │ ├── const_with_expr.out │ │ │ ├── delegate_get.nut │ │ │ ├── delegate_get.out │ │ │ ├── destruct.nut │ │ │ ├── destruct.out │ │ │ ├── dowstmt.nut │ │ │ ├── dowstmt.out │ │ │ ├── enums.nut │ │ │ ├── enums.out │ │ │ ├── foreachstmt.nut │ │ │ ├── foreachstmt.out │ │ │ ├── forstmt.nut │ │ │ ├── forstmt.out │ │ │ ├── func_pure_attr.nut │ │ │ ├── func_pure_attr.out │ │ │ ├── generators.nut │ │ │ ├── generators.out │ │ │ ├── ifstmt.nut │ │ │ ├── ifstmt.out │ │ │ ├── sort.nut │ │ │ ├── sort.out │ │ │ ├── stringtmplt.nut │ │ │ ├── stringtmplt.out │ │ │ ├── trystmt.nut │ │ │ ├── trystmt.out │ │ │ ├── whilestmt.nut │ │ │ └── whilestmt.out │ │ ├── stack_metamethod.nut │ │ ├── stack_metamethod.out │ │ ├── stack_metamethod_few_args.nut │ │ ├── stack_metamethod_few_args.out │ │ ├── stack_metamethod_locals.nut │ │ ├── stack_metamethod_locals.out │ │ ├── staticmemo/ │ │ │ ├── no_memo_mutable_args.nut │ │ │ ├── no_memo_mutable_args.out │ │ │ ├── no_memo_mutable_result.nut │ │ │ ├── no_memo_mutable_result.out │ │ │ ├── static_assign_itself.nut │ │ │ ├── static_assign_itself.out │ │ │ ├── static_exception.nut │ │ │ ├── static_exception.out │ │ │ ├── static_freeze.nut │ │ │ ├── static_freeze.out │ │ │ ├── static_loop.nut │ │ │ ├── static_loop.out │ │ │ ├── static_nested.nut │ │ │ ├── static_nested.out │ │ │ ├── static_opt.nut │ │ │ ├── static_opt.out │ │ │ ├── static_opt2.nut │ │ │ ├── static_opt2.out │ │ │ ├── static_reset1.nut │ │ │ ├── static_reset1.out │ │ │ ├── static_reset2.nut │ │ │ ├── static_reset2.out │ │ │ ├── static_reset_module.nut │ │ │ ├── static_reset_module.out │ │ │ ├── static_tables.nut │ │ │ ├── static_tables.out │ │ │ ├── static_types.nut │ │ │ └── static_types.out │ │ ├── stdlib/ │ │ │ ├── blob_methods.nut │ │ │ ├── blob_methods.out │ │ │ ├── copy_content_with_replace.nut │ │ │ ├── copy_content_with_replace.out │ │ │ ├── datetime.nut │ │ │ ├── datetime.out │ │ │ ├── debug.nut │ │ │ ├── debug.out │ │ │ ├── debug_extras.nut │ │ │ ├── debug_extras.out │ │ │ ├── deep_hash.nut │ │ │ ├── deep_hash.out │ │ │ ├── deep_regex.nut │ │ │ ├── deep_regex.out │ │ │ ├── delegates.nut │ │ │ ├── delegates.out │ │ │ ├── deser_oom.nut │ │ │ ├── deser_oom.out │ │ │ ├── docstring.nut │ │ │ ├── docstring.out │ │ │ ├── file_io.nut │ │ │ ├── file_io.out │ │ │ ├── math_funcs.nut │ │ │ ├── math_funcs.out │ │ │ ├── math_min_max_clamp.nut │ │ │ ├── math_min_max_clamp.out │ │ │ ├── obj_serialization.nut │ │ │ ├── obj_serialization.out │ │ │ ├── obj_serialization_errors.nut │ │ │ ├── obj_serialization_errors.out │ │ │ ├── obj_serialization_errors_arg.nut │ │ │ ├── obj_serialization_errors_arg.out │ │ │ ├── obj_serialization_valid.nut │ │ │ ├── obj_serialization_valid.out │ │ │ ├── rawdelete.nut │ │ │ ├── rawdelete.out │ │ │ ├── regexp.nut │ │ │ ├── regexp.out │ │ │ ├── regexp_fixed_bugs.nut │ │ │ ├── regexp_fixed_bugs.out │ │ │ ├── stream_methods.nut │ │ │ ├── stream_methods.out │ │ │ ├── string.nut │ │ │ ├── string.out │ │ │ ├── string_escape.nut │ │ │ ├── string_escape.out │ │ │ ├── string_format.nut │ │ │ ├── string_format.out │ │ │ ├── swap.nut │ │ │ ├── swap.out │ │ │ ├── swap_stack_check.nut │ │ │ ├── swap_stack_check.out │ │ │ ├── system_lib.nut │ │ │ └── system_lib.out │ │ ├── string_interpolation.nut │ │ ├── string_interpolation.out │ │ ├── string_interpolation_new.nut │ │ ├── string_interpolation_new.out │ │ ├── string_methods.nut │ │ ├── string_methods.out │ │ ├── sub_int_min.nut │ │ ├── sub_int_min.out │ │ ├── surprise_js_dev.nut │ │ ├── surprise_js_dev.out │ │ ├── table_methods.nut │ │ ├── table_methods.out │ │ ├── testNullPropagation.nut │ │ ├── testNullPropagation.out │ │ ├── test_class_yield_call.nut │ │ ├── test_class_yield_call.out │ │ ├── test_shift.nut │ │ ├── test_shift.out │ │ ├── test_stale_stkbase.nut │ │ ├── test_stale_stkbase.out │ │ ├── tostring_recursion.nut │ │ ├── tostring_recursion.out │ │ ├── type_classes/ │ │ │ ├── test_builtin_constructors.nut │ │ │ ├── test_builtin_constructors.out │ │ │ ├── test_inheritance_error.nut │ │ │ ├── test_inheritance_error.out │ │ │ ├── test_unified_types.nut │ │ │ └── test_unified_types.out │ │ ├── type_hints/ │ │ │ ├── function_types.nut │ │ │ ├── function_types.out │ │ │ ├── var_decl.nut │ │ │ └── var_decl.out │ │ ├── type_inference/ │ │ │ ├── test_arithmetic_ok.nut │ │ │ ├── test_arithmetic_ok.out │ │ │ ├── test_array_literal_ok.nut │ │ │ ├── test_array_literal_ok.out │ │ │ ├── test_assignment_chain_ok.nut │ │ │ ├── test_assignment_chain_ok.out │ │ │ ├── test_call_result_ok.nut │ │ │ ├── test_call_result_ok.out │ │ │ ├── test_call_union_return_ok.nut │ │ │ ├── test_call_union_return_ok.out │ │ │ ├── test_class_literal_ok.nut │ │ │ ├── test_class_literal_ok.out │ │ │ ├── test_comparison_ok.nut │ │ │ ├── test_comparison_ok.out │ │ │ ├── test_complex_assign_ok.nut │ │ │ ├── test_complex_assign_ok.out │ │ │ ├── test_complex_bitwise_ok.nut │ │ │ ├── test_complex_bitwise_ok.out │ │ │ ├── test_complex_call_chain_ok.nut │ │ │ ├── test_complex_call_chain_ok.out │ │ │ ├── test_complex_deep_nesting_ok.nut │ │ │ ├── test_complex_deep_nesting_ok.out │ │ │ ├── test_complex_logical_ok.nut │ │ │ ├── test_complex_logical_ok.out │ │ │ ├── test_complex_mixed_arithmetic_ok.nut │ │ │ ├── test_complex_mixed_arithmetic_ok.out │ │ │ ├── test_complex_nested_ternary_ok.nut │ │ │ ├── test_complex_nested_ternary_ok.out │ │ │ ├── test_complex_nullcoalesce_ok.nut │ │ │ ├── test_complex_nullcoalesce_ok.out │ │ │ ├── test_complex_pure_chain_ok.nut │ │ │ ├── test_complex_pure_chain_ok.out │ │ │ ├── test_complex_return_expr_ok.nut │ │ │ ├── test_complex_return_expr_ok.out │ │ │ ├── test_complex_table_ternary_ok.nut │ │ │ ├── test_complex_table_ternary_ok.out │ │ │ ├── test_const_array4_ok.nut │ │ │ ├── test_const_array4_ok.out │ │ │ ├── test_const_array_ok.nut │ │ │ ├── test_const_array_ok.out │ │ │ ├── test_const_function_ok.nut │ │ │ ├── test_const_function_ok.out │ │ │ ├── test_const_inline_ok.nut │ │ │ ├── test_const_inline_ok.out │ │ │ ├── test_const_table_ok.nut │ │ │ ├── test_const_table_ok.out │ │ │ ├── test_destructure_array_default_ok.nut │ │ │ ├── test_destructure_array_default_ok.out │ │ │ ├── test_destructure_array_ok.nut │ │ │ ├── test_destructure_array_ok.out │ │ │ ├── test_destructure_from_function_ok.nut │ │ │ ├── test_destructure_from_function_ok.out │ │ │ ├── test_destructure_nested_ok.nut │ │ │ ├── test_destructure_nested_ok.out │ │ │ ├── test_destructure_table_ok.nut │ │ │ ├── test_destructure_table_ok.out │ │ │ ├── test_freeze_ok.nut │ │ │ ├── test_freeze_ok.out │ │ │ ├── test_function_literal_ok.nut │ │ │ ├── test_function_literal_ok.out │ │ │ ├── test_instance_from_class_ok.nut │ │ │ ├── test_instance_from_class_ok.out │ │ │ ├── test_literal_ok.nut │ │ │ ├── test_literal_ok.out │ │ │ ├── test_return_literal_ok.nut │ │ │ ├── test_return_literal_ok.out │ │ │ ├── test_string_concat_ok.nut │ │ │ ├── test_string_concat_ok.out │ │ │ ├── test_table_literal_ok.nut │ │ │ ├── test_table_literal_ok.out │ │ │ ├── test_table_return_ok.nut │ │ │ ├── test_table_return_ok.out │ │ │ ├── test_ternary_ok.nut │ │ │ ├── test_ternary_ok.out │ │ │ ├── test_typeof_ok.nut │ │ │ └── test_typeof_ok.out │ │ ├── valid_syntax/ │ │ │ ├── arrays.nut │ │ │ ├── arrays.out │ │ │ ├── classes.nut │ │ │ ├── classes.out │ │ │ ├── closures_scope.nut │ │ │ ├── closures_scope.out │ │ │ ├── control_flow.nut │ │ │ ├── control_flow.out │ │ │ ├── destructuring.nut │ │ │ ├── destructuring.out │ │ │ ├── enums_consts.nut │ │ │ ├── enums_consts.out │ │ │ ├── error_handling.nut │ │ │ ├── error_handling.out │ │ │ ├── functions.nut │ │ │ ├── functions.out │ │ │ ├── generators.nut │ │ │ ├── generators.out │ │ │ ├── literals.nut │ │ │ ├── literals.out │ │ │ ├── metamethods.nut │ │ │ ├── metamethods.out │ │ │ ├── misc.nut │ │ │ ├── misc.out │ │ │ ├── null_safety.nut │ │ │ ├── null_safety.out │ │ │ ├── operators.nut │ │ │ ├── operators.out │ │ │ ├── static_memo.nut │ │ │ ├── static_memo.out │ │ │ ├── strings.nut │ │ │ ├── strings.out │ │ │ ├── tables.nut │ │ │ ├── tables.out │ │ │ ├── threads.nut │ │ │ ├── threads.out │ │ │ ├── type_annotations.nut │ │ │ ├── type_annotations.out │ │ │ ├── variables.nut │ │ │ └── variables.out │ │ └── weird/ │ │ ├── 2000_args.nut │ │ ├── 2000_args.out │ │ ├── assign_to_optional_1.nut │ │ ├── assign_to_optional_1.out │ │ ├── assign_to_optional_2.nut │ │ ├── assign_to_optional_2.out │ │ ├── assign_to_optional_3.nut │ │ ├── assign_to_optional_3.out │ │ ├── many_locals.nut │ │ └── many_locals.out │ ├── proposed_optimizations/ │ │ ├── clone_newslot_vs_merge.nut │ │ ├── filter_map_folding.nut │ │ ├── filter_map_folding2.nut │ │ └── strings_folding.nut │ ├── static_analyzer/ │ │ ├── .sqconfig │ │ ├── 200_nullc.diag.txt │ │ ├── 200_nullc.nut │ │ ├── function_rt_detect.diag.txt │ │ ├── function_rt_detect.nut │ │ ├── logic_ops_paren.diag.txt │ │ ├── logic_ops_paren.nut │ │ ├── module_foo.diag.txt │ │ ├── module_foo.nut │ │ ├── nullcheck_ternary.diag.txt │ │ ├── nullcheck_ternary.nut │ │ ├── pattern_class_check.diag.txt │ │ ├── pattern_class_check.nut │ │ ├── pattern_effect_from_call.diag.txt │ │ ├── pattern_effect_from_call.nut │ │ ├── pattern_forloop_merge.diag.txt │ │ ├── pattern_forloop_merge.nut │ │ ├── pattern_intersected_assignment.diag.txt │ │ ├── pattern_intersected_assignment.nut │ │ ├── pattern_lambdas.diag.txt │ │ ├── pattern_lambdas.nut │ │ ├── pattern_loop_state.diag.txt │ │ ├── pattern_loop_state.nut │ │ ├── pattern_param_check.diag.txt │ │ ├── pattern_param_check.nut │ │ ├── w190.diag.txt │ │ ├── w190.nut │ │ ├── w192.diag.txt │ │ ├── w192.nut │ │ ├── w200.diag.txt │ │ ├── w200.nut │ │ ├── w200_3wcmp.diag.txt │ │ ├── w200_3wcmp.nut │ │ ├── w200_arith.diag.txt │ │ ├── w200_arith.nut │ │ ├── w200_arith_deep.diag.txt │ │ ├── w200_arith_deep.nut │ │ ├── w200_arith_plus_eq.diag.txt │ │ ├── w200_arith_plus_eq.nut │ │ ├── w200_special_func_name.diag.txt │ │ ├── w200_special_func_name.nut │ │ ├── w200_static_memo_expr.diag.txt │ │ ├── w200_static_memo_expr.nut │ │ ├── w200_stringconcat.diag.txt │ │ ├── w200_stringconcat.nut │ │ ├── w203.diag.txt │ │ ├── w203.nut │ │ ├── w204.diag.txt │ │ ├── w204.nut │ │ ├── w205-2.diag.txt │ │ ├── w205-2.nut │ │ ├── w205.diag.txt │ │ ├── w205.nut │ │ ├── w206.diag.txt │ │ ├── w206.nut │ │ ├── w206_arith.diag.txt │ │ ├── w206_arith.nut │ │ ├── w208.diag.txt │ │ ├── w208.nut │ │ ├── w209.diag.txt │ │ ├── w209.nut │ │ ├── w210.diag.txt │ │ ├── w210.nut │ │ ├── w210_complex.diag.txt │ │ ├── w210_complex.nut │ │ ├── w210_deep.diag.txt │ │ ├── w210_deep.nut │ │ ├── w210_def.diag.txt │ │ ├── w210_def.nut │ │ ├── w211.diag.txt │ │ ├── w211.nut │ │ ├── w212.diag.txt │ │ ├── w212.nut │ │ ├── w213.diag.txt │ │ ├── w213.nut │ │ ├── w214.diag.txt │ │ ├── w214.nut │ │ ├── w214_static_memo_expr.diag.txt │ │ ├── w214_static_memo_expr.nut │ │ ├── w215.diag.txt │ │ ├── w215.nut │ │ ├── w215_nullc.diag.txt │ │ ├── w215_nullc.nut │ │ ├── w216.diag.txt │ │ ├── w216.nut │ │ ├── w217_break.diag.txt │ │ ├── w217_break.nut │ │ ├── w217_complex.diag.txt │ │ ├── w217_complex.nut │ │ ├── w217_cond_cont.diag.txt │ │ ├── w217_cond_cont.nut │ │ ├── w217_continue.diag.txt │ │ ├── w217_continue.nut │ │ ├── w217_ret.diag.txt │ │ ├── w217_ret.nut │ │ ├── w217_throw.diag.txt │ │ ├── w217_throw.nut │ │ ├── w220.diag.txt │ │ ├── w220.nut │ │ ├── w220_deep.diag.txt │ │ ├── w220_deep.nut │ │ ├── w221.diag.txt │ │ ├── w221.nut │ │ ├── w221_delete.diag.txt │ │ ├── w221_delete.nut │ │ ├── w222.diag.txt │ │ ├── w222.nut │ │ ├── w222_deep.diag.txt │ │ ├── w222_deep.nut │ │ ├── w222_inside_detructure.diag.txt │ │ ├── w222_inside_detructure.nut │ │ ├── w223.diag.txt │ │ ├── w223.nut │ │ ├── w223_method_is.diag.txt │ │ ├── w223_method_is.nut │ │ ├── w224_then.diag.txt │ │ ├── w224_then.nut │ │ ├── w224_while.diag.txt │ │ ├── w224_while.nut │ │ ├── w225.diag.txt │ │ ├── w225.nut │ │ ├── w225_empty_stmt.diag.txt │ │ ├── w225_empty_stmt.nut │ │ ├── w225_switch.diag.txt │ │ ├── w225_switch.nut │ │ ├── w226.diag.txt │ │ ├── w226.nut │ │ ├── w227.diag.txt │ │ ├── w227.nut │ │ ├── w227_external.diag.txt │ │ ├── w227_external.nut │ │ ├── w227_fn_with_same_param.diag.txt │ │ ├── w227_fn_with_same_param.nut │ │ ├── w227_foreach_destr_shadow.diag.txt │ │ ├── w227_foreach_destr_shadow.nut │ │ ├── w227_let_init_fun.diag.txt │ │ ├── w227_let_init_fun.nut │ │ ├── w227_table.diag.txt │ │ ├── w227_table.nut │ │ ├── w227_varargs.diag.txt │ │ ├── w227_varargs.nut │ │ ├── w228.diag.txt │ │ ├── w228.nut │ │ ├── w228_2.diag.txt │ │ ├── w228_2.nut │ │ ├── w228_3.diag.txt │ │ ├── w228_3.nut │ │ ├── w228_4.diag.txt │ │ ├── w228_4.nut │ │ ├── w228_foreach_destr_default_uses.diag.txt │ │ ├── w228_foreach_destr_default_uses.nut │ │ ├── w228_table.diag.txt │ │ ├── w228_table.nut │ │ ├── w228_trivial.diag.txt │ │ ├── w228_trivial.nut │ │ ├── w229.diag.txt │ │ ├── w229.nut │ │ ├── w230_unused_import.diag.txt │ │ ├── w230_unused_import.nut │ │ ├── w231.diag.txt │ │ ├── w231.nut │ │ ├── w232_cascade.diag.txt │ │ ├── w232_cascade.nut │ │ ├── w232_false.diag.txt │ │ ├── w232_false.nut │ │ ├── w232_lambda.diag.txt │ │ ├── w232_lambda.nut │ │ ├── w232_not.diag.txt │ │ ├── w232_not.nut │ │ ├── w232_ter.diag.txt │ │ ├── w232_ter.nut │ │ ├── w232_ternary.diag.txt │ │ ├── w232_ternary.nut │ │ ├── w232_true.diag.txt │ │ ├── w232_true.nut │ │ ├── w233.diag.txt │ │ ├── w233.nut │ │ ├── w234.diag.txt │ │ ├── w234.nut │ │ ├── w234_outer.diag.txt │ │ ├── w234_outer.nut │ │ ├── w235.diag.txt │ │ ├── w235.nut │ │ ├── w236.diag.txt │ │ ├── w236.nut │ │ ├── w238_heuristic.diag.txt │ │ ├── w238_heuristic.nut │ │ ├── w238_idname.diag.txt │ │ ├── w238_idname.nut │ │ ├── w238_isis.diag.txt │ │ ├── w238_isis.nut │ │ ├── w238_merge.diag.txt │ │ ├── w238_merge.nut │ │ ├── w238_sqconfig.diag.txt │ │ ├── w238_sqconfig.nut │ │ ├── w239.diag.txt │ │ ├── w239.nut │ │ ├── w239_sqconfig.diag.txt │ │ ├── w239_sqconfig.nut │ │ ├── w240.diag.txt │ │ ├── w240.nut │ │ ├── w241.diag.txt │ │ ├── w241.nut │ │ ├── w241_conditional.diag.txt │ │ ├── w241_conditional.nut │ │ ├── w244.diag.txt │ │ ├── w244.nut │ │ ├── w248.diag.txt │ │ ├── w248.nut │ │ ├── w248_access.diag.txt │ │ ├── w248_access.nut │ │ ├── w248_additional.diag.txt │ │ ├── w248_additional.nut │ │ ├── w248_andand.diag.txt │ │ ├── w248_andand.nut │ │ ├── w248_andor.diag.txt │ │ ├── w248_andor.nut │ │ ├── w248_array.diag.txt │ │ ├── w248_array.nut │ │ ├── w248_assert.diag.txt │ │ ├── w248_assert.nut │ │ ├── w248_chain.diag.txt │ │ ├── w248_chain.nut │ │ ├── w248_complex2.diag.txt │ │ ├── w248_complex2.nut │ │ ├── w248_complex_key.diag.txt │ │ ├── w248_complex_key.nut │ │ ├── w248_complexcond.diag.txt │ │ ├── w248_complexcond.nut │ │ ├── w248_eq_get.diag.txt │ │ ├── w248_eq_get.nut │ │ ├── w248_evaled.diag.txt │ │ ├── w248_evaled.nut │ │ ├── w248_getfield.diag.txt │ │ ├── w248_getfield.nut │ │ ├── w248_in.diag.txt │ │ ├── w248_in.nut │ │ ├── w248_in_container.diag.txt │ │ ├── w248_in_container.nut │ │ ├── w248_not.diag.txt │ │ ├── w248_not.nut │ │ ├── w248_nullc_2.diag.txt │ │ ├── w248_nullc_2.nut │ │ ├── w248_nullc_3.diag.txt │ │ ├── w248_nullc_3.nut │ │ ├── w248_oror.diag.txt │ │ ├── w248_oror.nut │ │ ├── w248_oror2.diag.txt │ │ ├── w248_oror2.nut │ │ ├── w248_override.diag.txt │ │ ├── w248_override.nut │ │ ├── w248_relative_pred.diag.txt │ │ ├── w248_relative_pred.nut │ │ ├── w248_special_name_func.diag.txt │ │ ├── w248_special_name_func.nut │ │ ├── w248_terminated_branch1.diag.txt │ │ ├── w248_terminated_branch1.nut │ │ ├── w248_tyopeof1.diag.txt │ │ ├── w248_tyopeof1.nut │ │ ├── w248_tyopeof2.diag.txt │ │ ├── w248_tyopeof2.nut │ │ ├── w248_type_func.diag.txt │ │ ├── w248_type_func.nut │ │ ├── w248_while_cond.diag.txt │ │ ├── w248_while_cond.nut │ │ ├── w250_array.diag.txt │ │ ├── w250_array.nut │ │ ├── w250_container.diag.txt │ │ ├── w250_container.nut │ │ ├── w254.diag.txt │ │ ├── w254.nut │ │ ├── w254_instanceof.diag.txt │ │ ├── w254_instanceof.nut │ │ ├── w254_notin.diag.txt │ │ ├── w254_notin.nut │ │ ├── w255.diag.txt │ │ ├── w255.nut │ │ ├── w255_2.diag.txt │ │ ├── w255_2.nut │ │ ├── w255_foreach_destr_distinct.diag.txt │ │ ├── w255_foreach_destr_distinct.nut │ │ ├── w256.diag.txt │ │ ├── w256.nut │ │ ├── w257.diag.txt │ │ ├── w257.nut │ │ ├── w258.diag.txt │ │ ├── w258.nut │ │ ├── w258_2.diag.txt │ │ ├── w258_2.nut │ │ ├── w259.diag.txt │ │ ├── w259.nut │ │ ├── w260_local_function.diag.txt │ │ ├── w260_local_function.nut │ │ ├── w260_table.diag.txt │ │ ├── w260_table.nut │ │ ├── w260_table_sqconfig.diag.txt │ │ ├── w260_table_sqconfig.nut │ │ ├── w262.diag.txt │ │ ├── w262.nut │ │ ├── w263.diag.txt │ │ ├── w263.nut │ │ ├── w264.diag.txt │ │ ├── w264.nut │ │ ├── w266.diag.txt │ │ ├── w266.nut │ │ ├── w267.diag.txt │ │ ├── w267.nut │ │ ├── w269.diag.txt │ │ ├── w269.nut │ │ ├── w270.diag.txt │ │ ├── w270.nut │ │ ├── w271.diag.txt │ │ ├── w271.nut │ │ ├── w272.diag.txt │ │ ├── w272.nut │ │ ├── w275.diag.txt │ │ ├── w275.nut │ │ ├── w275_all_variants.diag.txt │ │ ├── w275_all_variants.nut │ │ ├── w275_complex.diag.txt │ │ ├── w275_complex.nut │ │ ├── w277.diag.txt │ │ ├── w277.nut │ │ ├── w279_1.diag.txt │ │ ├── w279_1.nut │ │ ├── w279_2.diag.txt │ │ ├── w279_2.nut │ │ ├── w280.diag.txt │ │ ├── w280.nut │ │ ├── w281.diag.txt │ │ ├── w281.nut │ │ ├── w283.diag.txt │ │ ├── w283.nut │ │ ├── w284.diag.txt │ │ ├── w284.nut │ │ ├── w285.diag.txt │ │ ├── w285.nut │ │ ├── w286.diag.txt │ │ ├── w286.nut │ │ ├── w286_2.diag.txt │ │ ├── w286_2.nut │ │ ├── w286_oror_andand.diag.txt │ │ ├── w286_oror_andand.nut │ │ ├── w287.diag.txt │ │ ├── w287.nut │ │ ├── w288.diag.txt │ │ ├── w288.nut │ │ ├── w288_dp_va.diag.txt │ │ ├── w288_dp_va.nut │ │ ├── w288_lambdas2.diag.txt │ │ ├── w288_lambdas2.nut │ │ ├── w288_native.diag.txt │ │ ├── w288_native.nut │ │ ├── w288_require.diag.txt │ │ ├── w288_require.nut │ │ ├── w288_require_indirect.diag.txt │ │ ├── w288_require_indirect.nut │ │ ├── w289.diag.txt │ │ ├── w289.nut │ │ ├── w291.diag.txt │ │ ├── w291.nut │ │ ├── w292.diag.txt │ │ ├── w292.nut │ │ ├── w293.diag.txt │ │ ├── w293.nut │ │ ├── w295.diag.txt │ │ ├── w295.nut │ │ ├── w297.diag.txt │ │ ├── w297.nut │ │ ├── w305.diag.txt │ │ ├── w305.nut │ │ ├── w306.diag.txt │ │ ├── w306.nut │ │ ├── w308.diag.txt │ │ ├── w308.nut │ │ ├── w309_require.diag.txt │ │ ├── w309_require.nut │ │ ├── w310_require.diag.txt │ │ ├── w310_require.nut │ │ ├── w312_require.diag.txt │ │ ├── w312_require.nut │ │ ├── w318_merge_empty_table.diag.txt │ │ ├── w318_merge_empty_table.nut │ │ ├── w319_empty_array_resize.diag.txt │ │ ├── w319_empty_array_resize.nut │ │ ├── w320.diag.txt │ │ ├── w320.nut │ │ ├── w321.diag.txt │ │ ├── w321.nut │ │ ├── w322.diag.txt │ │ └── w322.nut │ └── types/ │ ├── default_values.nut.txt │ ├── default_values.out │ ├── default_values_invalid.nut.txt │ ├── default_values_invalid.out │ ├── invalid.nut.txt │ ├── invalid.out │ ├── type_suggestions.nut.txt │ ├── type_suggestions.out │ ├── valid.nut.txt │ └── valid.out └── testRunner.py
SYMBOL INDEX (1389 symbols across 129 files)
FILE: doc/repl/native.cpp
type WasmSqModulesFileAccess (line 10) | struct WasmSqModulesFileAccess : public ISqModulesFileAccess
method destroy (line 12) | virtual void destroy() override {}
method getSearchTargets (line 14) | virtual void getSearchTargets(const char * /*fn*/, bool &search_native...
method resolveFileName (line 19) | virtual void resolveFileName(const char *requested_fn, const char *run...
method readFile (line 24) | virtual bool readFile(const string &resolved_fn, const char *requested...
function vlformat (line 35) | static const std::string vlformat(const char * const fmt, va_list va)
function vaformat (line 48) | static const std::string vaformat(const char * const fmt, ...)
function script_print_func (line 57) | static void script_print_func(HSQUIRRELVM /*v*/, const char* s,...)
function script_err_print_func (line 66) | static void script_err_print_func(HSQUIRRELVM /*v*/, const char* s,...)
function compile_error_handler (line 75) | static void compile_error_handler(HSQUIRRELVM /*v*/, SQMessageSeverity s...
function SQInteger (line 90) | static SQInteger runtime_error_handler(HSQUIRRELVM v)
function runScript (line 117) | static std::string runScript(const std::string &source_text)
function EMSCRIPTEN_BINDINGS (line 185) | EMSCRIPTEN_BINDINGS(native) { emscripten::function("runScript", &runScri...
FILE: doc/repl/static/replmain.js
function execute (line 8) | function execute() {
FILE: doc/source/conf.py
function read_version_from_source (line 62) | def read_version_from_source():
function setup (line 293) | def setup(app):
FILE: doc/source/quirrel.py
class SQObject (line 35) | class SQObject(ObjectDescription):
method handle_signature (line 50) | def handle_signature(self, sig, signode):
method add_target_and_index (line 104) | def add_target_and_index(self, name_obj, sig, signode):
method get_index_text (line 128) | def get_index_text(self, objectname, name_obj):
method before_content (line 143) | def before_content(self):
method after_content (line 180) | def after_content(self):
class SQCallable (line 201) | class SQCallable(SQObject):
class SQConstructor (line 219) | class SQConstructor(SQCallable):
class SQModule (line 225) | class SQModule(SphinxDirective):
method run (line 252) | def run(self):
class SQXRefRole (line 274) | class SQXRefRole(XRefRole):
method process_link (line 275) | def process_link(self, env, refnode, has_explicit_title, title, target):
class QuirrelDomain (line 294) | class QuirrelDomain(Domain):
method clear_doc (line 328) | def clear_doc(self, docname):
method merge_domaindata (line 337) | def merge_domaindata(self, docnames, otherdata):
method find_obj (line 347) | def find_obj(self, env, mod_name, prefix, name, typ, searchorder=0):
method resolve_xref (line 372) | def resolve_xref(self, env, fromdocname, builder, typ, target, node,
method resolve_any_xref (line 384) | def resolve_any_xref(self, env, fromdocname, builder, target, node,
method get_objects (line 396) | def get_objects(self):
method get_full_qualified_name (line 402) | def get_full_qualified_name(self, node):
function setup (line 413) | def setup(app):
FILE: doc/source/quirrel_pygment_lexer.py
class QuirrelLexer (line 30) | class QuirrelLexer(RegexLexer):
function setup (line 125) | def setup(app):
FILE: helpers/keyValueFile.h
function class (line 30) | class KeyValueFile
function getBool (line 324) | bool getBool(const char * key, bool default_value) const
FILE: include/sq_char_class.h
function sq_isalnum (line 3) | inline bool sq_isalnum(int c)
function sq_isalpha (line 9) | inline bool sq_isalpha(int c)
function sq_isblank (line 15) | inline bool sq_isblank(int c)
function sq_iscntrl (line 21) | inline bool sq_iscntrl(int c)
function sq_isdigit (line 27) | inline bool sq_isdigit(int c)
function sq_isgraph (line 33) | inline bool sq_isgraph(int c)
function sq_islower (line 39) | inline bool sq_islower(int c)
function sq_isprint (line 45) | inline bool sq_isprint(int c)
function sq_ispunct (line 51) | inline bool sq_ispunct(int c)
function sq_isspace (line 57) | inline bool sq_isspace(int c)
function sq_isupper (line 63) | inline bool sq_isupper(int c)
function sq_isxdigit (line 69) | inline bool sq_isxdigit(int c)
function sq_toupper (line 75) | inline int sq_toupper(int c)
function sq_tolower (line 82) | inline int sq_tolower(int c)
FILE: include/sqconfig.h
type SQInteger (line 10) | typedef int64_t SQInteger;
type SQUnsignedInteger (line 11) | typedef uint64_t SQUnsignedInteger;
type SQHash (line 12) | typedef uint64_t SQHash;
type SQInteger (line 14) | typedef intptr_t SQInteger;
type SQUnsignedInteger (line 15) | typedef uintptr_t SQUnsignedInteger;
type SQHash (line 16) | typedef uintptr_t SQHash;
type SQInt32 (line 19) | typedef int SQInt32;
type SQUnsignedInteger32 (line 20) | typedef unsigned int SQUnsignedInteger32;
type SQFloat (line 24) | typedef double SQFloat;
type SQFloat (line 26) | typedef float SQFloat;
type SQRawObjectVal (line 30) | typedef int64_t SQRawObjectVal;
type SQUnsignedInteger (line 33) | typedef SQUnsignedInteger SQRawObjectVal;
type SQUnsignedInteger (line 46) | typedef SQUnsignedInteger SQBool;
type SQInteger (line 47) | typedef SQInteger SQRESULT;
FILE: include/sqio.h
function class (line 10) | class InputStream {
function class (line 65) | class StdInputStream : public InputStream {
function class (line 76) | class FileInputStream : public InputStream {
function class (line 90) | class MemoryInputStream : public InputStream {
function class (line 106) | class OutputStream {
function class (line 162) | class StdOutputStream : public OutputStream {
function class (line 173) | class FileOutputStream : public OutputStream {
function class (line 189) | class MemoryOutputStream : public OutputStream {
FILE: include/sqstdio.h
type SQStream (line 9) | struct SQStream {
FILE: include/sqstdstring.h
type SQRexBool (line 9) | typedef unsigned int SQRexBool;
type SQRex (line 10) | typedef struct SQRex SQRex;
type SQAllocContextT (line 11) | struct SQAllocContextT
type SQRexMatch (line 13) | typedef struct {
FILE: include/squirrel.h
type SQVM (line 51) | struct SQVM
type SQTable (line 52) | struct SQTable
type SQArray (line 53) | struct SQArray
type SQString (line 54) | struct SQString
type SQClosure (line 55) | struct SQClosure
type SQGenerator (line 56) | struct SQGenerator
type SQNativeClosure (line 57) | struct SQNativeClosure
type SQUserData (line 58) | struct SQUserData
type SQFunctionProto (line 59) | struct SQFunctionProto
type SQRefCounted (line 60) | struct SQRefCounted
type SQClass (line 61) | struct SQClass
type SQInstance (line 62) | struct SQInstance
type SQDelegable (line 63) | struct SQDelegable
type SQOuter (line 64) | struct SQOuter
function namespace (line 71) | namespace SQCompilation
type SQObjectType (line 132) | typedef enum tagSQObjectType{
type SQObjectFlags (line 154) | typedef uint8_t SQObjectFlags;
type SQObjectValue (line 159) | typedef union tagSQObjectValue
type SQObject (line 183) | typedef struct tagSQObject
type SQMemberHandle (line 190) | typedef struct tagSQMemberHandle{
type SQStackInfos (line 196) | typedef struct tagSQStackInfos{
type SQMessageSeverity (line 202) | typedef enum tagSQMessageSeverity{
type SQVM (line 208) | struct SQVM
type SQObject (line 209) | typedef SQObject HSQOBJECT;
type SQMemberHandle (line 210) | typedef SQMemberHandle HSQMEMBERHANDLE;
type SQInteger (line 211) | typedef SQInteger (*SQFUNCTION)(HSQUIRRELVM);
type SQInteger (line 212) | typedef SQInteger (*SQRELEASEHOOK)(HSQUIRRELVM vm,SQUserPointer,SQIntege...
type SQInteger (line 217) | typedef SQInteger (*SQWRITEFUNC)(SQUserPointer,SQUserPointer,SQInteger);
type SQInteger (line 218) | typedef SQInteger (*SQREADFUNC)(SQUserPointer,SQUserPointer,SQInteger);
type SQInteger (line 219) | typedef SQInteger (*SQGETTHREAD)();
type SQInteger (line 223) | typedef SQInteger (*SQLEXREADFUNC)(SQUserPointer);
type SQRegFunction (line 225) | typedef struct tagSQRegFunction{
type SQRegFunctionFromStr (line 235) | typedef struct tagSQRegFunctionFromStr{
type SQFunctionInfo (line 241) | typedef struct tagSQFunctionInfo {
type CompilationOptions (line 250) | enum CompilationOptions : SQUnsignedInteger {
type SQCompilerMessage (line 256) | typedef struct tagSQCompilerMessage {
type SQModuleImportSlot (line 269) | typedef struct tagSQModuleImportSlot {
type SQModuleImport (line 276) | typedef struct tagSQModuleImport {
type CompilationOptions (line 329) | enum CompilationOptions
type CompilationOptions (line 330) | enum CompilationOptions
function sq_pushobject (line 465) | static inline void sq_pushobject(HSQUIRRELVM v, const HSQOBJECT &o) { re...
function sq_pushobject (line 467) | static inline void sq_pushobject(HSQUIRRELVM v, HSQOBJECT o) { return sq...
function sq_resetobject (line 472) | static inline void sq_resetobject(HSQOBJECT *po)
type SQAllocContextT (line 521) | struct SQAllocContextT
function sq_addref (line 594) | static inline void sq_addref(HSQUIRRELVM v,HSQOBJECT *po)
function SQBool (line 600) | static inline SQBool sq_release(HSQUIRRELVM v,HSQOBJECT *po)
type SQObjectPtr (line 611) | struct SQObjectPtr
FILE: internal/sq_safe_shift.h
function SQInteger (line 14) | inline SQInteger sq_safe_shift_left(SQInteger x, SQInteger y)
function SQInteger (line 42) | inline SQInteger sq_safe_shift_right(SQInteger x, SQInteger y)
function SQInteger (line 69) | inline SQInteger sq_safe_unsigned_shift_right(SQInteger x, SQInteger y)
FILE: sq/sq.cpp
function printfunc (line 38) | void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const char *s,...)
function errorfunc (line 48) | void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const char *s,...)
function PrintVersionInfos (line 56) | void PrintVersionInfos()
function PrintUsage (line 61) | void PrintUsage()
function read_file_ignoring_utf8bom (line 83) | static std::string read_file_ignoring_utf8bom(const char *filename)
function fill_stack (line 107) | static int fill_stack(HSQUIRRELVM v)
function check_stack (line 118) | static bool check_stack(HSQUIRRELVM v, int expected_top)
type DumpOptions (line 143) | struct DumpOptions {
function dumpAst_callback (line 152) | static void dumpAst_callback(HSQUIRRELVM vm, SQCompilation::SqASTData *a...
function dumpBytecodeAst_callback (line 179) | static void dumpBytecodeAst_callback(HSQUIRRELVM vm, HSQOBJECT obj, void...
function search_sqconfig (line 206) | static bool search_sqconfig(const char * initial_file_name, char *buffer...
function checkOption (line 261) | static bool checkOption(char *argv[], int argc, const char *option, cons...
function ends_with (line 280) | bool ends_with(const char * str, const char * suffix)
function parse_types_from_file (line 286) | static bool parse_types_from_file(HSQUIRRELVM sqvm, const char *filename)
function getargs (line 344) | int getargs(HSQUIRRELVM v,int argc, char* argv[],SQInteger *retval)
function sq_interpreter_main (line 576) | int sq_interpreter_main(int argc, char* argv[])
function main (line 614) | int main(int argc, char* argv[])
FILE: sq/sq_test_natives.cpp
type TestNativeVec (line 12) | struct TestNativeVec
function SQInteger (line 18) | static SQInteger nativevec_ctor(HSQUIRRELVM vm)
type Sqrat::InstanceToString<TestNativeVec> (line 36) | struct Sqrat::InstanceToString<TestNativeVec>
method SQInteger (line 38) | static SQInteger Format(HSQUIRRELVM vm)
function register_test_natives (line 51) | void register_test_natives(SqModules *module_mgr)
FILE: sqmodules/helpers.cpp
type sqm (line 4) | namespace sqm
function format_string (line 7) | SqModules::string format_string(const char *fmt, ...)
function append_format (line 32) | void append_format(SqModules::string &s, const char *fmt, ...)
FILE: sqmodules/helpers.h
function namespace (line 5) | namespace sqm
FILE: sqmodules/path.cpp
function dd_simplify_fname_c (line 18) | void dd_simplify_fname_c(char *s)
function dd_fname_equal (line 104) | bool dd_fname_equal(const char *fn1,const char *fn2)
function dd_append_slash_c (line 122) | void dd_append_slash_c(char *fn)
FILE: sqmodules/span.h
function namespace (line 8) | namespace sqm
FILE: sqmodules/sqmodules.cpp
function skip_bom (line 30) | static sqm::span<char> skip_bom(sqm::span<char> buf)
function SQInteger (line 40) | static SQInteger persist_state(HSQUIRRELVM vm)
function SQInteger (line 83) | static SQInteger keepref(HSQUIRRELVM vm)
function SQInteger (line 667) | SQInteger SqModules::sqRequire(HSQUIRRELVM vm) // arguments: fileName, m...
function SQInteger (line 794) | SQInteger SqModules::register_on_module_unload(HSQUIRRELVM vm)
FILE: sqmodules/sqmodules.h
function namespace (line 20) | namespace SQCompilation
type ISqModulesFileAccess (line 25) | struct ISqModulesFileAccess
function ISqModulesFileAccess (line 46) | struct DefSqModulesFileAccess : public ISqModulesFileAccess
FILE: sqrat/include/sqrat/sqratAllocator.h
function namespace (line 39) | namespace Sqrat {
function SQInteger (line 123) | static SQInteger iNew(HSQUIRRELVM vm) {
function SQInteger (line 128) | SQInteger iNew(HSQUIRRELVM vm) {
function SQInteger (line 175) | static SQInteger Copy(HSQUIRRELVM vm, SQInteger idx, const void* value) {
function SQInteger (line 191) | static SQInteger Copy(HSQUIRRELVM vm, SQInteger idx, const void* value) {
function SQInteger (line 216) | static SQInteger iNew(HSQUIRRELVM vm) {
function SQInteger (line 221) | SQInteger iNew(HSQUIRRELVM vm) {
function SQInteger (line 230) | static SQInteger Copy(HSQUIRRELVM vm, SQInteger idx, const void* value) {
FILE: sqrat/include/sqrat/sqratArray.h
function namespace (line 39) | namespace Sqrat {
function class (line 257) | class Array : public ArrayBase {
function ArrayBase (line 270) | Array(const Object& obj) : ArrayBase(obj) {
function Array (line 281) | struct Var<Array> {
type Var (line 319) | struct Var
function Array (line 325) | struct Var<const Array&> : Var<Array> {Var(HSQUIRRELVM vm, SQInteger idx...
FILE: sqrat/include/sqrat/sqratClass.h
function namespace (line 42) | namespace Sqrat
function Function (line 280) | Function GetFunction(const char* name) {
function SQInteger (line 323) | static SQInteger ClassWeakref(HSQUIRRELVM vm) {
function SQInteger (line 328) | static SQInteger ClassTypeof(HSQUIRRELVM vm) {
function SQInteger (line 333) | static SQInteger ClassCloned(HSQUIRRELVM vm) {
function InitClass (line 339) | void InitClass(ClassData<C>* cd) {
function BindAccessor (line 401) | inline void BindAccessor(const char* name, void* var, size_t varSize, SQ...
function SQInteger (line 592) | static SQInteger Format(HSQUIRRELVM vm) {
FILE: sqrat/include/sqrat/sqratClassType.h
function namespace (line 35) | namespace Sqrat
function TypeTag (line 65) | static TypeTag* get() { return &instance; }
function add (line 102) | struct SqratCleanup {
function SQInteger (line 119) | static SQInteger release(HSQUIRRELVM, SQUserPointer ptr, SQInteger) {
function SQUserPointer (line 161) | inline SQUserPointer CastToTarget(SQUserPointer ptr, TypeTagBase* actual...
function hasClassData (line 197) | static inline bool hasClassData(HSQUIRRELVM vm) {
function string (line 201) | static inline const string& ClassName() {
function string (line 205) | static inline const string& ClassName(HSQUIRRELVM vm) {
function COPYFUNC (line 211) | static inline COPYFUNC CopyFunc(HSQUIRRELVM vm) {
function IsObjectOfClass (line 218) | static bool IsObjectOfClass(const HSQOBJECT *obj) {
function SQInteger (line 235) | static SQInteger ReleaseOwned(HSQUIRRELVM vm, SQUserPointer ptr, SQInteg...
function SQInteger (line 246) | static SQInteger ReleaseBorrowed(HSQUIRRELVM vm, SQUserPointer ptr, SQIn...
function SQInteger (line 256) | static SQInteger DestructInline(HSQUIRRELVM, SQUserPointer ptr, SQIntege...
function PushNativeInstance (line 262) | static bool PushNativeInstance(HSQUIRRELVM vm, C* ptr) {
function PushInstanceCopy (line 298) | static bool PushInstanceCopy(HSQUIRRELVM vm, const C& value) {
function C (line 352) | static C* GetInstanceFromObj(const HSQOBJECT &o) {
function SetManagedInstance (line 376) | static void SetManagedInstance(HSQUIRRELVM vm, SQInteger idx, C* ptr) {
function C (line 390) | static C* AllocInstanceData(HSQUIRRELVM vm, SQInteger idx) {
function IsClassInstance (line 406) | static bool IsClassInstance(const HSQOBJECT &ho) {
function IsClassInstance (line 421) | static bool IsClassInstance(HSQUIRRELVM vm, SQInteger idx) {
function SQInteger (line 427) | static SQInteger ToString(HSQUIRRELVM vm) {
function setClassData (line 440) | static void setClassData(HSQUIRRELVM vm, ClassData<C>* cd) {
FILE: sqrat/include/sqrat/sqratConst.h
function namespace (line 37) | namespace Sqrat {
FILE: sqrat/include/sqrat/sqratFunction.h
function namespace (line 37) | namespace Sqrat {
function Release (line 163) | void Release() {
function ExecuteDynArgs (line 174) | bool ExecuteDynArgs(HSQOBJECT const* args, size_t args_count) const {
function IsEqual (line 272) | bool IsEqual(const Sqrat::Function &so) const {
function Function (line 327) | struct Var<Function> {
function push (line 372) | static void push(HSQUIRRELVM vm, const Function& value) {
function check_type (line 378) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) {
type Var (line 385) | struct Var
function Function (line 388) | struct Var<const Function&> : Var<Function> {Var(HSQUIRRELVM vm, SQInteg...
FILE: sqrat/include/sqrat/sqratGlobalMethods.h
function namespace (line 36) | namespace Sqrat {
function SQInteger (line 64) | SQInteger Func(HSQUIRRELVM vm)
FILE: sqrat/include/sqrat/sqratMemberMethods.h
function namespace (line 36) | namespace Sqrat {
function SQInteger (line 107) | SQInteger sqDefaultGet(HSQUIRRELVM vm) {
function SQInteger (line 125) | SQInteger sqStaticGet(HSQUIRRELVM vm) {
function SQInteger (line 136) | inline SQInteger sqVarGet(HSQUIRRELVM vm) {
function SQInteger (line 158) | SQInteger sqDefaultSet(HSQUIRRELVM vm) {
function SQInteger (line 180) | SQInteger sqStaticSet(HSQUIRRELVM vm) {
function SQInteger (line 195) | inline SQInteger sqVarSet(HSQUIRRELVM vm) {
FILE: sqrat/include/sqrat/sqratObject.h
function namespace (line 39) | namespace Sqrat {
function vm (line 90) | vm(v) {
function vm (line 108) | vm(v) {
function vm (line 120) | vm(v) {
function Object (line 278) | Object GetSlot(const Object& slot) const {
function Object (line 282) | Object RawGetSlot(const Object& slot) const {
function Object (line 407) | Object operator[](T slot) {
function Object (line 412) | Object operator[](T slot) const {
type iterator (line 420) | struct iterator
function FreezeSelf (line 423) | void FreezeSelf() {
function UnfreezeSelf (line 427) | void UnfreezeSelf() {
function Object (line 593) | struct Var<Object> {
type Var (line 616) | struct Var
function Object (line 619) | struct Var<const Object&> : Var<Object> {Var(HSQUIRRELVM vm, SQInteger i...
FILE: sqrat/include/sqrat/sqratScript.h
function namespace (line 39) | namespace Sqrat {
FILE: sqrat/include/sqrat/sqratTable.h
function namespace (line 39) | namespace Sqrat {
function HasKey (line 163) | bool HasKey(const char* name) const {
function RawHasKey (line 167) | bool RawHasKey(const char* name) const {
function HasKey (line 171) | bool HasKey(const Object &key) const {
function RawHasKey (line 182) | bool RawHasKey(const Object &key) const {
function Function (line 214) | Function GetFunction(const char* name) const {
function Function (line 218) | Function RawGetFunction(const char* name) const {
function Function (line 258) | Function GetFunction(const Object& key) const {
function Function (line 262) | Function RawGetFunction(const Object& key) const {
function DeleteSlot (line 278) | bool DeleteSlot(const char* name) const {
function RawDeleteSlot (line 282) | bool RawDeleteSlot(const char* name) const {
function DeleteSlot (line 298) | bool DeleteSlot(const Object &key) const {
function RawDeleteSlot (line 302) | bool RawDeleteSlot(const Object &key) const {
function Clear (line 310) | bool Clear() {
function class (line 328) | class Table : public TableBase {
function TableBase (line 341) | Table(const Object& obj) : TableBase(obj) {
function class (line 363) | class RegistryTable : public TableBase {
function Table (line 375) | struct Var<Table> {
type Var (line 408) | struct Var
function Table (line 411) | struct Var<const Table&> : Var<Table> {Var(HSQUIRRELVM vm, SQInteger idx...
FILE: sqrat/include/sqrat/sqratTypes.h
function namespace (line 37) | namespace Sqrat {
function check_type (line 223) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) {
function push (line 243) | static void push(HSQUIRRELVM vm, T* value) {
function check_type (line 252) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) {
function push (line 274) | static void push(HSQUIRRELVM vm, const SQRAT_STD::shared_ptr<T>& value) {
function explicit (line 290) | explicit Var(const HSQOBJECT &o) {
function push (line 297) | static void push(HSQUIRRELVM vm, T value) {
function check_type (line 304) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) { return sq_gettyp...
function check_type (line 305) | static bool check_type(const HSQOBJECT &o) { return o._type & SQOBJECT_N...
function explicit (line 328) | explicit Var(const HSQOBJECT &o) {
function push (line 333) | static void push(HSQUIRRELVM vm, T value) {
function check_type (line 337) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) {
function check_type (line 340) | static bool check_type(const HSQOBJECT &o) { return o._type == OT_INTEGE...
function bool (line 353) | struct Var<bool> {
function char (line 385) | struct Var<char*> {
function check_type (line 394) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) { return sq_gettyp...
function char (line 399) | struct Var<const char*> {
function check_type (line 457) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) { return sq_gettyp...
function char (line 461) | struct VarControlsValueLifeTime<const char*>
function string (line 468) | struct Var<string> {
function push (line 482) | static void push(HSQUIRRELVM vm, const string& value) {
function check_type (line 487) | static bool check_type(HSQUIRRELVM vm, SQInteger idx) { return sq_gettyp...
function string (line 492) | struct Var<const string&> : Var<string> {
function string_view (line 499) | struct Var<string_view>
function push (line 551) | static void push(HSQUIRRELVM vm, string_view sv)
function check_type (line 560) | static bool check_type(HSQUIRRELVM vm, SQInteger idx)
function string_view (line 567) | struct VarControlsValueLifeTime<string_view> // Var holds reference to V...
function PushVar (line 584) | SQRAT_MAKE_NONREFERENCABLE(string)
function PushVar (line 611) | void PushVar(HSQUIRRELVM vm, const T& value) {
function PushVarR (line 618) | void PushVarR(HSQUIRRELVM vm, T& value) {
FILE: sqrat/include/sqrat/sqratUtil.h
function eastl (line 102) | inline constexpr eastl::nullopt_t nullopt{eastl::nullopt};
type Fallback (line 395) | struct Fallback { void operator()();}
type Derived (line 396) | struct Derived
FILE: sqstdlib/sqstdaux.cpp
function print_simple_value (line 28) | static void print_simple_value(HSQUIRRELVM v, PrintFunc pf, SQObjectPtr ...
function collect_stack_string (line 68) | static void collect_stack_string(HSQUIRRELVM v, PrintFunc pf)
function sqstd_printcallstack (line 222) | void sqstd_printcallstack(HSQUIRRELVM v)
function SQRESULT (line 230) | SQRESULT sqstd_formatcallstackstring(HSQUIRRELVM v)
function SQInteger (line 273) | static SQInteger _sqstd_aux_printerror(HSQUIRRELVM v)
function _sqstd_compiler_message (line 291) | void _sqstd_compiler_message(HSQUIRRELVM v,SQMessageSeverity severity,co...
function sqstd_seterrorhandlers (line 302) | void sqstd_seterrorhandlers(HSQUIRRELVM v)
function SQRESULT (line 310) | SQRESULT sqstd_throwerrorf(HSQUIRRELVM v,const char *err,...)
FILE: sqstdlib/sqstdblob.cpp
function SQInteger (line 24) | static SQInteger _blob_resize(HSQUIRRELVM v)
function __swap_dword (line 34) | static void __swap_dword(unsigned int *n)
function __swap_word (line 42) | static void __swap_word(unsigned short *n)
function SQInteger (line 47) | static SQInteger _blob_swap4(HSQUIRRELVM v)
function SQInteger (line 58) | static SQInteger _blob_swap2(HSQUIRRELVM v)
function SQInteger (line 69) | static SQInteger _blob__set(HSQUIRRELVM v)
function SQInteger (line 82) | static SQInteger _blob__get(HSQUIRRELVM v)
function SQInteger (line 99) | static SQInteger _blob__nexti(HSQUIRRELVM v)
function SQInteger (line 118) | static SQInteger _blob__typeof(HSQUIRRELVM v)
function SQInteger (line 124) | static SQInteger _blob_releasehook(HSQUIRRELVM SQ_UNUSED_ARG(vm), SQUser...
function SQInteger (line 133) | static SQInteger _blob_constructor(HSQUIRRELVM v)
function SQInteger (line 154) | static SQInteger _blob__cloned(HSQUIRRELVM v)
function SQInteger (line 174) | static SQInteger _blob_as_string(HSQUIRRELVM v)
function SQInteger (line 199) | static SQInteger _g_blob_casti2f(HSQUIRRELVM v)
function SQInteger (line 207) | static SQInteger _g_blob_castf2i(HSQUIRRELVM v)
function SQInteger (line 217) | static SQInteger _g_blob_swap2(HSQUIRRELVM v)
function SQInteger (line 226) | static SQInteger _g_blob_swap4(HSQUIRRELVM v)
function SQInteger (line 236) | static SQInteger _g_blob_swapfloat(HSQUIRRELVM v)
function SQRESULT (line 254) | SQRESULT sqstd_getblob(HSQUIRRELVM v,SQInteger idx,SQUserPointer *ptr)
function SQInteger (line 263) | SQInteger sqstd_getblobsize(HSQUIRRELVM v,SQInteger idx)
function SQUserPointer (line 271) | SQUserPointer sqstd_createblob(HSQUIRRELVM v, SQInteger size)
function SQRESULT (line 291) | SQRESULT sqstd_register_bloblib(HSQUIRRELVM v)
FILE: sqstdlib/sqstdblobimpl.h
function SQStream (line 4) | struct SQBlob : public SQStream
function virtual (line 16) | virtual ~SQBlob() {
function SQInteger (line 20) | SQInteger Write(const void *buffer, SQInteger size) override {
function SQInteger (line 29) | SQInteger Read(void *buffer,SQInteger size) override {
function Resize (line 41) | bool Resize(SQInteger n) {
function GrowBufOf (line 63) | void GrowBufOf(SQInteger n)
function CanAdvance (line 74) | bool CanAdvance(SQInteger n) {
function SQInteger (line 79) | SQInteger Seek(SQInteger offset, SQInteger origin) override {
function IsValid (line 98) | bool IsValid() override {
function EOS (line 102) | bool EOS() override {
function SQInteger (line 106) | SQInteger Flush() override { return 0; }
function SQInteger (line 107) | SQInteger Tell() override { return _ptr; }
function SQInteger (line 108) | SQInteger Len() override { return _size; }
function SQUserPointer (line 109) | SQUserPointer GetBuf(){ return _buf; }
FILE: sqstdlib/sqstddatetime.cpp
function SQInteger (line 9) | static SQInteger _datetime_clock(HSQUIRRELVM v)
function SQInteger (line 15) | static SQInteger _datetime_time(HSQUIRRELVM v)
function _set_integer_slot (line 22) | static void _set_integer_slot(HSQUIRRELVM v,const char *name,SQInteger val)
function SQInteger (line 29) | static SQInteger _datetime_date(HSQUIRRELVM v)
function SQRESULT (line 73) | SQRESULT sqstd_register_datetimelib(HSQUIRRELVM v)
FILE: sqstdlib/sqstddebug.cpp
function SQInteger (line 18) | static SQInteger debug_seterrorhandler(HSQUIRRELVM v)
function SQInteger (line 24) | static SQInteger debug_setdebughook(HSQUIRRELVM v)
function SQInteger (line 32) | static SQInteger debug_getstackinfos(HSQUIRRELVM v)
function SQInteger (line 39) | static SQInteger debug_getlocals(HSQUIRRELVM v)
function SQInteger (line 70) | static SQInteger debug_get_stack_top(HSQUIRRELVM v)
function SQInteger (line 77) | static SQInteger debug_collectgarbage(HSQUIRRELVM v)
function SQInteger (line 82) | static SQInteger debug_resurrectunreachable(HSQUIRRELVM v)
function SQInteger (line 89) | static SQInteger debug_getbuildinfo(HSQUIRRELVM v)
function SQInteger (line 114) | static SQInteger debug_doc(HSQUIRRELVM v)
function nparamscheck_to_required_args (line 149) | static int nparamscheck_to_required_args(int nparamscheck)
function SQInteger (line 156) | static SQInteger debug_get_function_info_table(HSQUIRRELVM v)
function SQInteger (line 296) | static SQInteger debug_get_function_decl_string(HSQUIRRELVM v)
function SQInteger (line 382) | static SQInteger format_call_stack_string(HSQUIRRELVM v)
function SQInteger (line 389) | static SQInteger debug_type_mask_to_string(HSQUIRRELVM v)
function SQUnsignedInteger32 (line 403) | static SQUnsignedInteger32 sq_debug_time_msec()
function default_quirrel_watchdog_hook (line 409) | static bool default_quirrel_watchdog_hook(HSQUIRRELVM v, bool kick)
function SQInteger (line 431) | SQInteger debug_script_watchdog_kick(HSQUIRRELVM v)
function SQInteger (line 437) | SQInteger debug_set_script_watchdog_timeout_msec(HSQUIRRELVM v)
function SQRESULT (line 469) | SQRESULT sqstd_register_debuglib(HSQUIRRELVM v)
FILE: sqstdlib/sqstdhash.cpp
function SQInteger (line 15) | static SQInteger math_recursive_hash_impl(HSQUIRRELVM vm, HSQOBJECT &obj...
function SQInteger (line 94) | SQInteger sq_math_hash(HSQUIRRELVM v)
function SQInteger (line 105) | SQInteger sq_math_deep_hash(HSQUIRRELVM v)
FILE: sqstdlib/sqstdio.cpp
function SQFILE (line 11) | SQFILE sqstd_fopen(const char *filename ,const char *mode)
function SQInteger (line 16) | SQInteger sqstd_fread(void* buffer, SQInteger size, SQInteger count, SQF...
function SQInteger (line 22) | SQInteger sqstd_fwrite(const SQUserPointer buffer, SQInteger size, SQInt...
function SQInteger (line 27) | SQInteger sqstd_fseek(SQFILE file, SQInteger offset, SQInteger origin)
function SQInteger (line 39) | SQInteger sqstd_ftell(SQFILE file)
function SQInteger (line 44) | SQInteger sqstd_fflush(SQFILE file)
function SQInteger (line 49) | SQInteger sqstd_fclose(SQFILE file)
function SQInteger (line 54) | SQInteger sqstd_feof(SQFILE file)
type SQFile (line 60) | struct SQFile : public SQStream {
method SQFile (line 61) | SQFile(SQAllocContext alloc_ctx)
method SQFile (line 67) | SQFile(SQAllocContext alloc_ctx, SQFILE file, bool owns)
method Open (line 75) | bool Open(const char *filename ,const char *mode) {
method Close (line 84) | void Close() {
method SQInteger (line 92) | SQInteger Read(void *buffer,SQInteger size) override {
method SQInteger (line 96) | SQInteger Write(const void *buffer,SQInteger size) override {
method SQInteger (line 100) | SQInteger Flush() override {
method SQInteger (line 104) | SQInteger Tell() override {
method SQInteger (line 108) | SQInteger Len() override {
method SQInteger (line 116) | SQInteger Seek(SQInteger offset, SQInteger origin) override {
method IsValid (line 120) | bool IsValid() override { return _handle?true:false; }
method EOS (line 121) | bool EOS() override { return Tell()==Len()?true:false;}
method SQFILE (line 122) | SQFILE GetHandle() {return _handle;}
function SQInteger (line 132) | static SQInteger _file__typeof(HSQUIRRELVM v)
function SQInteger (line 138) | static SQInteger _file_releasehook(HSQUIRRELVM SQ_UNUSED_ARG(vm), SQUser...
function _file_is_valid_mode (line 147) | static bool _file_is_valid_mode(const char *mode)
function SQInteger (line 162) | static SQInteger _file_constructor(HSQUIRRELVM v)
function SQInteger (line 194) | static SQInteger _file_close(HSQUIRRELVM v)
function SQRESULT (line 218) | SQRESULT sqstd_createfile(HSQUIRRELVM v, SQFILE file,SQBool own)
function SQRESULT (line 244) | SQRESULT sqstd_getfile(HSQUIRRELVM v, SQInteger idx, SQFILE *file)
type IOBuffer (line 257) | struct IOBuffer {
function SQInteger (line 264) | SQInteger _read_byte(IOBuffer *iobuffer)
function SQInteger (line 284) | SQInteger _read_two_bytes(IOBuffer *iobuffer)
function SQInteger (line 306) | SQInteger file_read(SQUserPointer file,SQUserPointer buf,SQInteger size)
function SQInteger (line 313) | SQInteger file_write(SQUserPointer file,SQUserPointer p,SQInteger size)
function SQRESULT (line 329) | SQRESULT sqstd_loadfile(HSQUIRRELVM v,const char *filename,SQBool printe...
function SQRESULT (line 348) | SQRESULT sqstd_dofile(HSQUIRRELVM v,const char *filename,SQBool retval,S...
function SQRESULT (line 365) | SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v,const char *filename)
function SQRESULT (line 381) | SQRESULT sqstd_register_iolib(HSQUIRRELVM v)
FILE: sqstdlib/sqstdmath.cpp
function math_randomize_seed (line 31) | static void math_randomize_seed(HSQUIRRELVM v) {
function SQInteger (line 37) | static SQInteger math_srand(HSQUIRRELVM v)
function SQInteger (line 50) | static SQInteger math_rand(HSQUIRRELVM v)
function SQInteger (line 57) | static SQInteger math_abs(HSQUIRRELVM v)
function SQInteger (line 68) | static SQInteger math_acos(HSQUIRRELVM v) {
function SQInteger (line 79) | static SQInteger math_asin(HSQUIRRELVM v) {
function SQInteger (line 106) | static SQInteger math_min_max(HSQUIRRELVM v)
function SQInteger (line 132) | static SQInteger math_min(HSQUIRRELVM v)
function SQInteger (line 137) | static SQInteger math_max(HSQUIRRELVM v)
function SQInteger (line 142) | static SQInteger math_clamp(HSQUIRRELVM v)
function SQRESULT (line 211) | SQRESULT sqstd_register_mathlib(HSQUIRRELVM v)
FILE: sqstdlib/sqstdrex.cpp
type tagSQRexNode (line 53) | struct tagSQRexNode{
type SQRex (line 60) | struct SQRex{
function SQInteger (line 79) | static SQInteger sqstd_rex_newnode(SQRex *exp, SQRexNodeType type)
function sqstd_rex_error (line 96) | static void sqstd_rex_error(SQRex *exp,const char *error)
function sqstd_rex_expect (line 102) | static void sqstd_rex_expect(SQRex *exp, SQInteger n){
function sqstd_rex_escapechar (line 108) | static char sqstd_rex_escapechar(SQRex *exp)
function SQInteger (line 125) | static SQInteger sqstd_rex_charclass(SQRex *exp,SQInteger classid)
function SQInteger (line 132) | static SQInteger sqstd_rex_charnode(SQRex *exp,SQBool isclass)
function SQInteger (line 189) | static SQInteger sqstd_rex_class(SQRex *exp)
function SQInteger (line 238) | static SQInteger sqstd_rex_parsenumber(SQRex *exp)
function SQInteger (line 251) | static SQInteger sqstd_rex_element(SQRex *exp)
function SQInteger (line 350) | static SQInteger sqstd_rex_list(SQRex *exp)
function SQBool (line 375) | static SQBool sqstd_rex_matchcclass(SQInteger cclass,char c)
function SQBool (line 398) | static SQBool sqstd_rex_matchclass(SQRex* exp,SQRexNode *node,char c)
function SQRex (line 588) | SQRex *sqstd_rex_compile(SQAllocContext alloc_ctx, const char *pattern,c...
function sqstd_rex_free (line 636) | void sqstd_rex_free(SQRex *exp)
function SQBool (line 646) | SQBool sqstd_rex_match(SQRex* exp,const char* text)
function SQBool (line 658) | SQBool sqstd_rex_searchrange(SQRex* exp,const char* text_begin,const cha...
function SQBool (line 688) | SQBool sqstd_rex_search(SQRex* exp,const char* text, const char** out_be...
function SQInteger (line 693) | SQInteger sqstd_rex_getsubexpcount(SQRex* exp)
function SQBool (line 698) | SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *subexp)
FILE: sqstdlib/sqstdserialization.cpp
type SQStreamSerializer (line 27) | struct SQStreamSerializer {
type DataType (line 28) | enum DataType {
type ClassDesc (line 45) | struct ClassDesc {
method SQStreamSerializer (line 64) | SQStreamSerializer() : vm(nullptr), stream(nullptr), errorString(nullp...
method getCountOfParams (line 67) | int getCountOfParams(SQObjectPtr obj) {
method fillAvailableClassNamesOnDemand (line 76) | bool fillAvailableClassNamesOnDemand() {
method serializeObject (line 111) | bool serializeObject(const SQObject &obj) {
method SQRESULT (line 432) | SQRESULT serialize(HSQUIRRELVM vm_, SQStream *dest_, SQObjectPtr obj, ...
method unexpectedEndOfData (line 456) | bool unexpectedEndOfData()
method deserializeObject (line 462) | bool deserializeObject()
method isClassConstructorValid (line 822) | bool isClassConstructorValid(SQObjectPtr &constructor)
method SQRESULT (line 855) | SQRESULT deserialize(HSQUIRRELVM vm_, SQStream *src_, SQObjectPtr avai...
function SQRESULT (line 888) | SQRESULT sqstd_serialize_object_to_stream(HSQUIRRELVM vm, SQStream *dest...
function SQRESULT (line 893) | SQRESULT sqstd_deserialize_object_from_stream(HSQUIRRELVM vm, SQStream *...
FILE: sqstdlib/sqstdstream.cpp
function SQInteger (line 22) | SQInteger _stream_readblob(HSQUIRRELVM v)
function SQInteger (line 43) | SQInteger _stream_readn(HSQUIRRELVM v)
function SQInteger (line 103) | SQInteger _stream_writeblob(HSQUIRRELVM v)
function SQInteger (line 117) | SQInteger _stream_writestring(HSQUIRRELVM v)
function SQInteger (line 132) | SQInteger _stream_writen(HSQUIRRELVM v)
function SQInteger (line 201) | SQInteger _stream_seek(HSQUIRRELVM v)
function SQInteger (line 220) | SQInteger _stream_tell(HSQUIRRELVM v)
function SQInteger (line 227) | SQInteger _stream_len(HSQUIRRELVM v)
function SQInteger (line 234) | SQInteger _stream_flush(HSQUIRRELVM v)
function SQInteger (line 244) | SQInteger _stream_eos(HSQUIRRELVM v)
function SQInteger (line 255) | SQInteger _stream_writeobject(HSQUIRRELVM v)
function SQInteger (line 267) | SQInteger _stream_readobject(HSQUIRRELVM v)
function SQInteger (line 278) | SQInteger _stream__cloned(HSQUIRRELVM v)
function SQRESULT (line 300) | SQRESULT sqstd_init_streamclass(HSQUIRRELVM v)
function SQRESULT (line 327) | SQRESULT declare_stream(HSQUIRRELVM v,const char* name,SQUserPointer typ...
FILE: sqstdlib/sqstdstring.cpp
function SQBool (line 18) | static SQBool isfmtchr(char ch)
function SQInteger (line 26) | static SQInteger validate_format(HSQUIRRELVM v, char *fmt, const char *s...
function SQRESULT (line 71) | SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger...
function sqstd_pushstringf (line 166) | void sqstd_pushstringf(HSQUIRRELVM v,const char *s,...)
function SQInteger (line 185) | static SQInteger _string_printf(HSQUIRRELVM v)
function SQInteger (line 198) | static SQInteger _string_format(HSQUIRRELVM v)
function SQInteger (line 226) | static SQInteger _rexobj_releasehook(HSQUIRRELVM SQ_UNUSED_ARG(vm), SQUs...
function SQInteger (line 233) | static SQInteger _regexp_match(HSQUIRRELVM v)
function _addrexmatch (line 247) | static void _addrexmatch(HSQUIRRELVM v,const char *str,const char *begin...
function SQInteger (line 258) | static SQInteger _regexp_search(HSQUIRRELVM v)
function SQInteger (line 272) | static SQInteger _regexp_capture(HSQUIRRELVM v)
function SQInteger (line 296) | static SQInteger _regexp_subexpcount(HSQUIRRELVM v)
function SQInteger (line 303) | static SQInteger _regexp_constructor(HSQUIRRELVM v)
function SQInteger (line 321) | static SQInteger _regexp__typeof(HSQUIRRELVM v)
function SQRESULT (line 352) | SQRESULT sqstd_register_stringlib(HSQUIRRELVM v)
FILE: sqstdlib/sqstdsystem.cpp
function SQInteger (line 9) | static SQInteger _system_getenv(HSQUIRRELVM v)
function SQInteger (line 19) | static SQInteger _system_system(HSQUIRRELVM v)
function SQInteger (line 29) | static SQInteger _system_setenv(HSQUIRRELVM v)
function SQInteger (line 44) | static SQInteger _system_remove(HSQUIRRELVM v)
function SQInteger (line 53) | static SQInteger _system_rename(HSQUIRRELVM v)
function SQRESULT (line 75) | SQRESULT sqstd_register_command_line_args(HSQUIRRELVM v, int argc, char ...
function SQRESULT (line 92) | SQRESULT sqstd_register_systemlib(HSQUIRRELVM v)
FILE: squirrel/ast_tools/ast_indent_render.h
function namespace (line 7) | namespace SQCompilation {
FILE: squirrel/compiler/arena.h
function class (line 16) | class Arena {
type Chunk (line 78) | struct Chunk
type Chunk (line 90) | struct Chunk
function class (line 97) | class ArenaObj {
function T (line 143) | inline T &push_back(const T& val)
function pop_back (line 149) | inline void pop_back()
function T (line 159) | inline T& operator[](size_type pos) const { return _vals[pos]; }
function insert (line 161) | void insert(size_type pos, T v) {
type T (line 169) | typedef T* iterator;
type T (line 170) | typedef const T* const_iterator;
function iterator (line 172) | iterator begin() { return _vals; }
function iterator (line 174) | iterator end() { return _vals + _size; }
function reserve (line 177) | void reserve(size_type newSize) {
type size_type (line 215) | typedef size_t size_type;
type T (line 216) | typedef T* pointer;
type T (line 217) | typedef const T* const_pointer;
type T (line 218) | typedef T value_type;
function pointer (line 220) | pointer allocate(const size_type n)
function pointer (line 225) | pointer allocate(const size_type n, const void *hint)
function deallocate (line 230) | void deallocate(const_pointer p, const size_type n) {}
function _arena (line 239) | _arena(arena) { assert(arena); }
FILE: squirrel/compiler/ast.cpp
type SQCompilation (line 3) | namespace SQCompilation {
function FunctionExpr (line 414) | FunctionExpr *ClassExpr::findConstructor() const {
type TreeOp (line 590) | enum TreeOp
FILE: squirrel/compiler/ast.h
type TreeOp (line 102) | enum TreeOp {
function namespace (line 109) | namespace SQCompilation {
function isEmpty (line 178) | struct DocObject {
function setTypeMask (line 206) | void setTypeMask(unsigned m) { _typeMask = m; }
function setTypeInferred (line 208) | void setTypeInferred() { _typeInferred = true; }
function AccessExpr (line 211) | AccessExpr *asAccessExpr() const { assert(isAccessExpr()); return (Acces...
function LiteralExpr (line 212) | LiteralExpr *asLiteral() const { assert(op() == TO_LITERAL); return (Lit...
function BinExpr (line 213) | BinExpr *asBinExpr() const { assert(TO_NULLC <= op() && op() <= TO_MODEQ...
function CallExpr (line 214) | CallExpr *asCallExpr() const { assert(op() == TO_CALL); return (CallExpr...
function ExternalValueExpr (line 215) | ExternalValueExpr *asExternal() const { assert(op() == TO_EXTERNAL_VALUE...
function TableExpr (line 216) | TableExpr *asTableExpr() const { assert(op() == TO_TABLE || op() == TO_C...
function ClassExpr (line 217) | ClassExpr *asClassExpr() const { assert(op() == TO_CLASS); return (Class...
function FunctionExpr (line 218) | FunctionExpr *asFunctionExpr() const { assert(op() == TO_FUNCTION); retu...
function class (line 222) | class Id : public Expr {
function class (line 235) | class UnExpr : public Expr {
function class (line 249) | class BinExpr : public Expr {
function class (line 265) | class TerExpr : public Expr {
function class (line 285) | class AccessExpr : public Expr {
function Expr (line 295) | Expr *receiver() const { return _receiver; }
function class (line 302) | class FieldAccessExpr : public AccessExpr {
function class (line 317) | class GetFieldExpr : public FieldAccessExpr {
function class (line 332) | class SetFieldExpr : public FieldAccessExpr {
function class (line 349) | class SlotAccessExpr : public AccessExpr {
function class (line 360) | class GetSlotExpr : public SlotAccessExpr {
function class (line 369) | class SetSlotExpr : public SlotAccessExpr {
function class (line 383) | class BaseExpr : public Expr {
function class (line 391) | class RootTableAccessExpr : public Expr {
type LiteralKind (line 399) | enum LiteralKind {
function class (line 407) | class LiteralExpr : public Expr {
function visitChildren (line 415) | void visitChildren(Visitor *visitor) {}
function transformChildren (line 416) | void transformChildren(Transformer *transformer) {}
type LiteralKind (line 418) | enum LiteralKind
type LiteralKind (line 428) | enum LiteralKind
function class (line 440) | class ExternalValueExpr : public Expr {
type IncForm (line 455) | enum IncForm {
function class (line 460) | class IncExpr : public Expr {
function class (line 484) | class CallExpr : public Expr {
function class (line 512) | class ArrayExpr : public Expr {
function class (line 530) | class CommaExpr : public Expr {
function class (line 552) | class Statement : public Node {
function class (line 560) | class DirectiveStmt : public Statement {
function class (line 572) | class ImportStmt : public Statement {
function class (line 595) | class Decl : public Statement {
function class (line 607) | class ValueDecl : public Decl {
function class (line 625) | class ParamDecl : public ValueDecl {
function Expr (line 637) | Expr *defaultValue() const { return expression(); }
function setVararg (line 639) | void setVararg() { _isVararg = true; }
function setDestructuring (line 642) | void setDestructuring(DestructuringDecl *destructuring) { _destructuring...
function DestructuringDecl (line 643) | DestructuringDecl *getDestructuring() const { return _destructuring; }
function class (line 646) | class VarDecl : public ValueDecl {
function Id (line 658) | Id *nameId() const { return _nameId; }
function unsigned (line 668) | enum TableMemberFlags : unsigned {
function class (line 684) | class TableExpr : public Expr {
function class (line 708) | class ClassExpr : public TableExpr {
function class (line 733) | class FunctionExpr : public Expr {
function setVararg (line 757) | void setVararg(bool v) { _vararg = v; }
function setName (line 763) | void setName(const char *newName) { _name = newName; }
function Id (line 765) | Id *nameId() const { return _nameId; }
function Block (line 767) | Block *body() const { return _body; }
function setSourceName (line 769) | void setSourceName(const char *sn) { _sourcename = sn; }
function setLambda (line 773) | void setLambda(bool v) { _lambda = v; }
function setPure (line 775) | void setPure(bool v) { _pure = v; }
function setNodiscard (line 778) | void setNodiscard(bool v) { _nodiscard = v; }
function hoistBy (line 782) | void hoistBy(int level) { _hoistingLevel += level; }
function setResultTypeMask (line 785) | void setResultTypeMask(unsigned resultTypeMask) { _resultTypeMask = resu...
type EnumConst (line 804) | struct EnumConst {
function class (line 809) | class EnumDecl : public Decl {
function class (line 832) | class ConstDecl : public Decl {
function class (line 850) | class DeclGroup : public Decl {
type DestructuringType (line 875) | enum DestructuringType {
function class (line 880) | class DestructuringDecl : public DeclGroup {
function class (line 902) | class Block : public Statement {
function class (line 932) | class RootBlock : public Block {
function class (line 937) | class CodeBlockExpr : public Expr {
function class (line 950) | class IfStatement : public Statement {
function class (line 969) | class LoopStatement : public Statement {
function class (line 988) | class WhileStatement : public LoopStatement {
function class (line 1002) | class DoWhileStatement : public LoopStatement {
function class (line 1016) | class ForStatement : public LoopStatement {
function class (line 1035) | class ForeachStatement : public LoopStatement {
type SwitchCase (line 1053) | struct SwitchCase {
function class (line 1058) | class SwitchStatement : public Statement {
function addDefault (line 1066) | void addDefault(Statement *stmt) {
function Expr (line 1074) | Expr *expression() const { return _expr; }
function class (line 1086) | class TryStatement : public Statement {
function class (line 1104) | class TerminateStatement : public Statement {
function class (line 1132) | class YieldStatement : public TerminateStatement {
function class (line 1137) | class ThrowStatement : public TerminateStatement {
function class (line 1142) | class JumpStatement : public Statement {
function class (line 1158) | class ContinueStatement : public JumpStatement {
function class (line 1166) | class ExprStatement : public Statement {
function class (line 1179) | class EmptyStatement : public Statement {
type TreeOp (line 1187) | enum TreeOp
function class (line 1189) | class Visitor {
function class (line 1252) | class Transformer {
FILE: squirrel/compiler/codegen.cpp
type SQCompilation (line 72) | namespace SQCompilation {
type DiagnosticsId (line 105) | enum DiagnosticsId
function compareLiterals (line 161) | static bool compareLiterals(LiteralExpr *a, LiteralExpr *b) {
class CaptureScanVisitor (line 461) | class CaptureScanVisitor : public Visitor {
method visitId (line 469) | virtual void visitId(Id *id) override {
method visitFunctionExpr (line 479) | virtual void visitFunctionExpr(FunctionExpr *f) override {
function scanCaptureForNames (line 488) | static bool scanCaptureForNames(Statement *body, const char *name0, co...
function Expr (line 840) | Expr *CodeGenVisitor::skipConstFreezePure(Expr *expr) {
class GuaranteedPurityCheckVisitor (line 854) | class GuaranteedPurityCheckVisitor : public Visitor {
method GuaranteedPurityCheckVisitor (line 859) | GuaranteedPurityCheckVisitor(SQVM *vm, SQFuncState *fs) : pure(true)...
method visitNode (line 861) | virtual void visitNode(Node *node) override {
function SQInteger (line 918) | SQInteger CodeGenVisitor::inferReceiverType(Expr *receiver) {
function SQObjectPtr (line 1470) | SQObjectPtr CodeGenVisitor::compileFunc(FunctionExpr *funcDecl, bool i...
function SQObjectPtr (line 1591) | SQObjectPtr CodeGenVisitor::compileConstFunc(FunctionExpr *funcDecl)
function SQTable (line 1621) | SQTable* CodeGenVisitor::GetScopedConstsTable()
function SQObjectPtr (line 1630) | SQObjectPtr CodeGenVisitor::convertLiteral(LiteralExpr *lit) {
function isCalleeAnObject (line 1701) | static bool isCalleeAnObject(const Expr *expr) {
function isCalleeAnOuter (line 1709) | static bool isCalleeAnOuter(SQFuncState *_fs, const Expr *expr, SQInte...
function SQObjectPtr (line 2198) | SQObjectPtr CodeGenVisitor::GetTypeMethod(SQInteger sq_type, const cha...
function is_literal_in_int_range (line 2343) | static inline bool is_literal_in_int_range(const Expr *expr)
FILE: squirrel/compiler/codegen.h
type SQFuncState (line 7) | struct SQFuncState
function namespace (line 9) | namespace SQCompilation {
FILE: squirrel/compiler/compilationcontext.cpp
type SQCompilation (line 10) | namespace SQCompilation {
type DiagnosticSubsystem (line 13) | enum DiagnosticSubsystem {
type DiagnosticDescriptor (line 20) | struct DiagnosticDescriptor {
type DiagnosticSeverity (line 22) | enum DiagnosticSeverity
type DiagnosticSubsystem (line 23) | enum DiagnosticSubsystem
type DiagnosticsId (line 157) | enum DiagnosticsId
function drawUnderliner (line 199) | static void drawUnderliner(int32_t column, int32_t width, std::string &msg)
type DiagnosticsId (line 226) | enum DiagnosticsId
type DiagnosticsId (line 233) | enum DiagnosticsId
type DiagnosticsId (line 251) | enum DiagnosticsId
type DiagnosticsId (line 341) | enum DiagnosticsId
FILE: squirrel/compiler/compilationcontext.h
function namespace (line 196) | namespace SQCompilation {
FILE: squirrel/compiler/compiler.cpp
type SQCompilation (line 26) | namespace SQCompilation {
function RootBlock (line 28) | static RootBlock *parseASTImpl(Arena *astArena, SQVM *vm, const char *...
function SqASTData (line 43) | SqASTData *ParseToAST(SQVM *vm, const char *sourceText, size_t sourceT...
function Compile (line 60) | bool Compile(SQVM *vm, const char *sourceText, size_t sourceTextSize, ...
function TranslateASTToBytecodeImpl (line 76) | static bool TranslateASTToBytecodeImpl(SQVM *vm, RootBlock *ast, const...
function TranslateASTToBytecode (line 85) | bool TranslateASTToBytecode(SQVM *vm, SqASTData *astData, const HSQOBJ...
function AnalyzeCode (line 90) | void AnalyzeCode(SQVM *vm, SqASTData *astData, const HSQOBJECT *bindin...
function AstGetImports (line 101) | bool AstGetImports(HSQUIRRELVM v, SQCompilation::SqASTData *astData, S...
function AstFreeImports (line 153) | void AstFreeImports(HSQUIRRELVM v, SQInteger num, SQModuleImport *impo...
FILE: squirrel/compiler/compiler.h
type SQVM (line 4) | struct SQVM
function namespace (line 8) | namespace SQCompilation
FILE: squirrel/compiler/constgen.cpp
type SQCompilation (line 16) | namespace SQCompilation {
function SQObjectPtr (line 45) | SQObjectPtr ConstGenVisitor::convertLiteral(LiteralExpr *lit)
FILE: squirrel/compiler/constgen.h
type SQFuncState (line 8) | struct SQFuncState
function namespace (line 10) | namespace SQCompilation {
FILE: squirrel/compiler/lexer.cpp
type CommentKind (line 124) | enum CommentKind
type CommentKind (line 139) | enum CommentKind
function SQInteger (line 175) | SQInteger SQLexer::Lex()
function SQInteger (line 186) | SQInteger SQLexer::LexSingleToken()
function SQInteger (line 403) | SQInteger SQLexer::GetIDType(const char *s,SQInteger len)
function SQInteger (line 412) | SQInteger SQLexer::AddUTF8(SQUnsignedInteger ch)
function SQInteger (line 439) | SQInteger SQLexer::ProcessStringHexEscape(char *dest, SQInteger maxdigits)
function SQInteger (line 454) | SQInteger SQLexer::ReadString(SQInteger ndelim,bool verbatim, bool advance)
function LexHexadecimal (line 569) | static void LexHexadecimal(const char *s,SQUnsignedInteger *res)
function LexInteger (line 583) | static bool LexInteger(const char *s, SQUnsignedInteger *res)
function SQInteger (line 598) | static SQInteger isexponent(SQInteger c) { return c == 'e' || c=='E'; }
function SQInteger (line 603) | SQInteger SQLexer::ReadNumber()
function SQInteger (line 719) | SQInteger SQLexer::ReadID()
function SQInteger (line 735) | SQInteger SQLexer::ReadDirective()
FILE: squirrel/compiler/lexer.h
type SQLexerState (line 8) | enum SQLexerState {
type SQTokenFlags (line 13) | enum SQTokenFlags {
type SQLexer (line 18) | struct SQLexer
type SQCompilation (line 43) | enum SQCompilation
type SQLexerState (line 82) | enum SQLexerState
FILE: squirrel/compiler/optimizations/closureHoisting.cpp
type SQCompilation (line 23) | namespace SQCompilation {
type CaptureInfo (line 48) | struct CaptureInfo {
class CaptureAnalyzer (line 58) | class CaptureAnalyzer : public Visitor {
method isLocal (line 69) | bool isLocal(const char *name) {
method canHoist (line 78) | bool canHoist() const { return !info.capturesImmediateParent; }
method CaptureAnalyzer (line 81) | CaptureAnalyzer(CaptureInfo &i, ScopeContext *fs, const char *sn,
method visitNode (line 86) | void visitNode(Node *node) override {
method visitId (line 91) | void visitId(Id *id) override {
method visitFunctionExpr (line 128) | void visitFunctionExpr(FunctionExpr *f) override {
function hasTypedDefaults (line 232) | static bool hasTypedDefaults(FunctionExpr *f) {
function Node (line 437) | Node *ClosureHoistingOpt::OriginalClosureReplacer::transformFunctionEx...
FILE: squirrel/compiler/optimizations/closureHoisting.h
function namespace (line 7) | namespace SQCompilation {
function isInImmediateParent (line 84) | bool isInImmediateParent(const char *name) const {
function isIndirectLocalAtDepth (line 91) | bool isIndirectLocalAtDepth(const char *name, int targetDepth) const {
function enforceLocalsLimit (line 120) | void enforceLocalsLimit() {
type ArenaUnorderedMap (line 131) | typedef ArenaUnorderedMap<FunctionExpr *, const
function class (line 133) | class ClosureHoistingOpt {
FILE: squirrel/compiler/optimizer.h
type SQOptimizer (line 8) | struct SQOptimizer
type Jump (line 24) | struct Jump {
FILE: squirrel/compiler/parser.cpp
type SQCompilation (line 13) | namespace SQCompilation {
type NestingChecker (line 15) | struct NestingChecker {
method NestingChecker (line 19) | NestingChecker(SQParser *p) : _p(p), _depth(0), _max_depth(500) {
method inc (line 27) | void inc() {
type DiagnosticsId (line 58) | enum DiagnosticsId
type SQPragmaDescriptor (line 86) | struct SQPragmaDescriptor {
function Statement (line 112) | Statement* SQParser::parseDirectiveStatement()
function Expr (line 183) | Expr* SQParser::Expect(SQInteger tok)
function RootBlock (line 247) | RootBlock* SQParser::parse()
function Block (line 266) | Block* SQParser::parseStatements(SourceLoc start)
function Statement (line 292) | Statement* SQParser::parseStatement(bool closeframe)
function Expr (line 424) | Expr* SQParser::parseCommaExpr(SQExpressionContext expression_context)
function Expr (line 443) | Expr* SQParser::Expression(SQExpressionContext expression_context)
function Expr (line 520) | Expr* SQParser::BIN_EXP(T f, enum TreeOp top, Expr *lhs)
function Expr (line 541) | Expr* SQParser::LogicalNullCoalesceExp()
function Expr (line 558) | Expr* SQParser::LogicalOrExp()
function Expr (line 574) | Expr* SQParser::LogicalAndExp()
function Expr (line 593) | Expr* SQParser::BitwiseOrExp()
function Expr (line 606) | Expr* SQParser::BitwiseXorExp()
function Expr (line 619) | Expr* SQParser::BitwiseAndExp()
function Expr (line 632) | Expr* SQParser::EqExp()
function Expr (line 647) | Expr* SQParser::CompExp()
function Expr (line 675) | Expr* SQParser::ShiftExp()
function Expr (line 700) | Expr* SQParser::PlusExp()
function Expr (line 715) | Expr* SQParser::MultExp()
function Expr (line 754) | Expr* SQParser::PrefixedExpr()
function appendStringData (line 849) | static void appendStringData(sqvector<char> &dst, const char *b) {
function Expr (line 855) | Expr *SQParser::parseStringTemplate() {
function Expr (line 935) | Expr* SQParser::Factor(SQInteger &pos)
function Decl (line 1271) | Decl *SQParser::parseLocalFunctionExprStmt(bool assignable, SourceLoc ...
function Decl (line 1288) | Decl *SQParser::parseLocalClassExprStmt(bool assignable, SourceLoc key...
function Decl (line 1301) | Decl* SQParser::parseLocalDeclStatement(bool onlySingleVariable)
function Statement (line 1408) | Statement* SQParser::IfLikeBlock(bool &wrapped)
function Statement (line 1436) | Statement * SQParser::parseIfStatement()
function WhileStatement (line 1514) | WhileStatement* SQParser::parseWhileStatement()
function DoWhileStatement (line 1544) | DoWhileStatement* SQParser::parseDoWhileStatement()
function ForStatement (line 1566) | ForStatement* SQParser::parseForStatement()
function ForeachStatement (line 1647) | ForeachStatement* SQParser::parseForEachStatement()
function SwitchStatement (line 1731) | SwitchStatement* SQParser::parseSwitchStatement()
function LiteralExpr (line 1776) | LiteralExpr* SQParser::ExpectScalar()
function ConstDecl (line 1824) | ConstDecl* SQParser::parseConstFunctionExprStmt(bool global, SourceLoc...
function ConstDecl (line 1844) | ConstDecl* SQParser::parseConstStatement(bool global, SourceLoc global...
function EnumDecl (line 1866) | EnumDecl* SQParser::parseEnumStatement(bool global, SourceLoc globalSt...
function TryStatement (line 1910) | TryStatement* SQParser::parseTryCatchStatement()
function Id (line 1934) | Id* SQParser::generateSurrogateFunctionName()
function FunctionExpr (line 1985) | FunctionExpr* SQParser::FunctionExp(bool lambda)
function ClassExpr (line 2002) | ClassExpr* SQParser::ClassExp(SourceLoc classStart, Expr *key)
function Expr (line 2025) | Expr* SQParser::DeleteExpr()
function Expr (line 2035) | Expr* SQParser::PrefixIncDec(SQInteger token)
function can_be_type_name (line 2046) | static bool can_be_type_name(int token)
function FunctionExpr (line 2103) | FunctionExpr* SQParser::CreateFunction(SourceLoc start, Id *name, bool...
function ImportStmt (line 2215) | ImportStmt* SQParser::parseImportStatement()
FILE: squirrel/compiler/parser.h
function namespace (line 12) | namespace SQCompilation {
FILE: squirrel/compiler/sourceloc.h
function namespace (line 8) | namespace SQCompilation {
function isValid (line 26) | struct SourceSpan {
FILE: squirrel/compiler/sqdump.cpp
function streamprintf (line 26) | static void streamprintf(OutputStream *stream, const char *fmt, ...) {
function DumpLiteral (line 35) | static void DumpLiteral(OutputStream *stream, const SQObjectPtr &o)
function GetUInt64FromPtr (line 78) | static uint64_t GetUInt64FromPtr(const void *ptr)
function DumpInstructions (line 86) | void DumpInstructions(OutputStream *stream, SQLineInfosHeader *lineinfos...
function DumpLiterals (line 681) | static void DumpLiterals(OutputStream *stream, const SQObjectPtr *_liter...
function DumpStaticMemos (line 691) | static void DumpStaticMemos(OutputStream *stream, const SQObjectPtr *_st...
function DumpLocals (line 701) | static void DumpLocals(OutputStream *stream, const SQLocalVarInfo *_loca...
function DumpLineInfo (line 710) | static void DumpLineInfo(OutputStream *stream, const SQLineInfosHeader *...
function Dump (line 732) | void Dump(OutputStream *stream, SQFunctionProto *func, bool deep, int in...
function Dump (line 772) | void Dump(SQFunctionProto *func, int instruction_index) {
FILE: squirrel/compiler/sqfuncstate.cpp
function streamprintf (line 18) | static void streamprintf(OutputStream *stream, const char *fmt, ...) {
function DumpLiteral (line 27) | static void DumpLiteral(OutputStream *stream, const SQObjectPtr &o)
function ResetStaticMemos (line 113) | void ResetStaticMemos(SQFunctionProto *func, SQSharedState *ss)
function SQInteger (line 148) | SQInteger SQFuncState::GetNumericConstant(const SQInteger cons)
function SQInteger (line 153) | SQInteger SQFuncState::GetNumericConstant(const SQFloat cons)
function SQInteger (line 158) | SQInteger SQFuncState::GetConstant(const SQObjectPtr &cons, int max_cons...
function SQInteger (line 198) | SQInteger SQFuncState::AllocStackPos()
function SQInteger (line 211) | SQInteger SQFuncState::PushTarget(SQInteger n)
function SQInteger (line 222) | SQInteger SQFuncState::GetUpTarget(SQInteger n){
function SQInteger (line 226) | SQInteger SQFuncState::TopTarget(){
function SQInteger (line 229) | SQInteger SQFuncState::PopTarget()
function SQInteger (line 242) | SQInteger SQFuncState::GetStackSize()
function SQInteger (line 247) | SQInteger SQFuncState::CountOuters(SQInteger stacksize)
function SQInteger (line 287) | SQInteger SQFuncState::PushLocalVariable(const SQObject &name, const SQC...
function SQInteger (line 303) | SQInteger SQFuncState::GetLocalVariable(const SQObject &name, SQCompilet...
function SQInteger (line 325) | SQInteger SQFuncState::GetOuterVariable(const SQObject &name, SQCompilet...
function SQObjectPtr (line 587) | SQObjectPtr SQFuncState::CreateString(const char *s,SQInteger len)
function SQFunctionProto (line 607) | SQFunctionProto *SQFuncState::BuildProto()
function SQFuncState (line 683) | SQFuncState *SQFuncState::PushChildState(SQSharedState *ss)
FILE: squirrel/compiler/sqfuncstate.h
function namespace (line 8) | namespace SQCompilation { class Expr; }
type SQCompiletimeVarInfo (line 12) | struct SQCompiletimeVarInfo
type SQFuncState (line 24) | struct SQFuncState
function PopInstructions (line 36) | void PopInstructions(SQInteger size){for(SQInteger i=0;i<size;i++)_instr...
function SnoozeOpt (line 39) | void SnoozeOpt(){_optimization=false;}
function RestoreOpt (line 40) | void RestoreOpt(){_optimization=true;}
function AddDefaultParam (line 41) | void AddDefaultParam(SQInteger trg) { _defaultparams.push_back(trg); }
function SQInteger (line 42) | SQInteger GetDefaultParamCount() { return _defaultparams.size(); }
function SQInteger (line 43) | SQInteger GetCurrentPos(){return _instructions.size()-1;}
FILE: squirrel/compiler/sqtypeparser.cpp
type SQRawTypeDecl (line 5) | struct SQRawTypeDecl
function is_str_equal_ignore_case (line 39) | static bool is_str_equal_ignore_case(const char* str1, const char* str2)
function parse_identifier (line 49) | static bool parse_identifier(SQVM* vm, const char*& s, SQObjectPtr& res)
function sq_type_string_to_mask (line 62) | bool sq_type_string_to_mask(const char* type_name, SQUnsignedInteger32& ...
function parse_type_mask (line 83) | static bool parse_type_mask(SQVM* vm, const char*& s, SQUnsignedInteger3...
function sq_parse_function_type_string (line 153) | bool sq_parse_function_type_string(SQVM* vm, const char* s, SQFunctionTy...
function sq_stringify_type_mask (line 612) | void sq_stringify_type_mask(char* buffer, int buffer_length, SQUnsignedI...
function SQObjectPtr (line 651) | SQObjectPtr sq_stringify_function_type(SQVM* vm, const SQFunctionType& ft)
FILE: squirrel/compiler/sqtypeparser.h
type SQFunctionType (line 7) | struct SQFunctionType
FILE: squirrel/compiler/static_analyzer/analyzer.cpp
type SQCompilation (line 12) | namespace SQCompilation {
function isSpaceOrTab (line 116) | static bool isSpaceOrTab(char c) { return c == '\t' || c == ' '; }
FILE: squirrel/compiler/static_analyzer/analyzer.h
function namespace (line 6) | namespace SQCompilation {
FILE: squirrel/compiler/static_analyzer/analyzer_internal.h
function namespace (line 3) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/assign_seq_terminator.h
function namespace (line 8) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/ast_helpers.h
function namespace (line 3) | namespace SQCompilation
function Statement (line 49) | inline const Statement *unwrapBody(const Statement *stmt) {
function Statement (line 65) | inline const Statement *unwrapBodyNonEmpty(const Statement *stmt) {
function Statement (line 82) | inline const Statement *unwrapSingleBlock(const Statement *stmt) {
function Expr (line 101) | inline Expr *unwrapExprStatement(Statement *stmt) {
function FunctionExpr (line 106) | inline const FunctionExpr *extractFunction(const Node *n) {
function Expr (line 120) | inline const Expr *extractAssignedExpression(const Node *n) {
function Id (line 131) | inline const Id *extractReceiver(const Expr *e) {
function isFallThroughStatement (line 156) | inline bool isFallThroughStatement(const Statement *stmt) {
function isFallThroughBranch (line 163) | inline bool isFallThroughBranch(const Statement *stmt) {
FILE: squirrel/compiler/static_analyzer/breakable_scope.h
function namespace (line 5) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/checker_visitor.cpp
type SQCompilation (line 33) | namespace SQCompilation
function isBinaryArith (line 36) | static bool isBinaryArith(const Expr *expr) {
function isAssignExpr (line 40) | static bool isAssignExpr(const Expr *expr) {
function looksLikeBooleanExpr (line 44) | static bool looksLikeBooleanExpr(const Expr *e) {
type DiagnosticsId (line 62) | enum DiagnosticsId
type DiagnosticsId (line 124) | enum DiagnosticsId
function cannotBeNull (line 255) | static bool cannotBeNull(const Expr *e) {
function stringLooksLikeFormatTemplate (line 342) | static bool stringLooksLikeFormatTemplate(const char *s) {
function hasMixedLifetime (line 1715) | static bool hasMixedLifetime(const Expr *e) {
function wrappedBody (line 2295) | static bool wrappedBody(const Statement *stmt) {
function terminateAssignSequence (line 2444) | static bool terminateAssignSequence(const Expr *assignee, Node *tree) {
function ValueRef (line 3812) | ValueRef *CheckerVisitor::findValueInScopes(const char *ref) {
function ValueRef (line 3979) | const ValueRef *CheckerVisitor::findValueForExpr(const Expr *e) {
function Expr (line 4150) | const Expr *CheckerVisitor::maybeEval(const Expr *e, bool allow_extern...
function Expr (line 4155) | const Expr *CheckerVisitor::maybeEval(const Expr *e, int32_t &evalId, ...
function Expr (line 4160) | const Expr *CheckerVisitor::maybeEval(const Expr *e, int32_t &evalId, ...
function ExternalValueExpr (line 4231) | const ExternalValueExpr *CheckerVisitor::findExternalValue(const Expr ...
function FunctionInfo (line 4256) | const FunctionInfo *CheckerVisitor::findFunctionInfo(const Expr *e, bo...
function ValueRef (line 4707) | ValueRef* CheckerVisitor::addExternalValue(const SQObject &val, const ...
FILE: squirrel/compiler/static_analyzer/checker_visitor.h
function namespace (line 13) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/config.cpp
type SQCompilation (line 5) | namespace SQCompilation
function resetAnalyzerConfig (line 25) | void resetAnalyzerConfig() {
function loadAnalyzerConfigFile (line 149) | bool loadAnalyzerConfigFile(const char *configFile) {
function loadAnalyzerConfigFile (line 158) | bool loadAnalyzerConfigFile(const KeyValueFile &config) {
FILE: squirrel/compiler/static_analyzer/config.h
function namespace (line 8) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/function_info.h
function namespace (line 3) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/function_ret_type_eval.cpp
type SQCompilation (line 6) | namespace SQCompilation
function StmtEvalResult (line 10) | StmtEvalResult FunctionReturnTypeEvaluator::evalStmt(const Statement *...
function StmtEvalResult (line 135) | StmtEvalResult FunctionReturnTypeEvaluator::evalReturn(const ReturnSta...
function StmtEvalResult (line 145) | StmtEvalResult FunctionReturnTypeEvaluator::evalThrow(const ThrowState...
function StmtEvalResult (line 149) | StmtEvalResult FunctionReturnTypeEvaluator::evalIf(const IfStatement *...
function StmtEvalResult (line 164) | StmtEvalResult FunctionReturnTypeEvaluator::evalLoop(const LoopStateme...
function StmtEvalResult (line 170) | StmtEvalResult FunctionReturnTypeEvaluator::evalBlock(const Block *blo...
function StmtEvalResult (line 185) | StmtEvalResult FunctionReturnTypeEvaluator::evalSwitch(const SwitchSta...
function StmtEvalResult (line 213) | StmtEvalResult FunctionReturnTypeEvaluator::evalTry(const TryStatement...
FILE: squirrel/compiler/static_analyzer/function_ret_type_eval.h
function namespace (line 7) | namespace SQCompilation
function class (line 26) | class FunctionReturnTypeEvaluator
FILE: squirrel/compiler/static_analyzer/global_state.cpp
type SQCompilation (line 4) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/global_state.h
function namespace (line 10) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/loop_terminator_collector.h
function namespace (line 3) | namespace SQCompilation
function visitThrowStatement (line 50) | void visitThrowStatement(ThrowStatement *stmt) override {
function visitBreakStatement (line 59) | void visitBreakStatement(BreakStatement *stmt) override {
function visitContinueStatement (line 68) | void visitContinueStatement(ContinueStatement *stmt) override {
function visitIfStatement (line 78) | void visitIfStatement(IfStatement *stmt) override {
function visitLoopStatement (line 85) | void visitLoopStatement(LoopStatement *loop) override {
function visitFunctionExpr (line 89) | void visitFunctionExpr(FunctionExpr *f) override {
function visitDecl (line 93) | void visitDecl(Decl *d) override {
function visitTryStatement (line 97) | void visitTryStatement(TryStatement *stmt) override {
function visitSwitchStatement (line 105) | void visitSwitchStatement(SwitchStatement *stmt) override {
FILE: squirrel/compiler/static_analyzer/modification_checker.h
function namespace (line 3) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/name_shadowing_checker.cpp
type SQCompilation (line 13) | namespace SQCompilation
function Node (line 35) | const Node *NameShadowingChecker::extractPointedNode(const SymbolInfo ...
type SymbolKind (line 128) | enum SymbolKind
FILE: squirrel/compiler/static_analyzer/name_shadowing_checker.h
function namespace (line 7) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/naming.cpp
type SQCompilation (line 6) | namespace SQCompilation
function looksLikeElementCount (line 9) | bool looksLikeElementCount(const Expr *e) {
function isUpperCaseIdentifier (line 45) | bool isUpperCaseIdentifier(const Expr *e) {
FILE: squirrel/compiler/static_analyzer/naming.h
function namespace (line 11) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/node_complexity_counter.h
function namespace (line 3) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/node_diff_computer.h
function namespace (line 3) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/node_equal_checker.h
function namespace (line 6) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/operator_classification.h
function namespace (line 5) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/symbol_info.h
function namespace (line 6) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/value_ref.cpp
type SQCompilation (line 7) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/value_ref.h
function namespace (line 8) | namespace SQCompilation
FILE: squirrel/compiler/static_analyzer/var_scope.cpp
type SQCompilation (line 13) | namespace SQCompilation
function VarScope (line 114) | VarScope *VarScope::findScope(const FunctionExpr *own) {
function VarScope (line 127) | VarScope *VarScope::copy(Arena *a, bool forClosure) const {
function SourceLoc (line 158) | static SourceLoc getSymbolLocation(const SymbolInfo *info) {
FILE: squirrel/compiler/static_analyzer/var_scope.h
function namespace (line 7) | namespace SQCompilation
FILE: squirrel/compiler/typeinference.cpp
type SQCompilation (line 15) | namespace SQCompilation {
function Expr (line 18) | Expr *CodeGenVisitor::deparen(Expr *e) const {
FILE: squirrel/opcodes.h
type BitWiseOP (line 11) | enum BitWiseOP {
type CmpOP (line 20) | enum CmpOP {
type NewObjectType (line 28) | enum NewObjectType {
type AppendArrayType (line 34) | enum AppendArrayType {
type SQOpcode (line 128) | enum SQOpcode
type SQInstructionDesc (line 135) | struct SQInstructionDesc {
type SQInstruction (line 139) | struct SQInstruction
type sqvector (line 168) | typedef sqvector<SQInstruction> SQInstructionVec;
function sq_opcode_length (line 177) | inline int sq_opcode_length(int op) {
function sq_is_pure_op (line 181) | inline bool sq_is_pure_op(int op) {
FILE: squirrel/sqapi.cpp
function SQUIRREL_API (line 25) | SQUIRREL_API SQBool sq_tracevar(HSQUIRRELVM v, const HSQOBJECT *containe...
function sq_aux_gettypedarg (line 30) | static bool sq_aux_gettypedarg(HSQUIRRELVM v,SQInteger idx,SQObjectType ...
function SQInteger (line 50) | SQInteger sq_aux_invalidtype(HSQUIRRELVM v,SQObjectType type)
function HSQUIRRELVM (line 57) | HSQUIRRELVM sq_open(SQInteger initialstacksize)
function HSQUIRRELVM (line 78) | HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize)
function SQInteger (line 96) | SQInteger sq_getvmstate(HSQUIRRELVM v)
function sq_seterrorhandler (line 106) | void sq_seterrorhandler(HSQUIRRELVM v)
function HSQOBJECT (line 115) | HSQOBJECT sq_geterrorhandler(HSQUIRRELVM v)
function SQGETTHREAD (line 121) | SQGETTHREAD sq_set_thread_id_function(HSQUIRRELVM v, SQGETTHREAD func)
function SQSQCALLHOOK (line 128) | SQSQCALLHOOK sq_set_sq_call_hook(HSQUIRRELVM v, SQSQCALLHOOK hook)
function SQWATCHDOGHOOK (line 135) | SQWATCHDOGHOOK sq_set_watchdog_hook(HSQUIRRELVM v, SQWATCHDOGHOOK hook)
function sq_kick_watchdog (line 142) | void sq_kick_watchdog(HSQUIRRELVM v)
function SQInteger (line 148) | SQInteger sq_set_watchdog_timeout_msec(HSQUIRRELVM v, SQInteger timeout)
function sq_forbidglobalconstrewrite (line 158) | void sq_forbidglobalconstrewrite(HSQUIRRELVM v, SQBool on)
function sq_setnativedebughook (line 166) | void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook)
function sq_setdebughook (line 173) | void sq_setdebughook(HSQUIRRELVM v)
function SQCOMPILELINEHOOK (line 184) | SQCOMPILELINEHOOK sq_set_compile_line_hook(HSQUIRRELVM v, SQCOMPILELINEH...
function sq_close (line 191) | void sq_close(HSQUIRRELVM v)
function SQRESULT (line 200) | SQRESULT sq_compile(HSQUIRRELVM v, const char *s, SQInteger size, const ...
function sq_lineinfo_in_expressions (line 214) | void sq_lineinfo_in_expressions(HSQUIRRELVM v, SQBool enable)
function sq_enablevartrace (line 219) | void sq_enablevartrace(HSQUIRRELVM v, SQBool enable)
function SQBool (line 224) | SQBool sq_isvartracesupported()
function sq_setcompilationoption (line 233) | void sq_setcompilationoption(HSQUIRRELVM v, enum CompilationOptions co, ...
function sq_checkcompilationoption (line 240) | bool sq_checkcompilationoption(HSQUIRRELVM v, enum CompilationOptions co) {
function sq_notifyallexceptions (line 244) | void sq_notifyallexceptions(HSQUIRRELVM v, SQBool enable)
function sq_addref_refcounted (line 249) | void sq_addref_refcounted(HSQUIRRELVM v,HSQOBJECT *po)
function SQUnsignedInteger (line 259) | SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v,HSQOBJECT *po)
function SQBool (line 269) | SQBool sq_release_refcounted(HSQUIRRELVM v,HSQOBJECT *po)
function SQUnsignedInteger (line 281) | SQUnsignedInteger sq_getvmrefcount(HSQUIRRELVM SQ_UNUSED_ARG(v), const H...
function SQInteger (line 295) | SQInteger sq_objtointeger(const HSQOBJECT *o)
function SQFloat (line 303) | SQFloat sq_objtofloat(const HSQOBJECT *o)
function SQBool (line 311) | SQBool sq_objtobool(const HSQOBJECT *o)
function SQBool (line 319) | SQBool sq_obj_is_true(const HSQOBJECT *o)
function SQUserPointer (line 325) | SQUserPointer sq_objtouserpointer(const HSQOBJECT *o)
function SQRESULT (line 333) | SQRESULT sq_obj_getuserdata(const HSQOBJECT *obj, SQUserPointer *p, SQUs...
function sq_getregistrytableobj (line 349) | void sq_getregistrytableobj(HSQUIRRELVM v, HSQOBJECT *out)
function SQRESULT (line 354) | SQRESULT sq_obj_get(HSQUIRRELVM v, const HSQOBJECT *obj, const HSQOBJECT...
function SQBool (line 373) | SQBool sq_obj_cmp(HSQUIRRELVM v, const HSQOBJECT *a, const HSQOBJECT *b,...
function sq_obj_is_equal (line 381) | bool sq_obj_is_equal(HSQUIRRELVM v, const HSQOBJECT *a, const HSQOBJECT *b)
function SQInteger (line 386) | SQInteger sq_obj_getsize(const HSQOBJECT *obj)
function SQRESULT (line 399) | static SQRESULT getinstanceup_impl(SQInstance *inst, SQUserPointer *p,
function SQRESULT (line 415) | SQRESULT sq_obj_getinstanceup(const HSQOBJECT *obj, SQUserPointer *p,
function SQRESULT (line 425) | static SQRESULT rawset_impl(HSQUIRRELVM v, const SQObjectPtr &self,
function SQRESULT (line 446) | SQRESULT sq_obj_set(HSQUIRRELVM v, const HSQOBJECT *obj,
function SQRESULT (line 463) | SQRESULT sq_obj_newslot(HSQUIRRELVM v, const HSQOBJECT *obj,
function fastEqualByValue (line 483) | static bool fastEqualByValue(const SQObjectPtr &a, const SQObjectPtr &b,...
function sq_fast_equal_by_value_deep (line 547) | bool sq_fast_equal_by_value_deep(const HSQOBJECT *a, const HSQOBJECT *b,...
function sq_pushnull (line 556) | void sq_pushnull(HSQUIRRELVM v)
function sq_pushstring (line 561) | void sq_pushstring(HSQUIRRELVM v,const char *s,SQInteger len)
function sq_pushinteger (line 568) | void sq_pushinteger(HSQUIRRELVM v,SQInteger n)
function sq_pushbool (line 573) | void sq_pushbool(HSQUIRRELVM v,SQBool b)
function sq_pushfloat (line 578) | void sq_pushfloat(HSQUIRRELVM v,SQFloat n)
function sq_pushuserpointer (line 583) | void sq_pushuserpointer(HSQUIRRELVM v,SQUserPointer p)
function sq_pushthread (line 588) | void sq_pushthread(HSQUIRRELVM v, HSQUIRRELVM thread)
function SQUserPointer (line 593) | SQUserPointer sq_newuserdata(HSQUIRRELVM v,SQUnsignedInteger size)
function sq_newtable (line 601) | void sq_newtable(HSQUIRRELVM v)
function sq_newtableex (line 607) | void sq_newtableex(HSQUIRRELVM v,SQInteger initialcapacity)
function sq_newarray (line 612) | void sq_newarray(HSQUIRRELVM v,SQInteger size)
function SQRESULT (line 617) | SQRESULT sq_newclass(HSQUIRRELVM v,SQBool hasbase)
function SQBool (line 636) | SQBool sq_instanceof(HSQUIRRELVM v)
function SQRESULT (line 661) | SQRESULT sq_arrayappend(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 673) | SQRESULT sq_arraypop(HSQUIRRELVM v,SQInteger idx,SQBool pushval)
function SQRESULT (line 688) | SQRESULT sq_arrayresize(HSQUIRRELVM v,SQInteger idx,SQInteger newsize)
function SQRESULT (line 703) | SQRESULT sq_arrayreverse(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 725) | SQRESULT sq_arrayremove(HSQUIRRELVM v,SQInteger idx,SQInteger itemidx)
function SQRESULT (line 735) | SQRESULT sq_arrayinsert(HSQUIRRELVM v,SQInteger idx,SQInteger destpos)
function sq_newclosure (line 745) | void sq_newclosure(HSQUIRRELVM v,SQFUNCTION func,SQUnsignedInteger nfree...
function SQRESULT (line 756) | SQRESULT sq_getclosureinfo(HSQUIRRELVM v,SQInteger idx,SQInteger *nparam...
function SQRESULT (line 776) | SQRESULT sq_setnativeclosurename(HSQUIRRELVM v,SQInteger idx,const char ...
function SQRESULT (line 787) | SQRESULT sq_setnativeclosuredocstring(HSQUIRRELVM v,SQInteger idx,const ...
function SQRESULT (line 802) | SQRESULT sq_setobjectdocstring(HSQUIRRELVM v, const HSQOBJECT *obj, cons...
function SQRESULT (line 820) | SQRESULT sq_setparamscheck(HSQUIRRELVM v,SQInteger nparamscheck,const ch...
function SQRESULT (line 842) | SQRESULT sq_new_closure_slot_from_decl_string(HSQUIRRELVM v, SQFUNCTION ...
function SQRESULT (line 921) | SQRESULT sq_bindenv(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 958) | SQRESULT sq_getclosurename(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 975) | SQRESULT sq_clear(HSQUIRRELVM v,SQInteger idx, SQBool freemem)
function sq_pushroottable (line 989) | void sq_pushroottable(HSQUIRRELVM v)
function sq_pushregistrytable (line 994) | void sq_pushregistrytable(HSQUIRRELVM v)
function sq_pushconsttable (line 999) | void sq_pushconsttable(HSQUIRRELVM v)
function SQRESULT (line 1004) | SQRESULT sq_setroottable(HSQUIRRELVM v)
function SQRESULT (line 1015) | SQRESULT sq_setconsttable(HSQUIRRELVM v)
function sq_setforeignptr (line 1026) | void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p)
function SQUserPointer (line 1031) | SQUserPointer sq_getforeignptr(HSQUIRRELVM v)
function sq_setsharedforeignptr (line 1036) | void sq_setsharedforeignptr(HSQUIRRELVM v,SQUserPointer p)
function SQUserPointer (line 1041) | SQUserPointer sq_getsharedforeignptr(HSQUIRRELVM v)
function sq_setvmreleasehook (line 1046) | void sq_setvmreleasehook(HSQUIRRELVM v,SQRELEASEHOOK hook)
function SQRELEASEHOOK (line 1051) | SQRELEASEHOOK sq_getvmreleasehook(HSQUIRRELVM v)
function sq_setsharedreleasehook (line 1056) | void sq_setsharedreleasehook(HSQUIRRELVM v,SQRELEASEHOOK hook)
function SQRELEASEHOOK (line 1061) | SQRELEASEHOOK sq_getsharedreleasehook(HSQUIRRELVM v)
function sq_push (line 1066) | void sq_push(HSQUIRRELVM v,SQInteger idx)
function SQObjectType (line 1071) | SQObjectType sq_gettype(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1076) | SQRESULT sq_typeof(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1087) | SQRESULT sq_tostring(HSQUIRRELVM v,SQInteger idx)
function sq_tobool (line 1098) | void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool *b)
function SQRESULT (line 1104) | SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i)
function SQRESULT (line 1118) | SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f)
function SQRESULT (line 1128) | SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *b)
function SQRESULT (line 1138) | SQRESULT sq_getstringandsize(HSQUIRRELVM v,SQInteger idx,const char **c,...
function SQRESULT (line 1147) | SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const char **c)
function SQRESULT (line 1155) | SQRESULT sq_getthread(HSQUIRRELVM v,SQInteger idx,HSQUIRRELVM *thread)
function SQRESULT (line 1163) | SQRESULT sq_clone(HSQUIRRELVM v,SQInteger idx)
function SQInteger (line 1174) | SQInteger sq_getsize(HSQUIRRELVM v, SQInteger idx)
function SQHash (line 1183) | SQHash sq_gethash(HSQUIRRELVM v, SQInteger idx)
function SQRESULT (line 1189) | SQRESULT sq_getuserdata(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p,SQU...
function SQRESULT (line 1198) | SQRESULT sq_settypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer typetag)
function SQRESULT (line 1209) | SQRESULT sq_getobjtypetag(const HSQOBJECT *o,SQUserPointer * typetag)
function SQRESULT (line 1220) | SQRESULT sq_gettypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer *typetag)
function SQRESULT (line 1228) | SQRESULT sq_getuserpointer(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p)
function SQRESULT (line 1236) | SQRESULT sq_setinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer p)
function SQRESULT (line 1244) | SQRESULT sq_setclassudsize(HSQUIRRELVM v, SQInteger idx, SQInteger udsize)
function SQRESULT (line 1253) | SQRESULT sq_registernativefield(HSQUIRRELVM v, SQInteger classidx,
function SQRESULT (line 1282) | SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p...
function SQInteger (line 1292) | SQInteger sq_gettop(HSQUIRRELVM v)
function sq_settop (line 1297) | void sq_settop(HSQUIRRELVM v, SQInteger newtop)
function sq_pop (line 1306) | void sq_pop(HSQUIRRELVM v, SQInteger nelemstopop)
function sq_poptop (line 1312) | void sq_poptop(HSQUIRRELVM v)
function sq_remove (line 1319) | void sq_remove(HSQUIRRELVM v, SQInteger idx)
function SQInteger (line 1324) | SQInteger sq_cmp(HSQUIRRELVM v)
function sq_cmpraw (line 1331) | bool sq_cmpraw(HSQUIRRELVM v, HSQOBJECT &lhs, HSQOBJECT &rhs, SQInteger ...
function SQRESULT (line 1337) | SQRESULT sq_newslot(HSQUIRRELVM v, SQInteger idx, SQBool bstatic)
function SQRESULT (line 1356) | SQRESULT sq_deleteslot(HSQUIRRELVM v,SQInteger idx,SQBool pushval)
function SQRESULT (line 1374) | SQRESULT sq_set(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1386) | SQRESULT sq_rawset(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1411) | SQRESULT sq_newmember(HSQUIRRELVM v,SQInteger idx,SQBool bstatic)
function SQRESULT (line 1427) | SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1458) | SQRESULT sq_rawdeleteslot(HSQUIRRELVM v,SQInteger idx,SQBool pushval)
function SQRESULT (line 1483) | SQRESULT sq_getdelegate(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1503) | SQRESULT sq_get(HSQUIRRELVM v,SQInteger idx)
function propagate_immutable (line 1513) | static inline void propagate_immutable(const SQObject &obj, SQObject &sl...
function SQRESULT (line 1519) | SQRESULT sq_rawget(HSQUIRRELVM v, SQInteger idx)
function SQRESULT (line 1531) | SQRESULT sq_getstackobj(HSQUIRRELVM v,SQInteger idx,HSQOBJECT *po)
function sq_pushobj (line 1562) | void sq_pushobj(HSQUIRRELVM v,const HSQOBJECT *po)
function sq_throwparamtypeerror (line 1567) | void sq_throwparamtypeerror(HSQUIRRELVM v, SQInteger nparam, SQInteger t...
function SQRESULT (line 1572) | SQRESULT sq_throwerror(HSQUIRRELVM v,const char *err)
function SQRESULT (line 1578) | SQRESULT sq_throwobject(HSQUIRRELVM v)
function sq_reseterror (line 1586) | void sq_reseterror(HSQUIRRELVM v)
function sq_getlasterror (line 1591) | void sq_getlasterror(HSQUIRRELVM v)
function SQRESULT (line 1596) | SQRESULT sq_reservestack(HSQUIRRELVM v,SQInteger nsize)
function SQRESULT (line 1607) | SQRESULT sq_resume(HSQUIRRELVM v,SQBool retval,SQBool invoke_err_handler)
function SQRESULT (line 1628) | SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool inv...
function SQRESULT (line 1646) | SQRESULT sq_tailcall(HSQUIRRELVM v, SQInteger nparams)
function SQRESULT (line 1667) | SQRESULT sq_suspendvm(HSQUIRRELVM v)
function SQRESULT (line 1672) | SQRESULT sq_wakeupvm(HSQUIRRELVM v,SQBool wakeupret,SQBool retval,SQBool...
function sq_setreleasehook (line 1698) | void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook)
function SQRELEASEHOOK (line 1709) | SQRELEASEHOOK sq_getreleasehook(HSQUIRRELVM v,SQInteger idx)
function sq_setcompilererrorhandler (line 1720) | void sq_setcompilererrorhandler(HSQUIRRELVM v,SQCOMPILERERROR f)
function SQCOMPILERERROR (line 1725) | SQCOMPILERERROR sq_getcompilererrorhandler(HSQUIRRELVM v)
function sq_setcompilerdiaghandler (line 1730) | void sq_setcompilerdiaghandler(HSQUIRRELVM v, SQ_COMPILER_DIAG_CB f)
function SQRESULT (line 1736) | SQRESULT sq_writeclosure(HSQUIRRELVM v,SQWRITEFUNC w,SQUserPointer up)
function SQRESULT (line 1750) | SQRESULT sq_readclosure(HSQUIRRELVM v,SQREADFUNC r,SQUserPointer up)
function SQRESULT (line 1770) | SQRESULT sq_resurrectunreachable(HSQUIRRELVM v)
function SQInteger (line 1780) | SQInteger sq_collectgarbage(HSQUIRRELVM v)
function SQRESULT (line 1789) | SQRESULT sq_getcallee(HSQUIRRELVM v)
function SQRESULT (line 1828) | SQRESULT sq_setfreevariable(HSQUIRRELVM v,SQInteger idx,SQUnsignedIntege...
function SQRESULT (line 1854) | SQRESULT sq_getmemberhandle(HSQUIRRELVM v,SQInteger idx,HSQMEMBERHANDLE ...
function SQRESULT (line 1873) | SQRESULT _getmemberbyhandle(HSQUIRRELVM v,SQObjectPtr &self,const HSQMEM...
function SQRESULT (line 1903) | SQRESULT sq_getbyhandle(HSQUIRRELVM v,SQInteger idx,const HSQMEMBERHANDL...
function SQRESULT (line 1927) | SQRESULT sq_setbyhandle(HSQUIRRELVM v,SQInteger idx,const HSQMEMBERHANDL...
function SQRESULT (line 1950) | SQRESULT sq_getbase(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1961) | SQRESULT sq_getclass(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1969) | SQRESULT sq_createinstance(HSQUIRRELVM v,SQInteger idx)
function sq_weakref (line 1980) | void sq_weakref(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 1990) | SQRESULT sq_getweakrefval(HSQUIRRELVM v,SQInteger idx)
function SQRESULT (line 2001) | SQRESULT sq_next(HSQUIRRELVM v,SQInteger idx)
function sq_dumpast (line 2023) | void sq_dumpast(HSQUIRRELVM v, SQCompilation::SqASTData *astData, bool n...
function sq_dumpbytecode (line 2030) | void sq_dumpbytecode(HSQUIRRELVM v, HSQOBJECT obj, OutputStream *s, int ...
function sq_reset_static_memos (line 2044) | void sq_reset_static_memos(HSQUIRRELVM v, HSQOBJECT func)
function SQRESULT (line 2054) | SQRESULT sq_translateasttobytecode(HSQUIRRELVM v, SQCompilation::SqASTDa...
function SQRESULT (line 2065) | SQRESULT sq_getimports(HSQUIRRELVM v, SQCompilation::SqASTData *astData,...
function sq_freeimports (line 2070) | void sq_freeimports(HSQUIRRELVM v, SQInteger num, SQModuleImport *imports)
function sq_analyzeast (line 2076) | void sq_analyzeast(HSQUIRRELVM v, SQCompilation::SqASTData *astData, con...
function sq_checktrailingspaces (line 2081) | void sq_checktrailingspaces(HSQUIRRELVM v, const char *sourceName, const...
function sq_releaseASTData (line 2102) | void sq_releaseASTData(HSQUIRRELVM v, SQCompilation::SqASTData *astData)
function sq_move (line 2121) | void sq_move(HSQUIRRELVM dest,HSQUIRRELVM src,SQInteger idx)
function validate_freezable (line 2126) | static bool validate_freezable(HSQUIRRELVM v, SQObjectPtr &o)
function SQRESULT (line 2136) | SQRESULT sq_freeze(HSQUIRRELVM v, SQInteger idx)
function SQUIRREL_API (line 2148) | SQUIRREL_API SQRESULT sq_freeze_inplace(HSQUIRRELVM v, SQInteger idx)
function SQRESULT (line 2158) | SQRESULT sq_mark_pure_inplace(HSQUIRRELVM v, SQInteger idx)
function sq_is_pure_function (line 2174) | bool sq_is_pure_function(HSQOBJECT *func)
function sq_setprintfunc (line 2189) | void sq_setprintfunc(HSQUIRRELVM v, SQPRINTFUNCTION printfunc,SQPRINTFUN...
function SQPRINTFUNCTION (line 2195) | SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v)
function SQPRINTFUNCTION (line 2200) | SQPRINTFUNCTION sq_geterrorfunc(HSQUIRRELVM v)
function SQAllocContext (line 2205) | SQAllocContext sq_getallocctx(HSQUIRRELVM v)
function sq_free (line 2220) | void sq_free(SQAllocContext ctx, void *p,SQUnsignedInteger size)
function SQRESULT (line 2225) | SQRESULT sq_limitthreadaccess(HSQUIRRELVM vm, int64_t tid)
function sq_canaccessfromthisthread (line 2231) | bool sq_canaccessfromthisthread(HSQUIRRELVM vm)
function sq_resetanalyzerconfig (line 2236) | void sq_resetanalyzerconfig() {
function sq_loadanalyzerconfig (line 2240) | bool sq_loadanalyzerconfig(const char *configFileName) {
function sq_loadanalyzerconfigblk (line 2244) | bool sq_loadanalyzerconfigblk(const KeyValueFile &config) {
function sq_setdiagnosticstatebyname (line 2248) | bool sq_setdiagnosticstatebyname(const char *diagId, bool state) {
function sq_setdiagnosticstatebyid (line 2252) | bool sq_setdiagnosticstatebyid(int32_t id, bool state) {
function sq_printwarningslist (line 2256) | void sq_printwarningslist(FILE *ostream) {
function sq_enablesyntaxwarnings (line 2260) | void sq_enablesyntaxwarnings(bool on) {
function sq_checkglobalnames (line 2264) | void sq_checkglobalnames(HSQUIRRELVM v) {
function sq_mergeglobalnames (line 2268) | void sq_mergeglobalnames(const HSQOBJECT *bindings) {
FILE: squirrel/sqarray.h
function CHAINABLE_OBJ (line 7) | struct SQArray : public CHAINABLE_OBJ
function Release (line 108) | void Release()
FILE: squirrel/sqbaselib.cpp
function sq_parse_float (line 37) | static bool sq_parse_float(const char* str_begin, const char * str_end, ...
function sq_parse_int (line 58) | static bool sq_parse_int(const char* str_begin, const char* str_end, SQO...
function SQInteger (line 79) | static SQInteger get_allowed_args_count(const SQObject &closure, SQInteg...
function SQInteger (line 95) | static SQInteger base_getroottable(HSQUIRRELVM v)
function SQInteger (line 101) | static SQInteger base_getconsttable(HSQUIRRELVM v)
function SQInteger (line 107) | SQInteger __sq_getcallstackinfos(HSQUIRRELVM v,SQInteger level)
function SQInteger (line 146) | static SQInteger base_assert(HSQUIRRELVM v)
function SQInteger (line 172) | static SQInteger get_slice_params(HSQUIRRELVM v,SQInteger &sidx,SQIntege...
function SQInteger (line 196) | static SQInteger base_print(HSQUIRRELVM v, SQPRINTFUNCTION pf, bool newl...
function SQInteger (line 219) | static SQInteger base_print_newline(HSQUIRRELVM v)
function SQInteger (line 224) | static SQInteger base_print_(HSQUIRRELVM v)
function SQInteger (line 229) | static SQInteger base_error_newline(HSQUIRRELVM v)
function SQInteger (line 234) | static SQInteger base_error_(HSQUIRRELVM v)
function SQInteger (line 239) | static SQInteger base_compilestring(HSQUIRRELVM v)
function SQInteger (line 275) | static SQInteger base_newthread(HSQUIRRELVM v)
function SQInteger (line 284) | static SQInteger base_suspend(HSQUIRRELVM v)
function SQInteger (line 289) | static SQInteger builtin_array_ctor(HSQUIRRELVM v)
function SQInteger (line 307) | static SQInteger base_type(HSQUIRRELVM v)
function SQInteger (line 314) | static SQInteger base_callee(HSQUIRRELVM v)
function SQInteger (line 324) | static SQInteger base_freeze(HSQUIRRELVM v)
function SQInteger (line 329) | static SQInteger base_getobjflags(HSQUIRRELVM v)
function SQInteger (line 335) | static SQInteger base_deduplicate_object(HSQUIRRELVM v)
function SQInteger (line 340) | static SQInteger base_classof(HSQUIRRELVM v)
function SQRESULT (line 378) | SQRESULT sq_registerbaselib(HSQUIRRELVM v)
function SQRESULT (line 395) | SQRESULT sq_registertypeslib(HSQUIRRELVM v)
function sq_base_register (line 429) | void sq_base_register(HSQUIRRELVM v)
function SQInteger (line 442) | static SQInteger default_type_method_len(HSQUIRRELVM v)
function SQInteger (line 448) | static SQInteger default_type_method_tofloat(HSQUIRRELVM v)
function SQInteger (line 472) | static SQInteger default_type_method_tointeger(HSQUIRRELVM v)
function SQInteger (line 501) | static SQInteger default_type_method_tostring(HSQUIRRELVM v)
function SQInteger (line 508) | static SQInteger obj_type_method_weakref(HSQUIRRELVM v)
function SQInteger (line 514) | static SQInteger obj_clear(HSQUIRRELVM v)
function SQInteger (line 521) | static SQInteger number_type_method_tochar(HSQUIRRELVM v)
function SQInteger (line 530) | static SQInteger container_update(HSQUIRRELVM v)
function SQInteger (line 553) | static SQInteger container_merge(HSQUIRRELVM v)
function SQInteger (line 586) | static SQInteger container_each(HSQUIRRELVM v)
function SQInteger (line 614) | static SQInteger container_findindex(HSQUIRRELVM v)
function SQInteger (line 646) | static SQInteger container_findvalue(HSQUIRRELVM v)
function SQInteger (line 682) | static SQInteger container_hasindex(HSQUIRRELVM v)
function SQInteger (line 697) | static SQInteger container_hasvalue(HSQUIRRELVM v)
function SQInteger (line 722) | static SQInteger table_rawdelete(HSQUIRRELVM v)
function SQInteger (line 732) | static SQInteger container_rawexists(HSQUIRRELVM v)
function SQInteger (line 742) | static SQInteger container_rawset(HSQUIRRELVM v)
function SQInteger (line 750) | static SQInteger container_rawget(HSQUIRRELVM v)
function SQInteger (line 759) | static SQInteger table_filter(HSQUIRRELVM v)
function SQInteger (line 817) | static SQInteger table_to_pairs(HSQUIRRELVM v)
function SQInteger (line 839) | static SQInteger swap(HSQUIRRELVM v)
function SQInteger (line 887) | static SQInteger array_to_table(HSQUIRRELVM v)
function SQInteger (line 931) | static SQInteger __map_table(SQTable *dest, SQTable *src, HSQUIRRELVM v) {
function SQInteger (line 964) | static SQInteger table_map(HSQUIRRELVM v)
function SQInteger (line 975) | static SQInteger table_reduce(HSQUIRRELVM v)
function SQInteger (line 1022) | static SQInteger table_replace_with(HSQUIRRELVM v)
function SQInteger (line 1039) | static SQInteger obj_clone(HSQUIRRELVM vm) {
function SQInteger (line 1051) | static SQInteger obj_is_frozen(HSQUIRRELVM vm) {
function SQInteger (line 1101) | static SQInteger array_append(HSQUIRRELVM v)
function SQInteger (line 1116) | static SQInteger array_extend(HSQUIRRELVM v)
function SQInteger (line 1136) | static SQInteger array_reverse(HSQUIRRELVM v)
function SQInteger (line 1143) | static SQInteger array_pop(HSQUIRRELVM v)
function SQInteger (line 1150) | static SQInteger array_top(HSQUIRRELVM v)
function SQInteger (line 1160) | static SQInteger array_insert(HSQUIRRELVM v)
function SQInteger (line 1174) | static SQInteger array_remove(HSQUIRRELVM v)
function SQInteger (line 1190) | static SQInteger array_resize(HSQUIRRELVM v)
function SQInteger (line 1211) | static SQInteger __map_array(SQArray *dest,SQArray *src,HSQUIRRELVM v, b...
function SQInteger (line 1244) | static SQInteger array_map(HSQUIRRELVM v)
function SQInteger (line 1258) | static SQInteger array_apply(HSQUIRRELVM v)
function SQInteger (line 1269) | static SQInteger array_reduce(HSQUIRRELVM v)
function SQInteger (line 1311) | static SQInteger array_filter(HSQUIRRELVM v)
function SQInteger (line 1345) | static SQInteger _push_scan_index(HSQUIRRELVM v, SQInteger index)
function SQInteger (line 1355) | static SQInteger _push_scan_found_flag(HSQUIRRELVM v, SQInteger index)
function SQInteger (line 1362) | static SQInteger _array_scan_for_value(HSQUIRRELVM v, SQInteger (*push_r...
function SQInteger (line 1378) | static SQInteger array_indexof(HSQUIRRELVM v)
function SQInteger (line 1384) | static SQInteger array_contains(HSQUIRRELVM v)
function _sort_compare (line 1390) | static bool _sort_compare(HSQUIRRELVM v, SQArray *arr, SQObjectPtr &a, S...
function _hsort_sift_down (line 1426) | static bool _hsort_sift_down(HSQUIRRELVM v,SQArray *arr, SQInteger root,...
function _hsort (line 1466) | static bool _hsort(HSQUIRRELVM v,SQObjectPtr &arr, SQInteger SQ_UNUSED_A...
function SQInteger (line 1483) | static SQInteger array_sort(HSQUIRRELVM v)
function SQInteger (line 1501) | static SQInteger clamp_int(SQInteger v, SQInteger minv, SQInteger maxv)
function SQInteger (line 1506) | static SQInteger array_slice(HSQUIRRELVM v)
function SQInteger (line 1535) | static SQInteger array_hasindex(HSQUIRRELVM v)
function SQInteger (line 1543) | static SQInteger array_replace_with(HSQUIRRELVM v)
function SQInteger (line 1594) | static SQInteger string_hash(HSQUIRRELVM v)
function SQInteger (line 1605) | static SQInteger string_slice(HSQUIRRELVM v)
function SQInteger (line 1625) | static SQInteger string_hasindex(HSQUIRRELVM v)
function SQInteger (line 1633) | static SQInteger _string_scan_for_substring(HSQUIRRELVM v, SQInteger (*p...
function SQInteger (line 1651) | static SQInteger string_indexof(HSQUIRRELVM v)
function SQInteger (line 1656) | static SQInteger string_contains(HSQUIRRELVM v)
function SQInteger (line 1700) | static SQInteger string_substitute(HSQUIRRELVM v)
function SQInteger (line 1786) | static SQInteger string_replace(HSQUIRRELVM v)
function SQInteger (line 1811) | static SQInteger buf_concat(sqvector<char> &res, const SQObjectPtrVec &s...
function SQInteger (line 1827) | static SQInteger string_join(HSQUIRRELVM v)
function SQInteger (line 1887) | static SQInteger string_concat(HSQUIRRELVM v)
function SQInteger (line 1918) | static SQInteger string_split(HSQUIRRELVM v)
function SQInteger (line 2029) | static SQInteger builtin_integer_ctor(HSQUIRRELVM v)
function SQInteger (line 2066) | static SQInteger builtin_float_ctor(HSQUIRRELVM v)
function SQInteger (line 2098) | static SQInteger builtin_bool_ctor(HSQUIRRELVM v)
function SQInteger (line 2110) | static SQInteger builtin_string_ctor(HSQUIRRELVM v)
function SQInteger (line 2120) | static SQInteger builtin_table_ctor(HSQUIRRELVM v)
function SQInteger (line 2127) | static SQInteger builtin_null_ctor(HSQUIRRELVM v)
function SQInteger (line 2132) | static SQInteger builtin_weakref_ctor(HSQUIRRELVM v)
function SQInteger (line 2182) | static SQInteger closure_pcall(HSQUIRRELVM v)
function SQInteger (line 2187) | static SQInteger closure_call(HSQUIRRELVM v)
function SQInteger (line 2197) | static SQInteger _closure_acall(HSQUIRRELVM v,SQBool invoke_err_handler)
function SQInteger (line 2206) | static SQInteger closure_acall(HSQUIRRELVM v)
function SQInteger (line 2211) | static SQInteger closure_pacall(HSQUIRRELVM v)
function SQInteger (line 2216) | static SQInteger closure_bindenv(HSQUIRRELVM v)
function SQInteger (line 2224) | static SQInteger closure_getfreevar(HSQUIRRELVM v)
function SQInteger (line 2240) | static SQInteger closure_getfuncinfos_obj(HSQUIRRELVM v, SQObjectPtr & o) {
function SQInteger (line 2371) | static SQInteger closure_getfuncinfos(HSQUIRRELVM v)
function SQInteger (line 2378) | static SQInteger delegable_getfuncinfos(HSQUIRRELVM v)
function SQInteger (line 2392) | static SQInteger class_getfuncinfos(HSQUIRRELVM v)
function SQInteger (line 2420) | static SQInteger generator_getstatus(HSQUIRRELVM v)
function SQInteger (line 2440) | static SQInteger thread_call(HSQUIRRELVM v)
function SQInteger (line 2460) | static SQInteger thread_wakeup(HSQUIRRELVM v)
function SQInteger (line 2496) | static SQInteger thread_wakeupthrow(HSQUIRRELVM v)
function SQInteger (line 2537) | static SQInteger thread_getstatus(HSQUIRRELVM v)
function SQInteger (line 2556) | static SQInteger thread_getstackinfos(HSQUIRRELVM v)
function SQInteger (line 2602) | static SQInteger class_instance(HSQUIRRELVM v)
function SQInteger (line 2607) | static SQInteger class_getbase(HSQUIRRELVM v)
function SQInteger (line 2612) | static SQInteger class_newmember(HSQUIRRELVM v)
function SQInteger (line 2629) | static SQInteger get_class_metamethod(HSQUIRRELVM v)
function SQInteger (line 2645) | static SQInteger class_lock(HSQUIRRELVM v)
function SQInteger (line 2681) | static SQInteger instance_getclass(HSQUIRRELVM v)
function SQInteger (line 2704) | static SQInteger weakref_ref(HSQUIRRELVM v)
FILE: squirrel/sqclass.cpp
function SQClass (line 60) | SQClass* SQClass::Create(SQVM *v,SQClass *base)
function SQInstance (line 133) | SQInstance *SQClass::CreateInstance(SQVM *v)
function SQInteger (line 142) | SQInteger SQClass::Next(const SQObjectPtr &refpos, SQObjectPtr &outkey, ...
FILE: squirrel/sqclass.h
type SQInstance (line 9) | struct SQInstance
type SQClassMember (line 11) | struct SQClassMember {
type sqvector (line 18) | typedef sqvector<SQClassMember> SQClassMemberVec;
type SQNativeFieldDesc (line 41) | struct SQNativeFieldDesc {
function CHAINABLE_OBJ (line 46) | struct SQClass : public CHAINABLE_OBJ
function SQDelegable (line 140) | struct SQInstance : public SQDelegable
FILE: squirrel/sqclosure.h
type SQFunctionProto (line 8) | struct SQFunctionProto
type SQClass (line 9) | struct SQClass
function CHAINABLE_OBJ (line 10) | struct SQClosure : public CHAINABLE_OBJ
function Release (line 29) | void Release(){
function SQClosure (line 39) | SQClosure *Clone()
function Finalize (line 55) | void Finalize(){
function SQObjectType (line 60) | SQObjectType GetType() {return OT_CLOSURE;}
function CHAINABLE_OBJ (line 70) | struct SQOuter : public CHAINABLE_OBJ
function CHAINABLE_OBJ (line 104) | struct SQGenerator : public CHAINABLE_OBJ
function CHAINABLE_OBJ (line 148) | struct SQNativeClosure : public CHAINABLE_OBJ
function SQNativeClosure (line 170) | SQNativeClosure *Clone()
function Release (line 189) | void Release(){
function Finalize (line 199) | void Finalize() { _NULL_SQOBJECT_VECTOR(_outervalues,_noutervalues); }
function SQObjectType (line 200) | SQObjectType GetType() {return OT_NATIVECLOSURE;}
FILE: squirrel/sqdebug.cpp
function SQRESULT (line 11) | SQRESULT sq_getfunctioninfo(HSQUIRRELVM v,SQInteger level,SQFunctionInfo...
function SQRESULT (line 29) | SQRESULT sq_stackinfos(HSQUIRRELVM v, SQInteger level, SQStackInfos *si)
function SQString (line 74) | SQString *SQVM::PrintObjVal(const SQObject &o)
FILE: squirrel/sqdedupshrinker.cpp
function calc_shrinker_hash (line 10) | static inline uint32_t calc_shrinker_hash(uint32_t * data, int bytes)
type SQDeduplicateShrinker (line 18) | struct SQDeduplicateShrinker
method SQDeduplicateShrinker (line 30) | SQDeduplicateShrinker(HSQUIRRELVM vm) : arrayCache(vm->_sharedstate->_...
method SQDeduplicateShrinker (line 37) | SQDeduplicateShrinker(const SQDeduplicateShrinker &) = delete;
method SQDeduplicateShrinker (line 38) | SQDeduplicateShrinker(SQDeduplicateShrinker &&) = delete;
method SQDeduplicateShrinker (line 39) | SQDeduplicateShrinker & operator=(const SQDeduplicateShrinker &) = del...
method SQDeduplicateShrinker (line 40) | SQDeduplicateShrinker & operator=(SQDeduplicateShrinker &&) = delete;
method shrink (line 43) | bool shrink(SQObjectPtr & obj)
function SQRESULT (line 142) | SQRESULT sq_deduplicate_object(HSQUIRRELVM vm, int index)
FILE: squirrel/sqext.cpp
function SQRESULT (line 10) | SQRESULT sq_ext_getfuncinfo(HSQOBJECT obj, SQFunctionInfo *fi)
function SQRESULT (line 43) | SQRESULT sq_ext_get_array_floats(HSQOBJECT obj, int start, int count, fl...
function sq_ext_get_array_int (line 70) | int sq_ext_get_array_int(HSQOBJECT obj, int index, int def)
function sq_ext_get_array_float (line 89) | float sq_ext_get_array_float(HSQOBJECT obj, int index, float def)
FILE: squirrel/sqfuncproto.h
type SQOuterType (line 7) | enum SQOuterType {
type SQLangFeature (line 12) | enum SQLangFeature {
type SQVarFlags (line 31) | enum SQVarFlags {
function SQOuterVar (line 41) | struct SQOuterVar
function Release (line 64) | struct SQLocalVarInfo
function Finalize (line 221) | void Finalize(){
function SQObjectType (line 225) | SQObjectType GetType() {return OT_FUNCPROTO;}
FILE: squirrel/sqmem.cpp
function sq_vm_init_alloc_context (line 7) | void sq_vm_init_alloc_context(SQAllocContext *) {}
function sq_vm_destroy_alloc_context (line 8) | void sq_vm_destroy_alloc_context(SQAllocContext *) {}
function sq_vm_assign_to_alloc_context (line 9) | void sq_vm_assign_to_alloc_context(SQAllocContext, HSQUIRRELVM) {}
function sq_vm_free (line 19) | void sq_vm_free(SQAllocContext SQ_UNUSED_ARG(ctx), void *p, SQUnsignedIn...
FILE: squirrel/sqobject.cpp
function SQString (line 55) | SQString *SQString::Create(SQSharedState *ss,const char *s,SQInteger len)
function SQInteger (line 66) | SQInteger SQString::Next(const SQObjectPtr &refpos, SQObjectPtr &outkey,...
function SQWeakRef (line 79) | SQWeakRef *SQRefCounted::GetWeakRef(SQAllocContext alloc_ctx, SQObjectTy...
function SQInteger (line 246) | inline SQInteger get_line_offset_impl(T* lineinfos, int nlineinfos, int ...
function SQInteger (line 311) | SQInteger SQFunctionProto::GetLine(SQLineInfosHeader* lineinfos, int nli...
function SQInteger (line 320) | SQInteger SQFunctionProto::GetLine(const SQInstruction *curr, int *hint,...
function SafeWrite (line 334) | static bool SafeWrite(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,S...
function SafeRead (line 343) | static bool SafeRead(HSQUIRRELVM v,SQREADFUNC read,SQUserPointer up,SQUs...
function WriteTag (line 352) | static bool WriteTag(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,SQ...
function CheckTag (line 357) | static bool CheckTag(HSQUIRRELVM v,SQREADFUNC read,SQUserPointer up,SQUn...
function WriteObject (line 368) | static bool WriteObject(HSQUIRRELVM v,SQUserPointer up,SQWRITEFUNC write...
function ReadObject (line 391) | static bool ReadObject(HSQUIRRELVM v,SQUserPointer up,SQREADFUNC read,SQ...
FILE: squirrel/sqobject.h
type SQSharedState (line 13) | struct SQSharedState
type SQMetaMethod (line 37) | enum SQMetaMethod{
type SQRefCounted (line 70) | struct SQRefCounted
function SQRefCounted (line 81) | struct SQWeakRef : SQRefCounted
type SQObjectPtr (line 90) | struct SQObjectPtr
function SQObject (line 191) | struct SQObjectPtr : public SQObject
function Null (line 284) | inline void Null()
function _Swap (line 297) | inline void _Swap(SQObject &a,SQObject &b)
function SQRefCounted (line 307) | struct SQCollectable : public SQRefCounted {
function SQRefCounted (line 329) | struct SQRefCountedWithSharedState : public SQRefCounted
function CHAINABLE_OBJ (line 340) | struct SQDelegable : public CHAINABLE_OBJ {
function SQUnsignedInteger (line 346) | inline SQUnsignedInteger TranslateIndex(const SQObjectPtr &idx)
type sqvector (line 358) | typedef sqvector<SQObjectPtr> SQObjectPtrVec;
type sqvector (line 359) | typedef sqvector<SQInteger> SQIntVec;
FILE: squirrel/sqstate.cpp
function CompileTypemask (line 37) | bool CompileTypemask(SQIntVec &res,const char *typemask)
function SQClass (line 78) | static SQClass *CreateBuiltInTypeClass(SQSharedState *ss, const char *na...
function SQInteger (line 251) | SQInteger SQSharedState::GetMetaMethodIdxByName(const SQObjectPtr &name)
function SQInteger (line 311) | SQInteger SQSharedState::ResurrectUnreachable(SQVM *vm)
function SQInteger (line 366) | SQInteger SQSharedState::CollectGarbage(SQVM *vm)
function SQUnsignedInteger (line 478) | SQUnsignedInteger RefTable::GetRefCount(SQObject &obj)
function SQBool (line 487) | SQBool RefTable::Release(SQObject &obj)
function SQString (line 627) | SQString *SQStringTable::Add(const char *news,SQInteger len)
FILE: squirrel/sqstate.h
type SQString (line 7) | struct SQString
type SQTable (line 8) | struct SQTable
type SQStringTable (line 10) | struct SQStringTable
type RefTable (line 25) | struct RefTable {
type SQObjectPtr (line 56) | struct SQObjectPtr
function enableCompilationOption (line 58) | struct SQSharedState
function disableCompilationOption (line 72) | void disableCompilationOption(SQUnsignedInteger co) {
FILE: squirrel/sqstring.h
function SQHash (line 5) | inline SQHash _hashstr_lua5(const char *s, size_t l)
function SQHash (line 14) | inline SQHash _hashstr_djb2(const char *s, size_t l)
function _hashstr_fnv1a (line 26) | inline uint32_t _hashstr_fnv1a(const char *s, size_t l)
function _hashstr_fnv1a_64 (line 36) | inline uint64_t _hashstr_fnv1a_64(const char *s, size_t l)
function SQHash (line 48) | inline SQHash _hashstr (const char *s, size_t l){return _hashstr_fnv1a_6...
function SQHash (line 50) | inline SQHash _hashstr (const char *s, size_t l){return _hashstr_fnv1a(s...
function SQRefCounted (line 53) | struct SQString : public SQRefCounted
FILE: squirrel/sqstringlib.cpp
function __strip_l (line 7) | static void __strip_l(const char *str,const char **start)
function __strip_r (line 14) | static void __strip_r(const char *str,SQInteger len,const char **end)
function SQInteger (line 25) | SQInteger _sq_string_strip_impl(HSQUIRRELVM v, SQInteger arg_stack_start)
function SQInteger (line 36) | SQInteger _sq_string_lstrip_impl(HSQUIRRELVM v, SQInteger arg_stack_start)
function SQInteger (line 45) | SQInteger _sq_string_rstrip_impl(HSQUIRRELVM v, SQInteger arg_stack_start)
function SQInteger (line 55) | SQInteger _sq_string_split_by_chars_impl(HSQUIRRELVM v, SQInteger arg_st...
function SQInteger (line 94) | SQInteger _sq_string_escape_impl(HSQUIRRELVM v, SQInteger arg_stack_start)
function SQInteger (line 155) | SQInteger _sq_string_startswith_impl(HSQUIRRELVM v, SQInteger arg_stack_...
function SQInteger (line 169) | SQInteger _sq_string_endswith_impl(HSQUIRRELVM v, SQInteger arg_stack_st...
FILE: squirrel/sqtable.cpp
function class_type_hash_update_1 (line 23) | static inline uint64_t class_type_hash_update_1(uint64_t hashval, uint8_...
function class_type_hash_update_4 (line 27) | static inline uint64_t class_type_hash_update_4(uint64_t hashval, uint32...
function SQTable (line 113) | SQTable *SQTable::Clone()
function VarTrace (line 179) | VarTrace * SQTable::GetVarTracePtr(const SQObjectPtr &key)
function SQInteger (line 270) | SQInteger SQTable::Next(bool getweakrefs,const SQObjectPtr &__restrict r...
FILE: squirrel/sqtable.h
function SQUnsignedInteger32 (line 19) | inline SQUnsignedInteger32 sq_float_hash32(float v)
function SQHash (line 26) | inline SQHash HashObj(const SQObject &key)
function SQDelegable (line 36) | struct SQTable : public SQDelegable
function SQObjectType (line 83) | SQObjectType GetType() {return OT_TABLE;}
function _HashNode (line 85) | inline _HashNode *_GetStr(const SQRawObjectVal key, SQHash hash) const
function _HashNode (line 95) | inline _HashNode *_Get(const SQObjectPtr &key, SQHash hash) const
function GetStr (line 106) | inline bool GetStr(const char* key,SQInteger keylen,SQObjectPtr &val) const
function _HashNode (line 129) | inline _HashNode *GetNodeFromTypeHint(uint64_t hint, const SQObjectPtr &...
function SQInteger (line 150) | SQInteger CountUsed(){ return _usednodes;}
function SQInteger (line 151) | SQInteger AllocatedNodes(){ return _numofnodes_minus_one + 1; }
function Release (line 154) | void Release()
FILE: squirrel/squserdata.h
function SQDelegable (line 5) | struct SQUserData : SQDelegable
FILE: squirrel/squtils.h
type SQAllocContextT (line 7) | struct SQAllocContextT
function copy (line 61) | void copy(const sqvector<T>& v)
function reserve (line 86) | void reserve(size_type newsize) { _realloc(newsize); }
function clear (line 104) | void clear() { resize(0); }
function shrinktofit (line 105) | void shrinktofit() { if(_size > 4) { _realloc(_size); } }
function remove (line 133) | void remove(size_type idx)
function size_type (line 141) | size_type capacity() { return _allocated; }
function T (line 143) | inline T& operator[](size_type pos) const{ return _vals[pos]; }
type T (line 147) | typedef T* iterator;
type T (line 148) | typedef const T* const_iterator;
function iterator (line 150) | iterator begin() { return &_vals[0]; }
function iterator (line 152) | iterator end() { return &_vals[_size]; }
function _releasedata (line 161) | void _releasedata()
FILE: squirrel/sqvm.cpp
function propagate_immutable (line 26) | static inline void propagate_immutable(const SQObject &obj, SQObject &sl...
function check_typemask (line 32) | static inline bool check_typemask(SQObjectType tp, SQInteger typemask)
function SQRESULT (line 720) | SQRESULT SQVM::Suspend()
function SQInteger (line 2122) | SQInteger SQVM::GetImpl(const SQObjectPtr &self, const SQObjectPtr &key,...
function SQClass (line 2197) | SQClass* SQVM::GetBuiltInClassForType(SQObjectType type)
function SQInteger (line 2228) | SQInteger SQVM::FallBackGet(const SQObjectPtr &self,const SQObjectPtr &k...
function SQInteger (line 2314) | SQInteger SQVM::FallBackSet(const SQObjectPtr &self,const SQObjectPtr &k...
function SQObjectPtr (line 2695) | SQObjectPtr &SQVM::Top() { return _stack[_top-1]; }
function SQObjectPtr (line 2696) | SQObjectPtr &SQVM::PopGet() {
function SQObjectPtr (line 2700) | SQObjectPtr &SQVM::GetUp(SQInteger n) {
function SQObjectPtr (line 2704) | SQObjectPtr &SQVM::GetAt(SQInteger n) {
FILE: squirrel/sqvm.h
function SQExceptionTrap (line 27) | struct SQExceptionTrap{
type sqvector (line 38) | typedef sqvector<SQExceptionTrap> ExceptionsTraps;
function CHAINABLE_OBJ (line 40) | struct SQVM : public CHAINABLE_OBJ
function AutoDec (line 225) | struct AutoDec{
function SQObjectPtr (line 231) | inline SQObjectPtr &stack_get(HSQUIRRELVM v,SQInteger idx){return ((idx>...
FILE: squirrel/vartrace.h
function clear (line 14) | struct VarTrace
type sqvector (line 91) | typedef sqvector<VarTrace> SQVarTraceVec;
FILE: testRunner.py
function xprint (line 29) | def xprint(str, color = ''):
function computePath (line 40) | def computePath(path, *paths):
function compareFilesLineByLine (line 44) | def compareFilesLineByLine(marker, testFile, actualFile, expectedFile):
function updateExpectedFromActualIfNeed (line 75) | def updateExpectedFromActualIfNeed(marker, actualFile, expectedFile):
function runTestGeneric (line 84) | def runTestGeneric(compiler, workingDir, dirname, name, kind, suffix, ex...
function runDiagTest (line 162) | def runDiagTest(compiler, workingDir, dirname, name):
function runSATest (line 165) | def runSATest(compiler, workingDir, dirname, name):
function runExecuteTest (line 168) | def runExecuteTest(compiler, workingDir, dirname, name):
function runParseTypesTest (line 171) | def runParseTypesTest(compiler, workingDir, dirname, name):
function runASTTest (line 174) | def runASTTest(compiler, workingDir, dirname, name):
function runTestForData (line 178) | def runTestForData(filePath, compiler, workingDir, testMode):
function collectTests (line 206) | def collectTests(subdir, mode):
function checkCompiler (line 211) | def checkCompiler(compiler):
function main (line 227) | def main():
Condensed preview — 1558 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,028K chars).
[
{
"path": ".github/workflows/docs_build_deploy.yaml",
"chars": 1984,
"preview": "name: Docs - build and deploy\n\non:\n push:\n branches:\n - master\n paths:\n - \"doc/**\"\n\n workflow_dispatch:\n\nj"
},
{
"path": ".gitignore",
"chars": 193,
"preview": "# Folders created at compilation\nbin/\nlib/\n\n# CMake output\nbuild*/\n\n# Folders created at documentation generation\ndoc/bu"
},
{
"path": ".travis.yml",
"chars": 337,
"preview": "language: cpp\ncompiler:\n - gcc\n - clang\n\n# Travis VMs are 64-bit but we compile both for 32 and 64 bit. To enable the\n"
},
{
"path": "CMakeLists.txt",
"chars": 2019,
"preview": "cmake_minimum_required(VERSION 3.5)\nproject(squirrel VERSION 4.0 LANGUAGES C CXX)\n\noption(ENABLE_VAR_TRACE \"Enable varia"
},
{
"path": "COPYRIGHT",
"chars": 1179,
"preview": "Copyright (c) 2003-2017 Alberto Demichelis\nCopyright (c) 2016-2024 Gaijin Games KFT\n\nPermission is hereby granted, free "
},
{
"path": "HISTORY",
"chars": 24403,
"preview": "***version 4.5.0***\n* add 'let' keyword and unsassignable named bindings\n\n***version 4.4.0***\n* base lib: container meth"
},
{
"path": "README.md",
"chars": 1652,
"preview": "# Quirrel\n\nQuirrel is a fast, high-level imperative programming language, designed to be a lightweight but powerful\nscri"
},
{
"path": "appveyor.yml",
"chars": 617,
"preview": "version: 0.0.{build}\n\nplatform:\n - x86\n - x64\n\nconfiguration:\n - Debug\n - Release\n\nclone_folder: c:\\sq\n\nbefore_build:\n -"
},
{
"path": "doc/.gitignore",
"chars": 12,
"preview": "build\n*.pyc\n"
},
{
"path": "doc/Makefile",
"chars": 7693,
"preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHINXBUILD "
},
{
"path": "doc/make.bat",
"chars": 7743,
"preview": "@ECHO OFF\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n set SPHINXBUILD=sphinx-build\r\n"
},
{
"path": "doc/repl/.gitignore",
"chars": 6,
"preview": "build\n"
},
{
"path": "doc/repl/CMakeLists.txt",
"chars": 1998,
"preview": "cmake_minimum_required(VERSION 3.5)\nproject(sqjsrepl VERSION 4.0 LANGUAGES C CXX)\n\noption(ENABLE_VAR_TRACE \"Enable varia"
},
{
"path": "doc/repl/build.txt",
"chars": 104,
"preview": "Build instructions:\n\n* Install Emscripten SDK\n* mkdir build\n* cd build\n* emcmake cmake ..\n* emmake make\n"
},
{
"path": "doc/repl/native.cpp",
"chars": 4526,
"preview": "#include \"../../include/squirrel.h\"\n#include \"../../include/sqstdaux.h\"\n#include \"../../sqmodules/sqmodules.h\"\n#include "
},
{
"path": "doc/repl/static/repl-rst.css",
"chars": 1071,
"preview": "#repl-root {\n display: none; /* shown by script after initialization */\n}\n\n.editor-container {\n flex: 1;\n width: 100%"
},
{
"path": "doc/repl/static/repl.css",
"chars": 1014,
"preview": "#repl-root {\n display: none; /* shown by script after initialization */\n height: 100vh;\n}\n\n.editor-container {\n flex:"
},
{
"path": "doc/repl/static/repl.html",
"chars": 907,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>Quirrel REPL</title>\n <link rel=\"stylesheet\" href=\"repl.css\" media=\"al"
},
{
"path": "doc/repl/static/replmain.js",
"chars": 694,
"preview": "// Setup editor\nconst sourceEditor = ace.edit(\"source-editor\")\nsourceEditor.setShowPrintMargin(false)\nsourceEditor.setVa"
},
{
"path": "doc/requirements.txt",
"chars": 57,
"preview": "Sphinx==8.2.3\nmyst-parser==4.0.1\nsphinx-rtd-theme==3.0.2\n"
},
{
"path": "doc/source/_static/custom.css",
"chars": 820,
"preview": ".toggle .header {\n display: block;\n clear: both;\n}\n\n.toggle .header:after {\n content: \" ▶\";\n}\n\n.toggle .header"
},
{
"path": "doc/source/_templates/page.html",
"chars": 414,
"preview": "{% extends \"!page.html\" %}\n\n{% block footer %}\n <script type=\"text/javascript\">\n $(document).ready(function() {\n "
},
{
"path": "doc/source/conf.py",
"chars": 10175,
"preview": "# -*- coding: utf-8 -*-\n#\n# Quirrel documentation build configuration file, created by\n# sphinx-quickstart on Sun Jan 31"
},
{
"path": "doc/source/diff_from_squirrel.rst",
"chars": 9215,
"preview": ".. _diff_from_squirrel:\n\n*******************************************\nDifferences from Squirrel language\n****************"
},
{
"path": "doc/source/index.rst",
"chars": 580,
"preview": ".. Quirrel documentation master file, created by\n sphinx-quickstart on Sun Jan 31 00:26:52 2016.\n You can adapt this"
},
{
"path": "doc/source/introduction.rst",
"chars": 4286,
"preview": ".. _introduction:\n\n************\nIntroduction\n************\n\n.. index::\n single: introduction\n\nQuirrel is a fast, high-"
},
{
"path": "doc/source/modules/bindings.rst",
"chars": 9186,
"preview": "Quirrel bindings\n-----------------------------------\n\nGuide in bindings\n=================\n\nNot full guide but some brief"
},
{
"path": "doc/source/modules/index.rst",
"chars": 4846,
"preview": ".. _index:\n\n************\nModules\n************\n\nProject source code is available at https://github.com/GaijinEntertainmen"
},
{
"path": "doc/source/quirrel.py",
"chars": 16471,
"preview": "# -*- coding: utf-8 -*-\n\"\"\"\n quirrel\n ~~~~~~~~~~~~~~~~~~~~~~~~~\n\n The Quirrel domain.\n\n :copyright: Copyrigh"
},
{
"path": "doc/source/quirrel_pygment_lexer.py",
"chars": 4867,
"preview": "\"\"\"\n pygments.lexers.quirrel\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n Lexers for Quirrel.\n :copyright: Copyright 2022 by"
},
{
"path": "doc/source/reference/api/bytecode_serialization.rst",
"chars": 1174,
"preview": ".. _api_ref_bytecode_serialization:\n\n======================\nBytecode serialization\n======================\n\n.. _sq_readcl"
},
{
"path": "doc/source/reference/api/calls.rst",
"chars": 4431,
"preview": ".. _api_ref_calls:\n\n=====\nCalls\n=====\n\n.. _sq_call:\n\n.. c:function:: SQRESULT sq_call(HSQUIRRELVM v, SQInteger params, S"
},
{
"path": "doc/source/reference/api/compiler.rst",
"chars": 2827,
"preview": ".. _api_ref_compiler:\n\n========\nCompiler\n========\n\n\n.. _sq_compile:\n\n.. c:function:: SQRESULT sq_compile(HSQUIRRELVM v, "
},
{
"path": "doc/source/reference/api/debug_interface.rst",
"chars": 2530,
"preview": ".. _api_ref_debug_interface:\n\n===============\nDebug interface\n===============\n\n.. _sq_getfunctioninfo:\n\n.. c:function:: "
},
{
"path": "doc/source/reference/api/garbage_collector.rst",
"chars": 862,
"preview": ".. _api_ref_garbage_collector:\n\n=================\nGarbage Collector\n=================\n\n.. _sq_collectgarbage:\n\n.. c:func"
},
{
"path": "doc/source/reference/api/object_creation_and_handling.rst",
"chars": 20908,
"preview": ".. _api_ref_object_creation_and_handling:\n\n============================\nObject creation and handling\n==================="
},
{
"path": "doc/source/reference/api/object_manipulation.rst",
"chars": 11759,
"preview": ".. _api_ref_object_manipulation:\n\n====================\nObject manipulation\n====================\n\n.. _sq_arrayappend:\n\n.."
},
{
"path": "doc/source/reference/api/raw_object_handling.rst",
"chars": 3734,
"preview": ".. _api_ref_raw_object_handling:\n\n===================\nRaw object handling\n===================\n\n.. _sq_addref:\n\n.. c:func"
},
{
"path": "doc/source/reference/api/stack_operations.rst",
"chars": 2210,
"preview": ".. _api_ref_stack_operations:\n\n================\nStack Operations\n================\n\n.. _sq_cmp:\n\n.. c:function:: SQIntege"
},
{
"path": "doc/source/reference/api/virtual_machine.rst",
"chars": 8452,
"preview": ".. _api_ref_virtual_machine:\n\n===============\nVirtual Machine\n===============\n\n\n.. _sq_close:\n\n.. c:function:: void sq_c"
},
{
"path": "doc/source/reference/api_reference.rst",
"chars": 361,
"preview": ".. _api_reference:\n\n\n*************\nAPI Reference\n*************\n\n.. toctree::\n api/virtual_machine.rst\n api/compiler."
},
{
"path": "doc/source/reference/embedding/build_configuration.rst",
"chars": 1780,
"preview": ".. _embedding_build_configuration:\n\n========================\nBuild Configuration\n========================\n\n.. _squirrel_"
},
{
"path": "doc/source/reference/embedding/calling_a_function.rst",
"chars": 875,
"preview": ".. _embedding_calling_a_function:\n\n==================\nCalling a function\n==================\n\nTo call a quirrel function "
},
{
"path": "doc/source/reference/embedding/compiling_a_script.rst",
"chars": 1731,
"preview": ".. embedding_compiling_a_script:\n\n==================\nCompiling a script\n==================\n\nYou can compile a Quirrel sc"
},
{
"path": "doc/source/reference/embedding/creating_a_c_function.rst",
"chars": 3693,
"preview": ".. _embedding_creating_a_c_function:\n\n===================\nCreate a C function\n===================\n\nA native C function m"
},
{
"path": "doc/source/reference/embedding/debug_interface.rst",
"chars": 2029,
"preview": ".. _embedding_debug_interface:\n\n===============\nDebug Interface\n===============\n\nThe quirrel VM exposes a very simple de"
},
{
"path": "doc/source/reference/embedding/error_conventions.rst",
"chars": 432,
"preview": ".. _embedding_error_convetions:\n\n\n========================\nError Conventions\n========================\n\n.. index::\n si"
},
{
"path": "doc/source/reference/embedding/memory_management.rst",
"chars": 1327,
"preview": ".. _embedding_memory_management:\n\n========================\nMemory Management\n========================\n\n.. index:: single"
},
{
"path": "doc/source/reference/embedding/references_from_c.rst",
"chars": 872,
"preview": ".. embedding_references_from_c:\n\n========================================================\nMantaining references to Quirr"
},
{
"path": "doc/source/reference/embedding/runtime_error_handling.rst",
"chars": 746,
"preview": ".. _embedding_runtime_error_handling:\n\n======================\nRuntime error handling\n======================\n\nWhen an exc"
},
{
"path": "doc/source/reference/embedding/tables_and_arrays_manipulation.rst",
"chars": 1974,
"preview": ".. _embedding_tables_and_arrays_manipulation:\n\n==============================\nTables and arrays manipulation\n==========="
},
{
"path": "doc/source/reference/embedding/the_registry_table.rst",
"chars": 543,
"preview": ".. _embedding_the_registry_table:\n\n==================\nThe registry table\n==================\n\nThe registry table is an hi"
},
{
"path": "doc/source/reference/embedding/the_stack.rst",
"chars": 3845,
"preview": ".. _embedding_the_stack:\n\n\n==========\nThe Stack\n==========\n\nQuirrel exchanges values with the virtual machine through a "
},
{
"path": "doc/source/reference/embedding/userdata_and_userpointers.rst",
"chars": 1633,
"preview": ".. _embedding_userdata_and_userpointers:\n\n=========================\nUserdata and UserPointers\n=========================\n"
},
{
"path": "doc/source/reference/embedding/vm_initialization.rst",
"chars": 646,
"preview": ".. _embedding_vm_initialization:\n\n==============================\nVirtual Machine Initialization\n========================"
},
{
"path": "doc/source/reference/embedding_squirrel.rst",
"chars": 1130,
"preview": ".. _embedding_squirrel:\n\n***************************\n Embedding Quirrel\n***************************\n\n*This section desc"
},
{
"path": "doc/source/reference/index.rst",
"chars": 1430,
"preview": ".. _reference:\n\n#####################################\n Quirrel |version| Reference Manual\n#############################"
},
{
"path": "doc/source/reference/language/arrays.rst",
"chars": 520,
"preview": ".. _arrays:\n\n\n=================\nArrays\n=================\n\n.. index::\n single: Arrays\n\nAn array is a sequence of value"
},
{
"path": "doc/source/reference/language/builtin_functions.rst",
"chars": 30490,
"preview": ".. _builtin_functions:\n\n\n==================\nBuilt-in Functions\n==================\n\n.. index::\n single: Built-in Funct"
},
{
"path": "doc/source/reference/language/classes.rst",
"chars": 9151,
"preview": ".. _classes:\n\n\n=================\nClasses\n=================\n\n.. index::\n single: Classes\n\nQuirrel implements a class m"
},
{
"path": "doc/source/reference/language/compiler_directives.rst",
"chars": 2467,
"preview": ".. _compiler_directives:\n\n\n=========================\nCompiler directives\n=========================\n\n.. index::\n singl"
},
{
"path": "doc/source/reference/language/constants_and_enumerations.rst",
"chars": 4619,
"preview": ".. _constants_and_enumerations:\n\n\n========================\nConstants & Enumerations\n========================\n\n.. index::"
},
{
"path": "doc/source/reference/language/datatypes.rst",
"chars": 4808,
"preview": ".. _datatypes_and_values:\n\n=====================\nValues and Data types\n=====================\n\nWhile Quirrel is a dynamic"
},
{
"path": "doc/source/reference/language/destructuring_assignment.rst",
"chars": 2758,
"preview": ".. _destructuring_assignment:\n\n\n=========================\nDestructuring assignment\n=========================\n\n.. index::"
},
{
"path": "doc/source/reference/language/expressions.rst",
"chars": 12871,
"preview": ".. _expressions:\n\n\n=================\nExpressions\n=================\n\n.. index::\n single: Expressions\n\n----------------"
},
{
"path": "doc/source/reference/language/functions.rst",
"chars": 10062,
"preview": ".. _functions:\n\n\n=================\nFunctions\n=================\n\n.. index::\n single: Functions\n\nFunctions are first-cl"
},
{
"path": "doc/source/reference/language/generators.rst",
"chars": 1620,
"preview": ".. _generators:\n\n\n=================\nGenerators\n=================\n\n.. index::\n single: Generators\n\nA function that con"
},
{
"path": "doc/source/reference/language/lexical_structure.rst",
"chars": 6443,
"preview": ".. _lexical_structure:\n\n\n=================\nLexical Structure\n=================\n\n.. index:: single: lexical structure\n\n--"
},
{
"path": "doc/source/reference/language/limitations.rst",
"chars": 263,
"preview": ".. _limitation:\n\n\n=================\nLimitations\n=================\n\n.. index::\n single: Limitations\n\nQuirrel has a num"
},
{
"path": "doc/source/reference/language/metamethods.rst",
"chars": 4588,
"preview": ".. _metamethods:\n\n-----------\nMetamethods\n-----------\n\nMetamethods are a mechanism that allows the customization of cert"
},
{
"path": "doc/source/reference/language/statements.rst",
"chars": 9977,
"preview": ".. _statements:\n\n\n=================\nStatements\n=================\n\n.. index::\n single: statements\n\nA quirrel program i"
},
{
"path": "doc/source/reference/language/string_interpolation.rst",
"chars": 984,
"preview": ".. _string_interpolation:\n\n\n========================\n$ - String interpolation\n========================\n\n.. index::\n s"
},
{
"path": "doc/source/reference/language/tables.rst",
"chars": 1611,
"preview": ".. _tables:\n\n\n=================\nTables\n=================\n\n.. index::\n single: Tables\n\nTables are associative containe"
},
{
"path": "doc/source/reference/language/threads.rst",
"chars": 3371,
"preview": ".. _threads:\n\n\n========================\nThreads\n========================\n\n.. index::\n single: Threads\n\nQuirrel suppor"
},
{
"path": "doc/source/reference/language/type_annotations.rst",
"chars": 5263,
"preview": ".. _type_annotations:\n\n\nType Annotations in Quirrel\n===========================\n\nQuirrel extends the Squirrel language "
},
{
"path": "doc/source/reference/language/weak_references.rst",
"chars": 2227,
"preview": ".. _weak_references:\n\n\n========================\nWeak References\n========================\n\n.. index::\n single: Weak Re"
},
{
"path": "doc/source/reference/language.rst",
"chars": 760,
"preview": ".. _thelanguage:\n\n***************************\n The language\n***************************\nProject source code is availabl"
},
{
"path": "doc/source/repl/index.rst",
"chars": 2179,
"preview": ".. _repl:\n\n######################################\n Try Quirrel online\n######################################\n\n.. raw:: "
},
{
"path": "doc/source/rfcs/README.md",
"chars": 2578,
"preview": "# RFC process\n\n## Background\n\nWhenever Quirrel language changes its syntax or semantics (including behavior of builtin l"
},
{
"path": "doc/source/rfcs/STATUS.md",
"chars": 4145,
"preview": "# RFCs\n\nThis document tracks RFCs, both implemented and not implemented (implemented RFC should eventually go way from "
},
{
"path": "doc/source/stdlib/index.rst",
"chars": 1542,
"preview": ".. _stdlib:\n\n######################################\n Quirrel |version| Standard Library\n###############################"
},
{
"path": "doc/source/stdlib/introduction.rst",
"chars": 843,
"preview": ".. _stdlib_introduction:\n\n============\nIntroduction\n============\n\nThe squirrel standard libraries consist in a set of mo"
},
{
"path": "doc/source/stdlib/stdauxlib.rst",
"chars": 1174,
"preview": ".. _stdlib_stdauxlib:\n\n===============\nThe Aux library\n===============\n\nThe aux library implements default handlers for "
},
{
"path": "doc/source/stdlib/stddatetimelib.rst",
"chars": 2156,
"preview": ".. _stdlib_stddatetimelib:\n\n====================\nThe Datetime library\n====================\n\nThe datetime library date an"
},
{
"path": "doc/source/stdlib/stddebuglib.rst",
"chars": 2900,
"preview": ".. _stdlib_stddebuglib:\n\n========================\nThe Debug library\n========================\n\nthe library implements som"
},
{
"path": "doc/source/stdlib/stdiolib.rst",
"chars": 10701,
"preview": ".. _stdlib_stdiolib:\n\n========================\nThe Input/Output library\n========================\n\nthe i/o library implem"
},
{
"path": "doc/source/stdlib/stdiostreamlib.rst",
"chars": 9426,
"preview": ".. _stdlib_stdbloblib:\n\n====================\nThe IOstream library\n====================\nThe iostream library implements b"
},
{
"path": "doc/source/stdlib/stdmathlib.rst",
"chars": 2487,
"preview": ".. _stdlib_stdmathlib:\n\n================\nThe Math library\n================\n\nthe math lib provides basic mathematic routi"
},
{
"path": "doc/source/stdlib/stdstringlib.rst",
"chars": 14394,
"preview": ".. _stdlib_stdstringlib:\n\n==================\nThe String library\n==================\n\nthe string lib implements string for"
},
{
"path": "doc/source/stdlib/stdsystemlib.rst",
"chars": 1090,
"preview": ".. _stdlib_stdsystemlib:\n\n==================\nThe System library\n==================\n\nThe system library exposes operating"
},
{
"path": "helpers/keyValueFile.h",
"chars": 9169,
"preview": "#pragma once\n\n#include <string.h>\n#include <string>\n#include <vector>\n#include <fstream>\n#include <streambuf>\n\n\n//file e"
},
{
"path": "include/sq_char_class.h",
"chars": 1660,
"preview": "#pragma once\n\ninline bool sq_isalnum(int c)\n{\n unsigned char uc = c;\n return (uc >= 'a' && uc <= 'z') || (uc >= 'A"
},
{
"path": "include/sqconfig.h",
"chars": 2181,
"preview": "#ifndef _SQ64\n#define _SQ64 // always use 64 bit Integers (even on 32 bit platform)\n#endif\n\n#define __STDC_FORMAT_MACROS"
},
{
"path": "include/sqext.h",
"chars": 519,
"preview": "/*\n * Squirrel API extensions\n * Copyright (C) 2023 Gaijin Games KFT. All rights reserved\n */\n#ifndef _SQEXT_H_\n#defin"
},
{
"path": "include/sqio.h",
"chars": 3657,
"preview": "#ifndef _SQASTIO_H_\n#define _SQASTIO_H_ 1\n\n#include <stdint.h>\n#include <iostream>\n#include <stdio.h>\n\n#include \"squirre"
},
{
"path": "include/sqstdaux.h",
"chars": 463,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_AUXLIB_H_\n#define _SQSTD_AUXLIB_H_\n\n#ifdef __cplusplus\nextern \""
},
{
"path": "include/sqstdblob.h",
"chars": 492,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTDBLOB_H_\n#define _SQSTDBLOB_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#"
},
{
"path": "include/sqstddatetime.h",
"chars": 288,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_DATETIMELIB_H_\n#define _SQSTD_DATETIMELIB_H_\n\n#ifdef __cplusplu"
},
{
"path": "include/sqstddebug.h",
"chars": 265,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_DEBUG_H_\n#define _SQSTD_DEBUG_H_\n\n#ifdef __cplusplus\nextern \"C\""
},
{
"path": "include/sqstdio.h",
"chars": 1993,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTDIO_H_\n#define _SQSTDIO_H_\n\n#ifdef __cplusplus\n\n#define SQSTD_STR"
},
{
"path": "include/sqstdmath.h",
"chars": 261,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_MATH_H_\n#define _SQSTD_MATH_H_\n\n#ifdef __cplusplus\nextern \"C\" {"
},
{
"path": "include/sqstdstring.h",
"chars": 1251,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_STRING_H_\n#define _SQSTD_STRING_H_\n\n#ifdef __cplusplus\nextern \""
},
{
"path": "include/sqstdsystem.h",
"chars": 375,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_SYSTEMLIB_H_\n#define _SQSTD_SYSTEMLIB_H_\n\n#ifdef __cplusplus\nex"
},
{
"path": "include/squirrel.h",
"chars": 27216,
"preview": "/*\nCopyright (c) 2003-2017 Alberto Demichelis\nCopyright (c) 2016-2023 by Gaijin Games KFT\n\nPermission is hereby granted,"
},
{
"path": "internal/sq_safe_shift.h",
"chars": 2899,
"preview": "#pragma once\n#ifndef SQ_SAFE_SHIFT_H\n#define SQ_SAFE_SHIFT_H\n\n#include <sqconfig.h>\n\n#include <limits>\n#include <type_tr"
},
{
"path": "internal/sqstringlib.h",
"chars": 582,
"preview": "#pragma once\n\n#include <squirrel.h>\n\nSQInteger _sq_string_strip_impl(HSQUIRRELVM v, SQInteger arg_stack_start);\nSQIntege"
},
{
"path": "scripts/samples/ackermann.nut",
"chars": 388,
"preview": "/*\n*\n* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/)\n*\n*/\n\nlet {max} = require(\"mat"
},
{
"path": "scripts/samples/array.nut",
"chars": 398,
"preview": "/*\n*\n* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/)\n*\n*/\nlocal n, i, k\n\nif (vargv."
},
{
"path": "scripts/samples/class.nut",
"chars": 630,
"preview": "class BaseVector {\n constructor(...) {\n if (vargv.len() >= 3) {\n this.x = vargv[0]\n "
},
{
"path": "scripts/samples/fibonacci.nut",
"chars": 241,
"preview": "/*\n*\n* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/)\n*\n*/\n\nfunction fib(n) {\n if"
},
{
"path": "scripts/samples/flow.nut",
"chars": 582,
"preview": "#allow-switch-statement\n\nlet {min, max} = require(\"math\")\n\nif (min(100,200) > max(50,20))\n println(\"I'm useless state"
},
{
"path": "scripts/samples/generators.nut",
"chars": 726,
"preview": "/*\n*Random number function from The Great Computer Language shootout\n*converted to a generator func\n*/\n\nfunction gen_ran"
},
{
"path": "scripts/samples/hello.nut",
"chars": 24,
"preview": "println(\"Hello World!\")\n"
},
{
"path": "scripts/samples/list.nut",
"chars": 704,
"preview": "/*translation of the list test from The Great Computer Language Shootout\n*/\n\nfunction compare_arr(a1,a2) {\n foreach(i"
},
{
"path": "scripts/samples/loops.nut",
"chars": 390,
"preview": "let arr=[\"one\",\"two\",\"three\"]\n\nprint(\"FOREACH\\n\")\n\nforeach (i,val in arr) {\n println($\"index [{i}]={val}\")\n}\n\nprintln"
},
{
"path": "scripts/samples/matrix.nut",
"chars": 871,
"preview": "/*\n*\n* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/)\n*\n*/\nconst SIZE=30\n\nfunction m"
},
{
"path": "scripts/samples/metamethods.nut",
"chars": 1193,
"preview": "class Vector {\n x = 0\n y = 0\n z = 0\n constructor(x, y, z) {\n this.x = x\n this.y = y\n th"
},
{
"path": "scripts/samples/methcall.nut",
"chars": 1222,
"preview": "/*translation of the methcall test from The Great Computer Language Shootout\n*/\n\nlet datetime = require(\"datetime\")\n\ncla"
},
{
"path": "scripts/samples/module_1.nut",
"chars": 61,
"preview": "function foo() {\n return \"<call from module>\"\n}\n\nreturn foo\n"
},
{
"path": "scripts/samples/module_2.nut",
"chars": 62,
"preview": "let exports = {\n bar = \"BAR\"\n baz = \"BAZ\"\n}\n\nreturn exports\n"
},
{
"path": "scripts/samples/module_demo.nut",
"chars": 148,
"preview": "let foo = require(\"module_1.nut\")\nlet {bar, baz} = require(\"module_2.nut\")\n\nprintln($\"foo() result = {foo()}\")\nprintln($"
},
{
"path": "scripts/samples/regex.nut",
"chars": 369,
"preview": "let string = require(\"string\")\n\n{\n let ex = string.regexp(\"[a-zA-Z]+\")\n let s = \"123 Test; strlen(str);\"\n let res = e"
},
{
"path": "scripts/samples/tailstate.nut",
"chars": 386,
"preview": "local state1, state2, state3\n\nstate1 = function state1() {\n suspend(\"state1\")\n return state2()\n}\n\nstate2 = functio"
},
{
"path": "scripts/std/analyzer.nut",
"chars": 190,
"preview": "\nfunction dynamic_content(o) {\n assert(type(o) == \"table\", $\"expected table in dynamic_content(), got '{type(o)}'\")\n o"
},
{
"path": "scripts/std/functools.nut",
"chars": 9806,
"preview": "local abs = @(v) v> 0 ? v.tointeger() : -v.tointeger()\n\nlocal callableTypes = [\"function\",\"table\",\"instance\"]\nlocal func"
},
{
"path": "sq/CMakeLists.txt",
"chars": 366,
"preview": "add_executable(sq sq.cpp sq_test_natives.cpp)\n\ntarget_link_libraries(sq squirrel sqstdlib sqmodules quirrel-compiler)\nta"
},
{
"path": "sq/sq.cpp",
"chars": 17772,
"preview": "/* see copyright notice in squirrel.h */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdarg.h"
},
{
"path": "sq/sq_test_natives.cpp",
"chars": 1723,
"preview": "// Test native module for native field testing.\n// Registers \"test.native\" module with NativeVec class.\n\n#include <sqmod"
},
{
"path": "sqmodules/CMakeLists.txt",
"chars": 510,
"preview": "set(SQMODULES_SRC \n sqmodules.cpp\n helpers.cpp\n path.cpp\n deffileaccess.cpp\n)\n\n\nadd_library(sqmodules STATIC ${SQMOD"
},
{
"path": "sqmodules/deffileaccess.cpp",
"chars": 3036,
"preview": "#include \"sqmodules.h\"\n#include \"path.h\"\n#include \"helpers.h\"\n\n#ifdef _WIN32\n# include <io.h>\n#else\n# include <unistd."
},
{
"path": "sqmodules/helpers.cpp",
"chars": 889,
"preview": "#include \"helpers.h\"\n#include <cstdarg>\n\nnamespace sqm\n{\n\nSqModules::string format_string(const char *fmt, ...)\n{\n va_l"
},
{
"path": "sqmodules/helpers.h",
"chars": 177,
"preview": "#pragma once\n\n#include \"sqmodules.h\"\n\nnamespace sqm\n{\n\nSqModules::string format_string(const char *fmt, ...);\nvoid appen"
},
{
"path": "sqmodules/path.cpp",
"chars": 3245,
"preview": "#include \"path.h\"\n\n#include <algorithm>\n#include <string.h>\n\n#ifndef _WIN32\n#include <strings.h>\n#define _stricmp strcas"
},
{
"path": "sqmodules/path.h",
"chars": 200,
"preview": "#pragma once\n\nvoid dd_simplify_fname_c(char *s);\nbool dd_fname_equal(const char *fn1, const char *fn2);\nvoid dd_append_s"
},
{
"path": "sqmodules/span.h",
"chars": 3034,
"preview": "#pragma once\n#include <cstddef>\n#include <type_traits>\n#include <vector>\n#include <cassert>\n#include <sqrat.h>\n\nnamespac"
},
{
"path": "sqmodules/sqmodules.cpp",
"chars": 23900,
"preview": "#include \"sqmodules.h\"\n\n#include <sqstdmath.h>\n#include <sqstdstring.h>\n#include <sqstdblob.h>\n#include <sqstddebug.h>\n#"
},
{
"path": "sqmodules/sqmodules.h",
"chars": 6829,
"preview": "#pragma once\n\n#include <squirrel.h>\n#include <sqrat.h>\n\n#if defined(SQRAT_HAS_EASTL)\n#include <EASTL/string.h>\n#include "
},
{
"path": "sqrat/README.txt",
"chars": 217,
"preview": "Sqrat - Quirrel Binding Utility\n\n© 2009 Brandon Jones\n© 2011-2014 Li-Cheng (Andy) Tai\n© 2013-2015 Brandon Haffen AKA Wiz"
},
{
"path": "sqrat/include/sqrat/sqratAllocator.h",
"chars": 7039,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratAllocator: Custom Class Allocation/Deallocation\n//\n\n//\n// Copyrigh"
},
{
"path": "sqrat/include/sqrat/sqratArray.h",
"chars": 12338,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratArray: Array Binding\n//\n\n//\n// Copyright 2011 Alston Chen\n//\n// Th"
},
{
"path": "sqrat/include/sqrat/sqratClass.h",
"chars": 23522,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratClass: Class Binding\n//\n\n//\n// Copyright (c) 2009 Brandon Jones\n//"
},
{
"path": "sqrat/include/sqrat/sqratClassType.h",
"chars": 14916,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratClassType: Type Translators\n//\n\n//\n// Copyright (c) 2009 Brandon J"
},
{
"path": "sqrat/include/sqrat/sqratConst.h",
"chars": 2604,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratConst: Constant and Enumeration Binding\n//\n\n//\n// Copyright (c) 20"
},
{
"path": "sqrat/include/sqrat/sqratFunction.h",
"chars": 11293,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// sqratFunction: Quirrel Function Wrapper\n//\n\n//\n// Copyright (c) 2009 Br"
},
{
"path": "sqrat/include/sqrat/sqratGlobalMethods.h",
"chars": 2408,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratGlobalMethods: Global Methods\n//\n\n//\n// Copyright (c) 2009 Brandon"
},
{
"path": "sqrat/include/sqrat/sqratMemberMethods.h",
"chars": 5709,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratMemberMethods: Member Methods\n//\n\n//\n// Copyright (c) 2009 Brandon"
},
{
"path": "sqrat/include/sqrat/sqratObject.h",
"chars": 21849,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratObject: Referenced Quirrel Object Wrapper\n//\n\n//\n// Copyright (c) "
},
{
"path": "sqrat/include/sqrat/sqratScript.h",
"chars": 4415,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratScript: Script Compilation and Execution\n//\n\n//\n// Copyright (c) 2"
},
{
"path": "sqrat/include/sqrat/sqratTable.h",
"chars": 12581,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratTable: Table Binding\n//\n\n//\n// Copyright (c) 2009 Brandon Jones\n//"
},
{
"path": "sqrat/include/sqrat/sqratTypes.h",
"chars": 22328,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratTypes: Type Translators\n//\n\n//\n// Copyright (c) 2009 Brandon Jones"
},
{
"path": "sqrat/include/sqrat/sqratUtil.h",
"chars": 11174,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// SqratUtil: Quirrel Utilities\n//\n\n//\n// Copyright (c) 2009 Brandon Jones"
},
{
"path": "sqrat/include/sqrat.h",
"chars": 1287,
"preview": "// Sqrat: altered version by Gaijin Games KFT\n// Sqrat: Quirrel C++ Binding Utility\n//\n\n//\n// Copyright (c) 2009 Brandon"
},
{
"path": "sqstdlib/CMakeLists.txt",
"chars": 800,
"preview": "set(SQSTDLIB_SRC sqstdaux.cpp\n sqstdblob.cpp\n sqstddebug.cpp\n sqstdio.cp"
},
{
"path": "sqstdlib/sqstdaux.cpp",
"chars": 9980,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <sqstdaux.h>\n#include <stdio.h>\n#include <assert"
},
{
"path": "sqstdlib/sqstdblob.cpp",
"chars": 8948,
"preview": "/* see copyright notice in squirrel.h */\n#include <new>\n#include <squirrel.h>\n#include <sqstdio.h>\n#include <string.h>\n#"
},
{
"path": "sqstdlib/sqstdblobimpl.h",
"chars": 3052,
"preview": "/* see copyright notice in squirrel.h */\n#pragma once\n\nstruct SQBlob : public SQStream\n{\n SQBlob(SQAllocContext allo"
},
{
"path": "sqstdlib/sqstddatetime.cpp",
"chars": 2242,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <time.h>\n#include <stdlib.h>\n#include <stdio.h>\n"
},
{
"path": "sqstdlib/sqstddebug.cpp",
"chars": 15955,
"preview": "#include <squirrel.h>\n#include <sqstddebug.h>\n#include <sqstdaux.h>\n#include <string.h>\n#include <assert.h>\n#include <sq"
},
{
"path": "sqstdlib/sqstdhash.cpp",
"chars": 3763,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <float.h>\n#include <assert.h>\n#include <squirrel"
},
{
"path": "sqstdlib/sqstdhash.h",
"chars": 119,
"preview": "#pragma once\n\n#include <squirrel.h>\nSQInteger sq_math_hash(HSQUIRRELVM v);\nSQInteger sq_math_deep_hash(HSQUIRRELVM v);\n"
},
{
"path": "sqstdlib/sqstdio.cpp",
"chars": 10761,
"preview": "/* see copyright notice in squirrel.h */\n#include <new>\n#include <stdio.h>\n#include <squirrel.h>\n#include <sqstdio.h>\n#i"
},
{
"path": "sqstdlib/sqstdmath.cpp",
"chars": 7597,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <math.h>\n#include <stdlib.h>\n#include <sqstdmath"
},
{
"path": "sqstdlib/sqstdrex.cpp",
"chars": 23529,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <string.h>\n#include <ctype.h>\n#include <setjmp.h"
},
{
"path": "sqstdlib/sqstdserialization.cpp",
"chars": 33674,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel/sqpcheader.h>\n#include <stdint.h>\n#include <stdio.h>\n#includ"
},
{
"path": "sqstdlib/sqstdserialization.h",
"chars": 321,
"preview": "/* see copyright notice in squirrel.h */\n#pragma once\n#include <squirrel/sqpcheader.h>\n\nSQRESULT sqstd_serialize_object"
},
{
"path": "sqstdlib/sqstdstream.cpp",
"chars": 10757,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel/sqpcheader.h>\n#include <new>\n#include <stdio.h>\n#include <st"
},
{
"path": "sqstdlib/sqstdstream.h",
"chars": 836,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQSTD_STREAM_H_\n#define _SQSTD_STREAM_H_\n\nSQInteger _stream_readblob("
},
{
"path": "sqstdlib/sqstdstring.cpp",
"chars": 11089,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <sqstdstring.h>\n#include <string.h>\n#include <st"
},
{
"path": "sqstdlib/sqstdsystem.cpp",
"chars": 2746,
"preview": "/* see copyright notice in squirrel.h */\n#include <squirrel.h>\n#include <time.h>\n#include <stdlib.h>\n#include <stdio.h>\n"
},
{
"path": "squirrel/CMakeLists.txt",
"chars": 933,
"preview": "set(SQUIRREL_SRC sqapi.cpp\n sqbaselib.cpp\n sqclass.cpp\n sqdebug.cpp\n "
},
{
"path": "squirrel/ast_tools/ast_indent_render.h",
"chars": 29418,
"preview": "#pragma once\n#include <cstdio> // for snprintf\n#include \"sqio.h\"\n#include <compiler/ast.h>\n#include <compiler/sqtypepars"
},
{
"path": "squirrel/compiler/CMakeLists.txt",
"chars": 1326,
"preview": "set(COMPILER_SRC\n ast.cpp\n compilationcontext.cpp\n parser.cpp\n codegen.cpp\n constgen.cpp\n sqio.cpp\n "
},
{
"path": "squirrel/compiler/COPYRIGHT",
"chars": 1179,
"preview": "Copyright (c) 2003-2017 Alberto Demichelis\nCopyright (c) 2016-2024 Gaijin Games KFT\n\nPermission is hereby granted, free "
},
{
"path": "squirrel/compiler/arena.h",
"chars": 7574,
"preview": "#pragma once\n\n#include \"squtils.h\"\n\n#include <cstring>\n#include <memory>\n\n#include <map>\n#include <set>\n#include <unorde"
},
{
"path": "squirrel/compiler/ast.cpp",
"chars": 20803,
"preview": "#include \"ast.h\"\n\nnamespace SQCompilation {\n\n#define DEF_TREE_OP(arg) #arg\n\nconst char* sq_tree_op_names[] = {\n TREE_"
},
{
"path": "squirrel/compiler/ast.h",
"chars": 55198,
"preview": "#pragma once\n\n#include <assert.h>\n#include \"squirrel.h\"\n#include \"squtils.h\"\n#include \"arena.h\"\n#include \"sqobject.h\"\n#i"
},
{
"path": "squirrel/compiler/codegen.cpp",
"chars": 94173,
"preview": "#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include \"opcodes.h\"\n#include \"sqstring.h\"\n#include \"sqfuncproto.h\"\n#include"
},
{
"path": "squirrel/compiler/codegen.h",
"chars": 7011,
"preview": "#pragma once\n\n#include \"ast.h\"\n#include \"opcodes.h\"\n#include \"compilationcontext.h\"\n\nstruct SQFuncState;\n\nnamespace SQCo"
},
{
"path": "squirrel/compiler/compilationcontext.cpp",
"chars": 9055,
"preview": "\n#include <assert.h>\n#include <memory.h>\n#include <sqconfig.h>\n#include \"compilationcontext.h\"\n#include \"sqstring.h\"\n#in"
},
{
"path": "squirrel/compiler/compilationcontext.h",
"chars": 24014,
"preview": "#pragma once\n\n#include <string>\n#include <stdint.h>\n#include <stdarg.h>\n#include <vector>\n#include \"squirrel.h\"\n#include"
},
{
"path": "squirrel/compiler/compiler.cpp",
"chars": 5451,
"preview": "/*\n see copyright notice in squirrel.h\n*/\n#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include <stdarg.h>\n#include <a"
},
{
"path": "squirrel/compiler/compiler.h",
"chars": 1132,
"preview": "/* see copyright notice in squirrel.h */\n#pragma once\n\nstruct SQVM;\nclass OutputStream;\nclass Arena;\n\nnamespace SQCompi"
},
{
"path": "squirrel/compiler/constgen.cpp",
"chars": 13011,
"preview": "#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include <stdarg.h>\n#include \"opcodes.h\"\n#include \"sqstring.h\"\n#include \"sqf"
},
{
"path": "squirrel/compiler/constgen.h",
"chars": 5343,
"preview": "#pragma once\n\n#include \"ast.h\"\n#include \"opcodes.h\"\n#include \"compilationcontext.h\"\n#include <setjmp.h>\n\nstruct SQFuncSt"
},
{
"path": "squirrel/compiler/lex_tokens.h",
"chars": 2031,
"preview": "#pragma once\n\n#define TK_IDENTIFIER 258\n#define TK_STRING_LITERAL 259\n#define TK_INTEGER 260\n#define TK_FLOAT 26"
},
{
"path": "squirrel/compiler/lexer.cpp",
"chars": 24868,
"preview": "/*\n see copyright notice in squirrel.h\n*/\n#include \"sqpcheader.h\"\n#include <stdlib.h>\n#include <float.h>\n#include \"sq"
},
{
"path": "squirrel/compiler/lexer.h",
"chars": 2828,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQLEXER_H_\n#define _SQLEXER_H_\n\n#include \"compilationcontext.h\"\n#incl"
},
{
"path": "squirrel/compiler/optimizations/closureHoisting.cpp",
"chars": 17648,
"preview": "/*****\n\nThe basic algorithm:\n* Walk the AST top-down\n * Calculate nesting depth\n * Collect locals in each scope\n* For "
},
{
"path": "squirrel/compiler/optimizations/closureHoisting.h",
"chars": 7696,
"preview": "#pragma once\n\n#include \"../ast.h\"\n#include \"../arena.h\"\n#include \"../sqstate.h\"\n\nnamespace SQCompilation {\n\n// TODO: Uni"
},
{
"path": "squirrel/compiler/optimizer.cpp",
"chars": 24703,
"preview": "#include \"sqpcheader.h\"\n#include \"sqstring.h\"\n#include \"sqfuncproto.h\"\n#include \"sqtable.h\"\n#include \"opcodes.h\"\n#includ"
},
{
"path": "squirrel/compiler/optimizer.h",
"chars": 1126,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQOPTIMIZER_H_\n#define _SQOPTIMIZER_H_\n//////////////////////////////"
},
{
"path": "squirrel/compiler/parser.cpp",
"chars": 68017,
"preview": "#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include \"opcodes.h\"\n#include \"sqstring.h\"\n#include \"sqfuncproto.h\"\n#include"
},
{
"path": "squirrel/compiler/parser.h",
"chars": 4887,
"preview": "#pragma once\n\n#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include <algorithm>\n#include \"lexer.h\"\n#include \"lex_tokens.h"
},
{
"path": "squirrel/compiler/sourceloc.h",
"chars": 1308,
"preview": "#pragma once\n#ifndef _SQSOURCELOC_H_\n#define _SQSOURCELOC_H_\n\n#include <cstdint>\n#include <algorithm>\n\nnamespace SQCompi"
},
{
"path": "squirrel/compiler/sqdump.cpp",
"chars": 33203,
"preview": "/*\n see copyright notice in squirrel.h\n*/\n#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include \"sqstring.h\"\n#include "
},
{
"path": "squirrel/compiler/sqfuncstate.cpp",
"chars": 23654,
"preview": "/*\n see copyright notice in squirrel.h\n*/\n#include \"sqpcheader.h\"\n#ifndef NO_COMPILER\n#include \"sqstring.h\"\n#include "
},
{
"path": "squirrel/compiler/sqfuncstate.h",
"chars": 4275,
"preview": "/* see copyright notice in squirrel.h */\n#ifndef _SQFUNCSTATE_H_\n#define _SQFUNCSTATE_H_\n//////////////////////////////"
},
{
"path": "squirrel/compiler/sqio.cpp",
"chars": 5025,
"preview": "#include \"sqio.h\"\n#include <stdarg.h>\n#include <assert.h>\n#include <cstring>\n\ntypedef union {\n uint64_t v;\n uint8_t b["
},
{
"path": "squirrel/compiler/sqtypeparser.cpp",
"chars": 21099,
"preview": "#include \"sqtypeparser.h\"\n#include <sq_char_class.h>\n\n\nstruct SQRawTypeDecl\n{\n const char * names[3]; // only [0] is "
},
{
"path": "squirrel/compiler/sqtypeparser.h",
"chars": 1257,
"preview": "#pragma once\n#include \"sqpcheader.h\"\n#include \"sqvm.h\"\n#include \"sqstring.h\"\n#include \"squtils.h\"\n\nstruct SQFunctionType"
}
]
// ... and 1358 more files (download for full content)
About this extraction
This page contains the full source code of the GaijinEntertainment/quirrel GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1558 files (3.6 MB), approximately 1.0M tokens, and a symbol index with 1389 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.