A scripting language that accepts a subset of javascript and C/C++ - forked from Squirrel. A Lua like scripting language and VM with a more C Inspired syntax.

#cpp #lua #sqlite #scripting #script-engine #library #gamedev #game-engine #embedded #embed

mingodad dfca6eccd3 Add some extensions that are work in progress. 10 سال پیش
SquiLu b27423f3c4 Fix compilation for android and update sqlite3 10 سال پیش
SquiLu-editor 5e2da2fd1a Removed unintended commit of binary file. 12 سال پیش
SquiLu-ext dfca6eccd3 Add some extensions that are work in progress. 10 سال پیش
SquiLu-ourbiz a51df3bdc3 Update sqlite3 and some examples. 11 سال پیش
discount 771b861392 Changes to make it compile on linux 64bits. 12 سال پیش
fltk 3e2c2a68f0 Update to fltk 1.3.2, this files are no longer needed. 11 سال پیش
flu 771b861392 Changes to make it compile on linux 64bits. 12 سال پیش
gumbo 2577a7f00b Add a makefile to gumbo library 11 سال پیش
libharu 1511e15cd4 Update mpdecimal, sqlite3 and some fixes to build by make. 11 سال پیش
librs232 ead02ad946 Add casts to allow compile on freebsd with gcc 4.2.1 13 سال پیش
minizip 1511e15cd4 Update mpdecimal, sqlite3 and some fixes to build by make. 11 سال پیش
mpdecimal 1511e15cd4 Update mpdecimal, sqlite3 and some fixes to build by make. 11 سال پیش
myaxtls 1511e15cd4 Update mpdecimal, sqlite3 and some fixes to build by make. 11 سال پیش
README.md c56b19a9b0 Create README.md 10 سال پیش

README.md

The [http://www.squirrel-lang.org/ squirrel scripting language] seeks to address some problems of lua language and offer a C like syntax with some god extras but it lacks a source code repository and some facilities provided by default in lua like string.gsub, string.gmatch, io.lines, modules, ..., this project try to solve it and extend the language to make it even more useful.

This project is not endorsed by Squirrel or Lua authors, it's an independent effort, and it will try to cooperate with both.

Some modules, third party code, or sample code can have different licenses !!!

It is the base of a cross platform application server (windows, macosx, linux, android, wince, http/javascript, ...)

A preview of the application server running on an Android phone (Huawei U8105 IDEOS on an ADSL line) can be seem here:

-A simple search page for companies in Reading UK http://companies-uk.dadbiz.es/ or https://companies-uk.dadbiz.es/

-A Small business application http/javascript interface http://ourbiz.dadbiz.es/ or https://ourbiz.dadbiz.es/ when asked use username: mingote password: tr14pink

Also you'll find several changes and additions to the original Squirrel 3.0.4:

Changes to the Squirrel syntax:

  • Accepts "->" as alias for "."
  • Accepts "var" as alias for "local"
  • Accepts lua literal string delimiters "[===[" and "]===]", also "{==={" and "}===}" or "(===(" and ")===)"
  • The "new" keyword is ignored so lines like in C++/Javascript are accepted " var obj = new {{{MyClass();}}}"
  • Local scope for "const/enum", checking for redeclaration on the same compilation unit.

New functions

  • Exposed delegates for string, class, array, numbers.
  • Added new function "array.concat" with similar functionality of lua table.concat.
  • Added "write" and "read" functions to streams (only works with ascii/utf8).
  • Blob now can be used as stringbuffer.
  • Script functions "getstacktop", "get_last_stackinfo" to help debug extensions.
  • Script function print renamed to "print1" and a new "print" that behaves like the Lua print function.
  • Script function "str_from_chars" to allow construct a string from a list of integers like the Lua function "string.chars".
  • New method "concat" for array that behave like the Lua table.concat.
  • New method "bsearch" for array (only work on sorted arrays).
  • New method "get(key, default_value)" for tables that allows to query table keys and return a default value when the key doesn't exists.
  • ...

Internals:

  • Incompatibility the vargv array allways has the script filenanme at index 0 and allways will have "len()" at minimum equal 1 (2013-02-26).
  • Has a modification that allows release hook handlers access the vm normally, in fact a pointer to the vm is passed to then.
  • Added a new member to SQRegFunction that indicates if a method is static.
  • Implemented detection of local variable redeclaration on the same scope.
  • Implemented compiler warnings for local redeclarations on nested scopes, also assignments inside expressions (if/while/do-while,...)
  • Implemented command line "-s" to generate a squilu code representing the generated bytecode.
  • Function parameters and function return type can be specified like in typescript, the compiler is not enforcing it yet but accepts and discards for now. {{{ function Add(left: number, right: number): number { return left + right; } }}}
  • Class fields can be specified like in typescript, the compiler is not enforcing it yet but accepts and discards for now. {{{ class Person { public name: string; private age: number; postcode: string; address = null;

    constructor(name: string, age: number) {

    this.name = name;
    this.age = age;
    postcode = "none";
    address = "unknown";
    

    }

    function asString(): string {

    return this.name + " (" + this.age + ")";
    

    } } }}}

  • ...