Add LiveScript to languages.json (#607)

LiveScript is a language which compiles to JavaScript.  (http://livescript.net/)
This commit is contained in:
Jos van Bakel 2020-08-10 11:51:06 +02:00 committed by GitHub
parent 900e069e03
commit 724c8e8995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -687,6 +687,12 @@
"nested": true,
"extensions": ["lisp", "lsp"]
},
"LiveScript": {
"line_comment": ["#"],
"multi_line_comments": [["/*", "*/"]],
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"extensions": ["ls"]
},
"LLVM": {
"line_comment": [";"],
"quotes": [["\\\"", "\\\""], ["'", "'"]],

28
tests/data/livescript.ls Normal file
View File

@ -0,0 +1,28 @@
# 28 lines, 10 code, 12 comments, 6 blanks
/*
* /* Nested comment
* # single line comment
* */
/*
add = (a, b) ->
return a + b
*/
hello = ->
console.log 'hello, world!'
"hello!" |> capitalize |> console.log
# Easy listing of implicit objects
table1 =
* id: 1
name: 'george'
* id: 2
name: 'mike' # comment
* id: 3
name: 'donald'
# Comment