summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-08 22:03:06 +0200
committerAraq <rumpf_a@web.de>2012-07-08 22:03:06 +0200
commitbb82e305081f65af828a0b88a455ee352bac8157 (patch)
treeeef05a6be6956c13359aa0ab54155e3d8b9e97f5
parente0746e7b195f82bde791be3eb56a3c90e8e5a9a8 (diff)
downloadNim-bb82e305081f65af828a0b88a455ee352bac8157.tar.gz
bugfix: ha.echo should be accepted
-rwxr-xr-xcompiler/extccomp.nim10
-rwxr-xr-xcompiler/semstmts.nim5
2 files changed, 9 insertions, 6 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index 15061faae..1f3def384 100755
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -490,10 +490,12 @@ proc getCompileCFileCmd*(cfilename: string, isExternal = false): string =
     includeCmd = ""
     compilePattern = cc[c].compilerExe
   
-  # XXX fix the grammar finally, we need multi-line if expressions:
-  var cfile = if noAbsolutePaths(): extractFileName(cfilename) else: cfilename
-  var objfile = if not isExternal or noAbsolutePaths(): toObjFile(
-                      cfile) else: completeCFilePath(toObjFile(cfile))
+  var cfile = if noAbsolutePaths(): extractFileName(cfilename) 
+              else: cfilename
+  var objfile = if not isExternal or noAbsolutePaths(): 
+                  toObjFile(cfile) 
+                else: 
+                  completeCFilePath(toObjFile(cfile))
   cfile = quoteIfContainsWhite(AddFileExt(cfile, cExt))
   objfile = quoteIfContainsWhite(objfile)
   result = quoteIfContainsWhite(compilePattern % [
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index bc7f00c87..c67ccae46 100755
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1188,8 +1188,9 @@ proc SemStmt(c: PContext, n: PNode): PNode =
     if gCmd == cmdInteractive:
       result = buildEchoStmt(c, semExpr(c, n))
     else:
-      LocalError(n.info, errStmtExpected)
-      result = ast.emptyNode
+      result = semExprNoType(c, n)
+      #LocalError(n.info, errStmtExpected)
+      #result = ast.emptyNode
   if result == nil: InternalError(n.info, "SemStmt: result = nil")
   incl(result.flags, nfSem)