mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-14 03:50:04 +00:00
CPunch
c8cae03604
- 'var' has some weird scoping connotations with users of JS. better to change it to 'let', which will decide whether to make the variable a local or a global - 'func' looks visually appealing lol - some minor refactoring done in cparse.c
15 lines
231 B
Plaintext
15 lines
231 B
Plaintext
proto Test
|
|
func __init(self, x)
|
|
self.x = x
|
|
end
|
|
|
|
func print(self)
|
|
print(self.x)
|
|
end
|
|
end
|
|
|
|
// stressing the GC
|
|
for (let i = 0; i < 100000; i++) do
|
|
let x = Test("Hello world " .. i)
|
|
x:print()
|
|
end |