diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/examples/x.nim | 6 | ||||
-rw-r--r-- | test/examples/x.nim.styled | 6 | ||||
-rw-r--r-- | test/lexTests.py | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/test/examples/x.nim b/test/examples/x.nim index 07c9d216f..4bf0de737 100644 --- a/test/examples/x.nim +++ b/test/examples/x.nim @@ -4,3 +4,9 @@ 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" diff --git a/test/examples/x.nim.styled b/test/examples/x.nim.styled index fc1532e60..18ae529e6 100644 --- a/test/examples/x.nim.styled +++ b/test/examples/x.nim.styled @@ -4,3 +4,9 @@ {3}# Feature #1260 {15}{.{16}ident{15}.}{0} {16}stdin{15}.{16}readLine{15}.{16}split{15}.{16}map{15}({16}parseInt{15}).{16}max{15}.{11}`$`{15}.{16}echo{15}({6}" is the maximum!"{15}){0} + +{3}# Feature #1261 +# IsFuncName("proc") so style ticks as SCE_NIM_FUNCNAME: +{8}proc{0} {12}`$`{0} {15}({16}x{15}:{0} {16}myDataType{15}):{0} {16}string{0} {15}={0} {15}...{0} +{3}# Style ticks as SCE_NIM_BACKTICKS: +{8}if{0} {11}`==`{15}({0} {11}`+`{15}({5}3{15},{5}4{15}),{5}7{15}):{0} {16}echo{0} {6}"True"{0} diff --git a/test/lexTests.py b/test/lexTests.py index eb38b7af7..46e4eb4fb 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -157,7 +157,7 @@ class TestLexers(unittest.TestCase): self.LexExample("x.lua", b"lua", [b"function end"]) def testNim(self): - self.LexExample("x.nim", b"nim", [b"else end if let"]) + self.LexExample("x.nim", b"nim", [b"else end if let proc"]) def testRuby(self): self.LexExample("x.rb", b"ruby", [b"class def end"]) |