Remove the inst_locs vector in the parser.

Use the source map to track instruction locations instead.

The rewrite methods now take an AnyEntity argument as the location to
use for errors. This means that bad EBB references in jump tables are
now reported correctly.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-19 11:42:56 -07:00
parent d0f9f92317
commit 622006ecc5
3 changed files with 60 additions and 58 deletions

View File

@@ -6,7 +6,7 @@ use std::fmt;
use std::result;
/// The location of a `Token` or `Error`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct Location {
pub line_number: usize,
}