diff --git a/languages.json b/languages.json index 1719b56..38fc356 100644 --- a/languages.json +++ b/languages.json @@ -687,6 +687,12 @@ "nested": true, "extensions": ["lisp", "lsp"] }, + "LiveScript": { + "line_comment": ["#"], + "multi_line_comments": [["/*", "*/"]], + "quotes": [["\\\"", "\\\""], ["'", "'"]], + "extensions": ["ls"] + }, "LLVM": { "line_comment": [";"], "quotes": [["\\\"", "\\\""], ["'", "'"]], diff --git a/tests/data/livescript.ls b/tests/data/livescript.ls new file mode 100644 index 0000000..c275d60 --- /dev/null +++ b/tests/data/livescript.ls @@ -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