diff options
author | Araq <rumpf_a@web.de> | 2012-01-13 23:28:08 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-01-13 23:28:08 +0100 |
commit | 4cfc0462a48cc85499e8aba0f803eb87f8188900 (patch) | |
tree | c360633e5e254ef3b3c8868a63bf8a710358fb0a | |
parent | 9460f7cc4e3d76e9f62e645b96890794bae7933c (diff) | |
download | Nim-4cfc0462a48cc85499e8aba0f803eb87f8188900.tar.gz |
bugfixes: tests are green again
-rwxr-xr-x | compiler/parser.nim | 3 | ||||
-rwxr-xr-x | lib/pure/strutils.nim | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index a0d8ad44a..118b96736 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 f4a82a0a3..0bfec8894 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. |