mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-10-21 08:20:18 +00:00
syntax: 'var'->'let' 'function'->'func'
- '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
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
// crafts a dummy proto
|
||||
proto test
|
||||
function __init(self) end
|
||||
func __init(self) end
|
||||
end
|
||||
|
||||
// instance of test
|
||||
var obj = test()
|
||||
let obj = test()
|
||||
|
||||
test.__index = function(self, key)
|
||||
print("__index called!")
|
||||
|
Reference in New Issue
Block a user