-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
squirrel.scroll
204 lines (175 loc) · 4.26 KB
/
squirrel.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
import ../code/conceptPage.scroll
id squirrel
name Squirrel
appeared 2003
creators Alberto Demichelis
tags pl
website http://squirrel-lang.org/
isOpenSource true
writtenIn restructuredtext cpp squirrel make cmake c yaml python
tryItOnline squirrel
fileExtensions nut
clocExtensions nut
fileType text
documentation http://squirrel-lang.org/squirreldoc/
rosettaCode http://www.rosettacode.org/wiki/Category:Squirrel
quineRelay Squirrel
centralPackageRepositoryCount 0
ubuntuPackage squirrel3
repoStats
firstCommit 2015
commits 294
committers 50
files 148
newestCommit 2024
country Italy
originCommunity https://sourceforge.net/p/squirrel/bugs
projectEuler Squirrel
memberCount
2019 34
2022 42
helloWorldCollection Squirrel
#!/usr/bin/squirrelsh
// Hello world in Squirrel
printl("Hello, world!");
rijuRepl https://riju.codes/squirrel
example
print("Hello, world!\n")
twitter https://twitter.com/squirrellang
leachim6 Squirrel
filepath s/Squirrel.nut
fileExtensions nut
example
print("Hello World");
githubRepo https://github.com/albertodemichelis/squirrel
stars 706
forks 145
subscribers 61
created 2015
updated 2022
firstCommit 2015
description Official repository for the programming language Squirrel
issues 80
lineCommentToken //
printToken print
stringToken "
hasComments true
hasLineComments true
// A comment
hasPrintDebugging true
hasSemanticIndentation false
hasStrings true
"Hello world"
wikipedia https://en.wikipedia.org/wiki/Squirrel_(programming_language)
example
class BaseVector {
constructor(...)
{
if(vargv.len() >= 3) {
x = vargv[0];
y = vargv[1];
z = vargv[2];
}
}
x = 0;
y = 0;
z = 0;
}
class Vector3 extends BaseVector {
function _add(other)
{
if(other instanceof ::Vector3)
return ::Vector3(x+other.x,y+other.y,z+other.z);
else
throw "wrong parameter";
}
function Print()
{
::print(x+","+y+","+z+"\n");
}
}
local v0 = Vector3(1,2,3)
local v1 = Vector3(11,12,13)
local v2 = v0 + v1;
v2.Print();
related javascript lua python minid ruby
summary Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games and hardware such as Electric Imp. MirthKit, a simple toolkit for making and distributing open source, cross-platform 2D games, uses Squirrel for its platform. It is used extensively by Code::Blocks for scripting and was also used in Final Fantasy Crystal Chronicles: My Life as a King. It is also used in Left 4 Dead 2, Portal 2 and Thimbleweed Park for scripted events.
pageId 2819069
dailyPageViews 65
created 2005
backlinksCount 39
revisionCount 173
appeared 2003
fileExtensions nut
tiobe Squirrel
domainName squirrel-lang.org
registered 2005
awisRank
2022 2975006
2017 2282029
githubBigQuery Squirrel
repos 433
users 284
linguistGrammarRepo https://github.com/textmate/c.tmbundle
firstCommit 2005
lastCommit 2018
committerCount 23
commitCount 359
sampleCount 1
example
//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);
isbndb 0
githubLanguage Squirrel
fileExtensions nut
trendingProjectsCount 0
type programming
aceMode c_cpp
codemirrorMode clike
codemirrorMimeType text/x-c++src
tmScope source.nut
repos 1513
semanticScholar 0