Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AndreiRudenko/linc_squirrel
Haxe/hxcpp @:native bindings for Squirrel-Lang.
https://github.com/AndreiRudenko/linc_squirrel
Last synced: 2 months ago
JSON representation
Haxe/hxcpp @:native bindings for Squirrel-Lang.
- Host: GitHub
- URL: https://github.com/AndreiRudenko/linc_squirrel
- Owner: AndreiRudenko
- License: other
- Created: 2016-01-05T12:27:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-01-10T15:18:09.000Z (over 8 years ago)
- Last Synced: 2024-04-18T07:02:06.450Z (2 months ago)
- Language: C++
- Homepage:
- Size: 1.44 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Lists
- awesome-snowkit - linc_squirrel - lang.org/) language. (People / Libraries)
README
# linc/Squirrel
Haxe/hxcpp @:native bindings for [Squirrel](https://squirrel-lang.org/).This is a [linc](http://snowkit.github.io/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/```haxe
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);
}}
```