Skip to content
Snippets Groups Projects
Commit 12093ee1 authored by Ted Nyman's avatar Ted Nyman
Browse files

Merge pull request #672 from Bulwersator/master

Add squirrel
parents ee840321 9e9aae1d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1257,6 +1257,11 @@ Smalltalk:
Smarty:
primary_extension: .tpl
 
Squirrel:
type: programming
lexer: C++
primary_extension: .nut
Standard ML:
type: programming
color: "#dc566d"
Loading
Loading
//example from http://www.squirrel-lang.org/#documentation
local table = {
a = "10"
subtable = {
array = [1,2,3]
},
[10 + 123] = "expression index"
}
local array=[ 1, 2, 3, { a = 10, b = "string" } ];
foreach (i,val in array)
{
::print("the type of val is"+typeof val);
}
/////////////////////////////////////////////
class Entity
{
constructor(etype,entityname)
{
name = entityname;
type = etype;
}
x = 0;
y = 0;
z = 0;
name = null;
type = null;
}
function Entity::MoveTo(newx,newy,newz)
{
x = newx;
y = newy;
z = newz;
}
class Player extends Entity {
constructor(entityname)
{
base.constructor("Player",entityname)
}
function DoDomething()
{
::print("something");
}
}
local newplayer = Player("da playar");
newplayer.MoveTo(100,200,300);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment