Kalibri is squirrel fork which adds some improvements and features into the language
Features:
- Full unicode support. No wchars. Now you can rid of _SC("") and write code calmly without thinking about encoding. Squirrel itself converts it to
wchar_twhen interacting with Windows os and back tocharwhen it finishes doing this, so unicode will work properly. - Sqrat tools to bind symbols to the language.
- New
importoperator which allows you to import libraries
Uses C++ 17
Import operator:
You can use the new import keyword to import modules:
import "mymodule"What import will do:
- Tries to load
mymodulenut script file. Ifmymodulenut script successfully loaded, executes the script and merges (if stackbase table is roottable) or replaces (if you use syntax likemod <- import "mymodule") root ormodtable with table with global variables, declared inmymodulefile. - Tries to load
mymodule.nutscript file. If successfully loaded, does the same as in first item. - Tries to load
mymodule.dll. If successfully loaded, tries to loadsqmodule_loadfunction. If successfully loaded, calls thesqmodule_load().
In other situations throws error.
-
import"folder/subfolder/module" - (?)
import"folder/subfolder" (import all files in folder) - (?)
from"folder/subfolder/module"importsymbol - stack dump from script
- module destruction
- write some sample libraries
- write tests for dll importing
- (?) export only specific table from
.nutscript module by globalreturnoperator - (?) export whole file root table if there is no global
return - handle recursive import
- (?) manual module deload like
deimportor something like that
(?) - I'm not sure if it's worth adding this