aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexilla/test/examples/nim/x.nim
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-12-14 08:17:00 +1100
committerNeil <nyamatongwe@gmail.com>2019-12-14 08:17:00 +1100
commit4f1b30ebe70a6475ffeca1ce2c0dc48c8e70a5f9 (patch)
treec2cb66991d89802a7a8b18bde9aa486da5fc9614 /lexilla/test/examples/nim/x.nim
parent651e4b440ad3019a63b10d972ee36a296020e2c8 (diff)
downloadscintilla-mirror-4f1b30ebe70a6475ffeca1ce2c0dc48c8e70a5f9.tar.gz
Lexilla tests.
Diffstat (limited to 'lexilla/test/examples/nim/x.nim')
-rw-r--r--lexilla/test/examples/nim/x.nim28
1 files changed, 28 insertions, 0 deletions
diff --git a/lexilla/test/examples/nim/x.nim b/lexilla/test/examples/nim/x.nim
new file mode 100644
index 000000000..874940d47
--- /dev/null
+++ b/lexilla/test/examples/nim/x.nim
@@ -0,0 +1,28 @@
+# Tests for Nim
+let s = "foobar"
+
+# Feature #1260
+{.ident.}
+stdin.readLine.split.map(parseInt).max.`$`.echo(" is the maximum!")
+
+# Feature #1261
+# IsFuncName("proc") so style ticks as SCE_NIM_FUNCNAME:
+proc `$` (x: myDataType): string = ...
+# Style ticks as SCE_NIM_BACKTICKS:
+if `==`( `+`(3,4),7): echo "True"
+
+# Feature #1262
+# Standard raw string identifier:
+let standardDoubleLitRawStr = R"A raw string\"
+let standardTripleLitRawStr = R"""A triple-double raw string\""""
+# Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true
+let customDoubleLitRawStr = customIdent"A string\"
+let customTripleLitRawStr = customIdent"""A triple-double raw string\""""
+
+# Feature #1268
+10_000
+10__000
+10_
+1....5
+1.ident
+1._ident