Category:MoonScript: Difference between revisions

m
Added "Language" template
(Created page with "[http://moonscript.org/ MoonScript] is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a ri...")
 
m (Added "Language" template)
 
(2 intermediate revisions by one other user not shown)
Line 1:
{{stub}}
[http://moonscript.org/ MoonScript] is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a rich set of features.
{{language
 
|site=http://moonscript.org/}}
class Thing
[http://moonscript.org/ MoonScript] is a dynamic scripting language that compiles into Lua. It gives you the power of one of the fastest scripting languages combined with a rich set of features.
name: "unknown"
 
class Person extends Thing
say_name: => print "Hello, I am", @name
 
with Person!
.name = "MoonScript"
\say_name!
 
MoonScript can either be compiled into [[Lua]] and run at a later time, or it can be dynamically compiled and run using the moonloader. It’s as simple as require "moonscript" in order to have Lua understand how to load and run any MoonScript file.