Update wasm-tools crates

Nothing major here, just a routine update with a few extra things to
handle here-and-there.
This commit is contained in:
Alex Crichton
2022-02-02 09:45:43 -08:00
parent c83968575a
commit 65486a0680
15 changed files with 102 additions and 42 deletions

View File

@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0.19"
wasmtime = { path = "../wasmtime", version = "0.33.0", default-features = false, features = ['cranelift'] }
wast = "38.0.0"
wast = "39.0.0"
[badges]
maintenance = { status = "actively-developed" }

View File

@@ -4,6 +4,7 @@ use std::fmt::{Display, LowerHex};
use std::path::Path;
use std::str;
use wasmtime::*;
use wast::lexer::Lexer;
use wast::Wat;
use wast::{
parser::{self, ParseBuffer},
@@ -215,8 +216,10 @@ impl<T> WastContext<T> {
err
};
let buf = wast::parser::ParseBuffer::new(wast).map_err(adjust_wast)?;
let ast = wast::parser::parse::<wast::Wast>(&buf).map_err(adjust_wast)?;
let mut lexer = Lexer::new(wast);
lexer.allow_confusing_unicode(filename.ends_with("names.wast"));
let buf = ParseBuffer::new_with_lexer(lexer).map_err(adjust_wast)?;
let ast = parser::parse::<wast::Wast>(&buf).map_err(adjust_wast)?;
for directive in ast.directives {
let sp = directive.span();