Browse Source

Fix wast error line numbers; previously off by one (#666)

pull/670/head
Andrew Brown 5 years ago
committed by Alex Crichton
parent
commit
3558d41cea
  1. 2
      crates/wast/src/wast.rs

2
crates/wast/src/wast.rs

@ -152,7 +152,7 @@ impl WastContext {
};
let context = |sp: wast::Span| {
let (line, col) = sp.linecol_in(wast);
format!("for directive on {}:{}:{}", filename, line, col)
format!("for directive on {}:{}:{}", filename, line + 1, col)
};
let buf = wast::parser::ParseBuffer::new(wast).map_err(adjust_wast)?;

Loading…
Cancel
Save