Update moonscript syntax highlight colors
This commit is contained in:
42
code.md
42
code.md
@@ -48,7 +48,11 @@ end
|
||||
## `moonscript`
|
||||
|
||||
```moon
|
||||
-- This is a comment
|
||||
-- @param str A string.
|
||||
|
||||
class Thing
|
||||
this = self
|
||||
name: "unknown"
|
||||
|
||||
class Person extends Thing
|
||||
@@ -57,5 +61,43 @@ class Person extends Thing
|
||||
with Person!
|
||||
.name = "MoonScript"
|
||||
\say_name!
|
||||
|
||||
export my_func
|
||||
x = 2323
|
||||
|
||||
collection =
|
||||
height: 32434
|
||||
hats: {"tophat", "bball", "bowler"}
|
||||
|
||||
my_func = (a) -> x + a
|
||||
|
||||
print my_func 100
|
||||
|
||||
import concat, insert from table
|
||||
|
||||
double_args = (...) ->
|
||||
[x * 2 for x in *{...}]
|
||||
|
||||
tuples = [{k, v} for k,v in ipairs my_table]
|
||||
```
|
||||
|
||||
## `CoffeeScript`
|
||||
|
||||
```coffeescript
|
||||
author = "Wittgenstein"
|
||||
quote = "A picture is a fact. -- #{ author }"
|
||||
|
||||
sentence = "#{ 22 / 7 } is a decent approximation of π"
|
||||
```
|
||||
|
||||
## `JavaScript`
|
||||
|
||||
```javascript
|
||||
let a = "what is this?"
|
||||
```
|
||||
|
||||
## `Lua`
|
||||
|
||||
```lua
|
||||
local test = "this is a string"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user