Link to the specific source line

This commit is contained in:
Aleksey Kladov
2020-05-31 15:36:20 +02:00
parent f20775d7eb
commit 899570ad7a
5 changed files with 90 additions and 36 deletions

View File

@@ -40,7 +40,8 @@ impl Feature {
let id = block.id;
assert!(is_valid_feature_name(&id), "invalid feature name: {:?}", id);
let doc = block.contents.join("\n");
acc.push(Feature { id, location: Location::new(path.clone()), doc })
let location = Location::new(path.clone(), block.line);
acc.push(Feature { id, location, doc })
}
Ok(())