mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
bugfixes: tests are green again
This commit is contained in:
@@ -1372,7 +1372,8 @@ proc parseStmt(p: var TParser): PNode =
|
||||
else:
|
||||
var a = complexOrSimpleStmt(p)
|
||||
if a.kind == nkEmpty:
|
||||
parMessage(p, errInvalidIndentation)
|
||||
# XXX this needs a proper analysis;
|
||||
if isKeyword(p.tok.tokType): parMessage(p, errInvalidIndentation)
|
||||
break
|
||||
addSon(result, a)
|
||||
popInd(p.lex)
|
||||
|
||||
@@ -677,7 +677,7 @@ proc replace*(s: string, sub, by: char): string {.noSideEffect,
|
||||
inc(i)
|
||||
|
||||
proc replaceWord*(s, sub: string, by = ""): string {.noSideEffect,
|
||||
rtl, extern: "nsuReplaceStr".} =
|
||||
rtl, extern: "nsuReplaceWord".} =
|
||||
## Replaces `sub` in `s` by the string `by`. Each occurance of `sub`
|
||||
## has to be surrounded by word boundaries (comparable to ``\\w`` in
|
||||
## regular expressions), otherwise it is not replaced.
|
||||
|
||||
Reference in New Issue
Block a user