summaryrefslogtreecommitdiff
path: root/tests/examplefiles/livescript-demo.ls
diff options
context:
space:
mode:
authorPaul Miller <paul@paulmillr.com>2012-06-26 18:40:19 +0300
committerPaul Miller <paul@paulmillr.com>2012-06-26 18:40:19 +0300
commit6ed33835b12d715c4dcb6c8a0e6670c6ada34c86 (patch)
tree9699e53fd8677b42992a6cf48ddcd9e9aa4865ea /tests/examplefiles/livescript-demo.ls
parent3a1c374c00e9953856e88d51c5840bda4ad9b95a (diff)
downloadpygments-6ed33835b12d715c4dcb6c8a0e6670c6ada34c86.tar.gz
Add LiveScript support and fix coffeescript.
Diffstat (limited to 'tests/examplefiles/livescript-demo.ls')
-rw-r--r--tests/examplefiles/livescript-demo.ls35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/examplefiles/livescript-demo.ls b/tests/examplefiles/livescript-demo.ls
new file mode 100644
index 00000000..22a58628
--- /dev/null
+++ b/tests/examplefiles/livescript-demo.ls
@@ -0,0 +1,35 @@
+a = -> 1
+const b = --> 2
+var c = ~> 3
+d = ~~> 10_000_000km * 500ms
+e = (a) -> (b) ~> (c) --> (d, e) ~~> 5
+dashes-identifiers = ->
+ a - a
+ b -- c
+ 1-1 1- -1
+ a- a
+ a -a
+underscores_i$d = ->
+/regexp1/ and //regexp2//g
+'strings' and "strings" and \strings
+([2 til 10] or [1 to 50])
+ |> map (* 2)
+ |> filter (> 5)
+ |> fold (+)
+
+class Class extends Anc-est-or
+ (args) ->
+
+copy = (from, to, callback) -->
+ error, data <- read file
+ return callback error if error?
+ error <~ write file, data
+ return callback error if error?
+ callback()
+
+->
+~>
+~~>
+-->
+# Comment
+/* Comment */