diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-06-18 21:01:12 +0200 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-06-18 21:01:12 +0200 |
commit | 5b1caed806e017b39c9dd447fde00085fe5aab09 (patch) | |
tree | 947e93f8b1503d439030498664eeaa50675194df /lib/packages/docutils/highlite.nim | |
parent | ff1d68c50b5df56645eb09a523c08726772bec4d (diff) | |
download | Nim-5b1caed806e017b39c9dd447fde00085fe5aab09.tar.gz |
Replaces relative file slurping with hardcoded array.
Diffstat (limited to 'lib/packages/docutils/highlite.nim')
-rw-r--r-- | lib/packages/docutils/highlite.nim | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/packages/docutils/highlite.nim b/lib/packages/docutils/highlite.nim index 21dd1543a..f4b2f5867 100644 --- a/lib/packages/docutils/highlite.nim +++ b/lib/packages/docutils/highlite.nim @@ -44,7 +44,17 @@ const "Assembler", "Preprocessor", "Directive", "Command", "Rule", "Hyperlink", "Label", "Reference", "Other"] - nimrodKeywords = slurp("doc/keywords.txt").split + # The following list comes from doc/keywords.txt, make sure it is + # synchronized with this array. + nimrodKeywords = ["addr", "and", "as", "asm", "atomic", "bind", "block", + "break", "case", "cast", "const", "continue", "converter", "discard", + "distinct", "div", "do", "elif", "else", "end", "enum", "except", "export", + "finally", "for", "from", "generic", "if", "import", "in", "include", + "interface", "is", "isnot", "iterator", "lambda", "let", "macro", "method", + "mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc", + "ptr", "raise", "ref", "return", "shared", "shl", "shr", "static", + "template", "try", "tuple", "type", "var", "when", "while", "with", + "without", "xor", "yield"] proc getSourceLanguage*(name: string): TSourceLanguage = for i in countup(succ(low(TSourceLanguage)), high(TSourceLanguage)): |