language change: 'generic' and 'atomic' are not keywords anymore

This commit is contained in:
Andreas Rumpf 2017-11-21 11:27:24 +01:00
commit cae5e33a4a
7 changed files with 17 additions and 25 deletions

View file

@ -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"