diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-11-21 11:27:24 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-11-21 11:27:35 +0100 |
commit | cae5e33a4a66406813769361233438c7d2df6009 (patch) | |
tree | bdba5c64996a0bec5ba764d98e26fb11e94b65d3 /lib/packages | |
parent | 58187f212067beff458e76d7c819750a9cfa100c (diff) | |
download | Nim-cae5e33a4a66406813769361233438c7d2df6009.tar.gz |
language change: 'generic' and 'atomic' are not keywords anymore
Diffstat (limited to 'lib/packages')
-rw-r--r-- | lib/packages/docutils/highlite.nim | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/packages/docutils/highlite.nim b/lib/packages/docutils/highlite.nim index 1d396d9e0..70369b001 100644 --- a/lib/packages/docutils/highlite.nim +++ b/lib/packages/docutils/highlite.nim @@ -49,12 +49,12 @@ const # The following list comes from doc/keywords.txt, make sure it is # synchronized with this array by running the module itself as a test case. - nimKeywords = ["addr", "and", "as", "asm", "atomic", "bind", "block", + nimKeywords = ["addr", "and", "as", "asm", "bind", "block", "break", "case", "cast", "concept", "const", "continue", "converter", "defer", "discard", "distinct", "div", "do", "elif", "else", "end", "enum", "except", "export", "finally", "for", "from", "func", - "generic", "if", "import", "in", "include", + "if", "import", "in", "include", "interface", "is", "isnot", "iterator", "let", "macro", "method", "mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc", "ptr", "raise", "ref", "return", "shl", "shr", "static", @@ -901,12 +901,11 @@ when isMainModule: for filename in ["doc/keywords.txt", "../../../doc/keywords.txt"]: try: let input = string(readFile(filename)) - keywords = input.split() + keywords = input.splitWhitespace() break except: echo filename, " not found" doAssert(not keywords.isNil, "Couldn't read any keywords.txt file!") - doAssert keywords.len == nimKeywords.len, "No matching lengths" - for i in 0..keywords.len-1: - #echo keywords[i], " == ", nimKeywords[i] + for i in 0..min(keywords.len, nimKeywords.len)-1: doAssert keywords[i] == nimKeywords[i], "Unexpected keyword" + doAssert keywords.len == nimKeywords.len, "No matching lengths" |