Skip to content

Commit 4e1af9b

Browse files
committed
---
yaml --- r: 37581 b: refs/heads/try c: bcccf33 h: refs/heads/master i: 37579: 8fe8cdc v: v3
1 parent 0159b47 commit 4e1af9b

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736
5+
refs/heads/try: bcccf333ab728539bf63ed773e6182f9da33683e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/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/try/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)