File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
branches/dist-snap/src/libsyntax Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9
9
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10
- refs/heads/dist-snap: 4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736
10
+ refs/heads/dist-snap: bcccf333ab728539bf63ed773e6182f9da33683e
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
13
13
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change 2
2
* in a crate. This to make it possible to represent the positions
3
3
* with single-word things, rather than passing records all over the
4
4
* compiler.
5
+ *
6
+ * All represented positions are *absolute* positions within the codemap,
7
+ * not relative positions within a single file.
5
8
*/
6
9
7
10
use dvec:: DVec ;
@@ -142,6 +145,8 @@ pub struct Loc<A: Pos> {
142
145
file : @FileMap , line : uint , col : A
143
146
}
144
147
148
+ /// An absolute offset within the CodeMap (not a relative offset within a
149
+ /// a single FileMap )
145
150
pub struct FilePos {
146
151
ch: CharPos , byte: BytePos
147
152
}
Original file line number Diff line number Diff line change @@ -21,9 +21,13 @@ trait reader {
21
21
type string_reader = @{
22
22
span_diagnostic : span_handler ,
23
23
src : @~str ,
24
+ // The absolute offset within the codemap of the next character to read
24
25
mut pos : FilePos ,
26
+ // The absolute offset within the codemap of the last character to be read (curr)
25
27
mut last_pos : FilePos ,
28
+ // The column of the next character to read
26
29
mut col : CharPos ,
30
+ // The last character to be read
27
31
mut curr : char ,
28
32
filemap : @codemap:: FileMap ,
29
33
interner : @token:: ident_interner ,
You can’t perform that action at this time.
0 commit comments