Update parseutils.nim
This commit is contained in:
parent
bc8cea2672
commit
14223c4b7f
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue