summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)