diff basic/SourceLocation.d @ 106:89db676fbacb

Now able of understanding strings.
author Anders Johnsen <skabet@gmail.com>
date Thu, 22 May 2008 12:09:11 +0200
parents 5f258eaf9517
children 6ec686d9c87d
line wrap: on
line diff
--- a/basic/SourceLocation.d	Wed May 21 21:11:55 2008 +0200
+++ b/basic/SourceLocation.d	Thu May 22 12:09:11 2008 +0200
@@ -62,6 +62,12 @@
         return res;
     }
 
+    /// Get the length between two location
+    int opSub(SourceLocation loc)
+    {
+        return val - loc.val;
+    }
+
     /// Creates a SourceLocation from a File ID
     static SourceLocation fromFileID(uint fileID)
     {