about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-15 14:34:23 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-15 14:43:31 -0800
commitbcccf333ab728539bf63ed773e6182f9da33683e (patch)
tree4486bb66b7580a6884b6e48aafc48f8642b83a43 /src/libsyntax/codemap.rs
parent4a0f4f5e311b7443b29ea31ad0e68e6b4aa63736 (diff)
downloadrust-bcccf333ab728539bf63ed773e6182f9da33683e.tar.gz
rust-bcccf333ab728539bf63ed773e6182f9da33683e.zip
Add some comments to codemap and lexer
Diffstat (limited to 'src/libsyntax/codemap.rs')
-rw-r--r--src/libsyntax/codemap.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index e1c5eb07eb8..a54c41e8552 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -2,6 +2,9 @@
  * in a crate. This to make it possible to represent the positions
  * with single-word things, rather than passing records all over the
  * compiler.
+ *
+ * All represented positions are *absolute* positions within the codemap,
+ * not relative positions within a single file.
  */
 
 use dvec::DVec;
@@ -142,6 +145,8 @@ pub struct Loc<A: Pos> {
     file: @FileMap, line: uint, col: A
 }
 
+/// An absolute offset within the CodeMap (not a relative offset within a
+/// a single FileMap)
 pub struct FilePos {
     ch: CharPos, byte: BytePos
 }