summary refs log tree commit diff stats
path: root/compiler/passaux.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2012-11-15 15:01:52 +0200
committerZahary Karadjov <zahary@gmail.com>2012-11-28 01:15:13 +0200
commit091c1b30756a15c76ca09c0d95cfbb946aa9ea13 (patch)
tree18f876f9a6a5e998d08e9c6568c983747429c138 /compiler/passaux.nim
parentc43bf78000b21001726b31eb4259b90b3c91e03c (diff)
downloadNim-091c1b30756a15c76ca09c0d95cfbb946aa9ea13.tar.gz
caas is now drivable through stdin
* added idetools --eval
* streams.readLine recognises and applies the backspace character
Diffstat (limited to 'compiler/passaux.nim')
-rwxr-xr-xcompiler/passaux.nim11
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/passaux.nim b/compiler/passaux.nim
index 1ee6023c8..655b8ae68 100755
--- a/compiler/passaux.nim
+++ b/compiler/passaux.nim
@@ -26,10 +26,7 @@ proc verboseProcess(context: PPassContext, n: PNode): PNode =
     incl(msgs.gNotes, hintProcessing)
     Message(n.info, hintProcessing, $idgen.gBackendId)
   
-proc verbosePass*(): TPass = 
-  initPass(result)
-  result.open = verboseOpen
-  result.process = verboseProcess
+const verbosePass* = makePass(open = verboseOpen, process = verboseProcess)
 
 proc cleanUp(c: PPassContext, n: PNode): PNode = 
   result = n                  
@@ -46,7 +43,5 @@ proc cleanUp(c: PPassContext, n: PNode): PNode =
   else: 
     nil
 
-proc cleanupPass*(): TPass = 
-  initPass(result)
-  result.process = cleanUp
-  result.close = cleanUp
+const cleanupPass* = makePass(process = cleanUp, close = cleanUp)
+