From 1af3174fe3b565371a5978381f604ea9c01e86d3 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Fri, 8 Apr 2011 18:44:20 +0200 Subject: 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. --- src/comp/util/common.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/comp/util') diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs index 6dec6c00..b33a7db2 100644 --- a/src/comp/util/common.rs +++ b/src/comp/util/common.rs @@ -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 { -- cgit v1.2.3