Skip to content

Commit 54e55c1

Browse files
committed
---
yaml --- r: 40395 b: refs/heads/dist-snap c: bcccf33 h: refs/heads/master i: 40393: ca00877 40391: 8982b21 v: v3
1 parent 83d9cd3 commit 54e55c1

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736
10+
refs/heads/dist-snap: bcccf333ab728539bf63ed773e6182f9da33683e
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libsyntax/codemap.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* in a crate. This to make it possible to represent the positions
33
* with single-word things, rather than passing records all over the
44
* compiler.
5+
*
6+
* All represented positions are *absolute* positions within the codemap,
7+
* not relative positions within a single file.
58
*/
69

710
use dvec::DVec;
@@ -142,6 +145,8 @@ pub struct Loc<A: Pos> {
142145
file: @FileMap, line: uint, col: A
143146
}
144147

148+
/// An absolute offset within the CodeMap (not a relative offset within a
149+
/// a single FileMap)
145150
pub struct FilePos {
146151
ch: CharPos, byte: BytePos
147152
}

branches/dist-snap/src/libsyntax/parse/lexer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ trait reader {
2121
type string_reader = @{
2222
span_diagnostic: span_handler,
2323
src: @~str,
24+
// The absolute offset within the codemap of the next character to read
2425
mut pos: FilePos,
26+
// The absolute offset within the codemap of the last character to be read (curr)
2527
mut last_pos: FilePos,
28+
// The column of the next character to read
2629
mut col: CharPos,
30+
// The last character to be read
2731
mut curr: char,
2832
filemap: @codemap::FileMap,
2933
interner: @token::ident_interner,

0 commit comments

Comments
 (0)