From a1cdd6e7ffbefb7f1e64847426b3e424656c6291 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 11 Aug 2011 01:28:37 +0200 Subject: [PATCH] bugfix: #line generation for windows --- compiler/ccgstmts.nim | 4 ++-- doc/manual.txt | 2 +- todo.txt | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 9713dff0ec..df843bc38f 100755 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -18,8 +18,8 @@ proc genLineDir(p: BProc, t: PNode) = if line < 0: line = 0 # negative numbers are not allowed in #line if optLineDir in p.Options and line > 0: - appff(p.s[cpsStmts], "#line $2 \"$1\"$n", "; line $2 \"$1\"$n", - [toRope(toFilename(t.info)), toRope(line)]) + appff(p.s[cpsStmts], "#line $2 $1$n", "; line $2 \"$1\"$n", + [makeCString(toFilename(t.info)), toRope(line)]) if ({optStackTrace, optEndb} * p.Options == {optStackTrace, optEndb}) and (p.prc == nil or sfPure notin p.prc.flags): appcg(p, cpsStmts, "#endb($1);$n", [toRope(line)]) diff --git a/doc/manual.txt b/doc/manual.txt index 50e94940a6..3037f37d3e 100755 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -2511,7 +2511,7 @@ special ``:`` syntax: In the example the two ``writeln`` statements are bound to the ``actions`` parameter. -**Note:** Symbol binding rules for templates might change! +**Note:** The symbol binding rules for templates might change! Symbol binding within templates happens after template instantation: diff --git a/todo.txt b/todo.txt index 08fe202850..bc37ced38e 100755 --- a/todo.txt +++ b/todo.txt @@ -48,6 +48,17 @@ version 0.9.XX - checked exceptions - fix implicit generic routines - think about ``{:}.toTable[int, string]()`` +- nice idea: + + p(a, b): + echo a + echo b + + is the same as: + + p(a, b, proc() = + echo a + echo b) Library -------