comparison 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
comparison
equal deleted inserted replaced
105:f1282c5fe8e3 106:89db676fbacb
58 SourceLocation opSub(int n) 58 SourceLocation opSub(int n)
59 { 59 {
60 SourceLocation res = *this; 60 SourceLocation res = *this;
61 res.val -= n; 61 res.val -= n;
62 return res; 62 return res;
63 }
64
65 /// Get the length between two location
66 int opSub(SourceLocation loc)
67 {
68 return val - loc.val;
63 } 69 }
64 70
65 /// Creates a SourceLocation from a File ID 71 /// Creates a SourceLocation from a File ID
66 static SourceLocation fromFileID(uint fileID) 72 static SourceLocation fromFileID(uint fileID)
67 { 73 {