Add a SourceMap to libreader.

Give crate clients the possiblility of mapping source-level entity names
to proper entity references that are valid in the parsed function.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-16 12:14:23 -07:00
parent ea748f7718
commit 77264ead08
4 changed files with 146 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
use cretonne::ir::Function;
use cretonne::ir::entities::AnyEntity;
use testcommand::TestCommand;
use sourcemap::SourceMap;
/// A parsed test case.
///
@@ -24,6 +25,7 @@ pub struct TestFile<'a> {
#[derive(Debug)]
pub struct Details<'a> {
pub comments: Vec<Comment<'a>>,
pub map: SourceMap,
}
/// A comment in a parsed function.