diff --git a/compiler/parser.nim b/compiler/parser.nim index a0d8ad44ab..118b967366 100755 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -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) diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index f4a82a0a33..0bfec88948 100755 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -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.