Update parseutils.nim

This commit is contained in:
Timothee Cour 2018-12-05 11:27:22 -08:00 • committed by GitHub
commit 14223c4b7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,8 +129,8 @@ proc parseIdent*(s: string, ident: var string, start = 0): int =
result = i-start result = i-start
proc parseIdent*(s: string, start = 0): string = proc parseIdent*(s: string, start = 0): string =
## parses an identifier and stores it in ``ident``. ## parses an identifier and returns it or an empty string in
## Returns the parsed identifier or an empty string in case of an error. ## case of an error.
result = "" result = ""
var i = start var i = start
if i < s.len and s[i] in IdentStartChars: if i < s.len and s[i] in IdentStartChars: