summary refs log tree commit diff stats
path: root/compiler/semmagic.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r--compiler/semmagic.nim14
1 files changed, 0 insertions, 14 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index e6861f2e4..b7e890e67 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -14,19 +14,6 @@ proc semIsPartOf(c: PContext, n: PNode, flags: TExprFlags): PNode =
   var r = isPartOf(n[1], n[2])
   result = newIntNodeT(ord(r), n)
   
-proc semSlurp(c: PContext, n: PNode, flags: TExprFlags): PNode = 
-  assert sonsLen(n) == 2
-  var a = expectStringArg(c, n, 0)
-  try:
-    var filename = a.strVal.FindFile
-    var content = readFile(filename)
-    result = newStrNode(nkStrLit, content)
-    result.typ = getSysType(tyString)
-    result.info = n.info
-    c.slurpedFiles.add(a.strVal)
-  except EIO:
-    GlobalError(a.info, errCannotOpenFile, a.strVal)
-
 proc expectIntLit(c: PContext, n: PNode): int =
   let x = c.semConstExpr(c, n)
   case x.kind
@@ -56,7 +43,6 @@ proc semTypeTraits(c: PContext, n: PNode): PNode =
 proc magicsAfterOverloadResolution(c: PContext, n: PNode, 
                                    flags: TExprFlags): PNode =
   case n[0].sym.magic
-  of mSlurp: result = semSlurp(c, n, flags)
   of mIsPartOf: result = semIsPartOf(c, n, flags)
   of mTypeTrait: result = semTypeTraits(c, n)
   of mAstToStr: