diff options
Diffstat (limited to 'compiler/wordrecg.nim')
-rw-r--r-- | compiler/wordrecg.nim | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/compiler/wordrecg.nim b/compiler/wordrecg.nim index b5ffd51c2..04376892f 100644 --- a/compiler/wordrecg.nim +++ b/compiler/wordrecg.nim @@ -13,8 +13,7 @@ # does not support strings. Without this the code would # be slow and unreadable. -import - hashes, strutils, idents +from strutils import cmpIgnoreStyle # Keywords must be kept sorted and within a range @@ -180,17 +179,3 @@ proc findStr*(a: openArray[string], s: string): int = if cmpIgnoreStyle(a[i], s) == 0: return i result = - 1 - -proc whichKeyword*(id: PIdent): TSpecialWord = - if id.id < 0: result = wInvalid - else: result = TSpecialWord(id.id) - -proc whichKeyword*(id: string): TSpecialWord = - result = whichKeyword(getIdent(id)) - -proc initSpecials() = - # initialize the keywords: - for s in countup(succ(low(specialWords)), high(specialWords)): - getIdent(specialWords[s], hashIgnoreStyle(specialWords[s])).id = ord(s) - -initSpecials() |