From 32b7b3e1b1bf9c8694672e83914d2b89e4942069 Mon Sep 17 00:00:00 2001 From: Bulwersator Date: Thu, 5 Sep 2013 20:50:08 +0200 Subject: [PATCH 1/4] Update languages.yml --- lib/linguist/languages.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 11e7a62d..1aaf3423 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1180,6 +1180,11 @@ SCSS: ace_mode: scss primary_extension: .scss +Squirrel: + type: programming + lexer: C++ + primary_extension: .nut + SQL: type: data ace_mode: sql From 85840aadc287c5d504cee3e28315efb1e76e7c78 Mon Sep 17 00:00:00 2001 From: Bulwersator Date: Thu, 5 Sep 2013 20:54:59 +0200 Subject: [PATCH 2/4] Create Squirrel.nut --- samples/Squirrel/Squirrel.nut | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 samples/Squirrel/Squirrel.nut diff --git a/samples/Squirrel/Squirrel.nut b/samples/Squirrel/Squirrel.nut new file mode 100644 index 00000000..105c468c --- /dev/null +++ b/samples/Squirrel/Squirrel.nut @@ -0,0 +1,56 @@ +//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); From 229ab3a268b57a5b4bb3a8e9c81ce65acaafd11f Mon Sep 17 00:00:00 2001 From: Bulwersator Date: Thu, 5 Sep 2013 22:02:09 +0200 Subject: [PATCH 3/4] fix sorting --- lib/linguist/languages.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 1aaf3423..9380797a 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1180,17 +1180,17 @@ SCSS: ace_mode: scss primary_extension: .scss -Squirrel: - type: programming - lexer: C++ - primary_extension: .nut - SQL: type: data ace_mode: sql searchable: false primary_extension: .sql +Squirrel: + type: programming + lexer: C++ + primary_extension: .nut + Sage: type: programming lexer: Python From 9e9aae1d834e14a0abc37a83b847b109b236bc06 Mon Sep 17 00:00:00 2001 From: Bulwersator Date: Thu, 5 Sep 2013 22:10:49 +0200 Subject: [PATCH 4/4] really fix sorting --- lib/linguist/languages.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9380797a..34f83773 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1186,11 +1186,6 @@ SQL: searchable: false primary_extension: .sql -Squirrel: - type: programming - lexer: C++ - primary_extension: .nut - Sage: type: programming lexer: Python @@ -1254,6 +1249,11 @@ Smalltalk: Smarty: primary_extension: .tpl +Squirrel: + type: programming + lexer: C++ + primary_extension: .nut + Standard ML: type: programming color: "#dc566d"