Skip to content

Sonamaker1/linc_squirrel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linc/Squirrel

Haxe/hxcpp @:native bindings for Squirrel.

This is a linc library.


This library works with the Haxe cpp target only.


Example usage

See test/Test.hx

Be sure to read the Squirrel documentation
http://squirrel-lang.org/doc/squirrel3.html
http://wiki.squirrel-lang.org/

import squirrel.SQ;
import squirrel.SQVM;
import squirrel.SQstd;

class Example {

    static function main() {

        var v:HSQUIRRELVM = SQ.open(1024);
        SQ.pushroottable(v); 
        SQstd.seterrorhandlers(v); 
        SQ.setprintfunc(v); 

        SQstd.dofile(v, "script.nut", false, true);

        SQ.pushroottable(v);
        SQ.pushstring(v, "foo", -1);
        SQ.get(v,-2);
        SQ.pushroottable(v); 
        SQ.pushinteger(v, 1);
        SQ.pushfloat(v, 2.0);
        SQ.pushstring(v, "three", -1);
        SQ.call(v, 4, false, true);
        SQ.pop(v, 2); 

        SQ.pop(v, 1);
        SQ.close(v);
    }

}

About

Haxe/hxcpp @:native bindings for Squirrel-Lang 3.2 (git)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.5%
  • C 8.1%
  • Haxe 7.2%
  • Squirrel 2.1%
  • CMake 1.7%
  • Makefile 0.4%