diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-12-17 06:41:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 13:41:05 +0100 |
commit | e1e069dd6c4e3439ee568686a2aed0a58bd771b0 (patch) | |
tree | 4e1e29e3054366cf47e7cc2e5c590ee6cc6fc6fa /nimsuggest/sexp.nim | |
parent | 8cd3655deeb369cac325b3ab2a466c110ce2bb27 (diff) | |
download | Nim-e1e069dd6c4e3439ee568686a2aed0a58bd771b0.tar.gz |
use hexchar in stdlib (#16290)
Diffstat (limited to 'nimsuggest/sexp.nim')
-rw-r--r-- | nimsuggest/sexp.nim | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/nimsuggest/sexp.nim b/nimsuggest/sexp.nim index a4368a558..cee538b6e 100644 --- a/nimsuggest/sexp.nim +++ b/nimsuggest/sexp.nim @@ -12,6 +12,8 @@ import hashes, strutils, lexbase, streams, unicode, macros +import std/private/decode_helpers + type SexpEventKind* = enum ## enumeration of all events that may occur when parsing sexpError, ## an error occurred during parsing @@ -113,14 +115,6 @@ proc errorMsgExpected*(my: SexpParser, e: string): string = ## other error messages result = "($1, $2) Error: $3" % [$getLine(my), $getColumn(my), e & " expected"] -proc handleHexChar(c: char, x: var int): bool = - result = true # Success - case c - of '0'..'9': x = (x shl 4) or (ord(c) - ord('0')) - of 'a'..'f': x = (x shl 4) or (ord(c) - ord('a') + 10) - of 'A'..'F': x = (x shl 4) or (ord(c) - ord('A') + 10) - else: result = false # error - proc parseString(my: var SexpParser): TTokKind = result = tkString var pos = my.bufpos + 1 |