Move to single-uint file-position representation.

This makes passing them around cheaper. There is now a table (see
front/codemap.rs) that is needed to transform such an uint into an
actual filename/line/col location.

Also cleans up the span building in the parser a bit.
This commit is contained in:
Marijn Haverbeke
2011-04-08 18:44:20 +02:00
parent 094d31f5e4
commit 1af3174fe3
11 changed files with 414 additions and 352 deletions

View File

@@ -5,8 +5,7 @@ import front.ast;
type filename = str;
type pos = rec(uint line, uint col);
type span = rec(filename filename, pos lo, pos hi);
type span = rec(uint lo, uint hi);
type spanned[T] = rec(T node, span span);
tag ty_mach {