summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2011-12-11 11:26:50 +0200
committerZahary Karadjov <zahary@gmail.com>2011-12-11 11:26:50 +0200
commit67bc23bb60dda2895c47ae0747d106b6075c6a90 (patch)
tree4f4c66fad9ae5c42beefd31274091e295f31b639 /compiler/ast.nim
parentd171a8b36f10f42d35e64a7ddefa57376b419908 (diff)
parentaf792da0bbee6e9587b8aafafcd8f898f8fe9fd4 (diff)
downloadNim-67bc23bb60dda2895c47ae0747d106b6075c6a90.tar.gz
Merge branch 'master' of github.com:Araq/Nimrod into upstream
Diffstat (limited to 'compiler/ast.nim')
-rwxr-xr-xcompiler/ast.nim33
1 files changed, 2 insertions, 31 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 6ac7dc0de..8d1aeeb6a 100755
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -371,7 +371,7 @@ type
     mFields, mFieldPairs,
     mAppendStrCh, mAppendStrStr, mAppendSeqElem, 
     mInRange, mInSet, mRepr, mExit, mSetLengthStr, mSetLengthSeq, 
-    mAssert, mAstToStr, mRand,
+    mIsPartOf, mAstToStr, mRand, 
     mSwap, mIsNil, mArrToSeq, mCopyStr, mCopyStrLast, 
     mNewString, mNewStringOfCap,
     mReset,
@@ -669,36 +669,7 @@ const                         # for all kind of hash tables:
   GrowthFactor* = 2           # must be power of 2, > 0
   StartSize* = 8              # must be power of 2, > 0
 
-proc SameValue*(a, b: PNode): bool
-  # a, b are literals
-proc leValue*(a, b: PNode): bool
-  # a <= b? a, b are literals
-proc ValueToString*(a: PNode): string
- 
-proc leValue(a, b: PNode): bool = 
-  # a <= b?
-  result = false
-  case a.kind
-  of nkCharLit..nkInt64Lit: 
-    if b.kind in {nkCharLit..nkInt64Lit}: result = a.intVal <= b.intVal
-  of nkFloatLit..nkFloat64Lit: 
-    if b.kind in {nkFloatLit..nkFloat64Lit}: result = a.floatVal <= b.floatVal
-  of nkStrLit..nkTripleStrLit: 
-    if b.kind in {nkStrLit..nkTripleStrLit}: result = a.strVal <= b.strVal
-  else: InternalError(a.info, "leValue")
-  
-proc SameValue(a, b: PNode): bool = 
-  result = false
-  case a.kind
-  of nkCharLit..nkInt64Lit: 
-    if b.kind in {nkCharLit..nkInt64Lit}: result = a.intVal == b.intVal
-  of nkFloatLit..nkFloat64Lit: 
-    if b.kind in {nkFloatLit..nkFloat64Lit}: result = a.floatVal == b.floatVal
-  of nkStrLit..nkTripleStrLit: 
-    if b.kind in {nkStrLit..nkTripleStrLit}: result = a.strVal == b.strVal
-  else: InternalError(a.info, "SameValue")
-  
-proc ValueToString(a: PNode): string = 
+proc ValueToString*(a: PNode): string = 
   case a.kind
   of nkCharLit..nkInt64Lit: result = $(a.intVal)
   of nkFloatLit, nkFloat32Lit, nkFloat64Lit: result = $(a.floatVal)