Skip to content

Commit 721bd1f

Browse files
committed
Update weedle to 0.12
1 parent 35a1b81 commit 721bd1f

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

crates/webidl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ proc-macro2 = "1.0"
2121
quote = '1.0'
2222
syn = { version = '1.0', features = ['full'] }
2323
wasm-bindgen-backend = { version = "=0.2.69", path = "../backend" }
24-
weedle = "0.11"
24+
weedle = "0.12"
2525
lazy_static = "1.0.2"
2626
sourcefile = "0.1"
2727
structopt = "0.3.9"

crates/webidl/src/first_pass.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,13 @@ impl<'src> FirstPass<'src, (&'src str, ApiStability)> for weedle::interface::Int
503503
log::warn!("Unsupported WebIDL Setlike interface member: {:?}", self);
504504
Ok(())
505505
}
506+
InterfaceMember::AsyncIterable(_iterable) => {
507+
log::warn!(
508+
"Unsupported WebIDL async iterable interface member: {:?}",
509+
self
510+
);
511+
Ok(())
512+
}
506513
}
507514
}
508515
}

crates/webidl/src/idl_type.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub(crate) enum IdlType<'a> {
8383
Union(Vec<IdlType<'a>>),
8484

8585
Any,
86-
Void,
86+
Undefined,
8787

8888
UnknownInterface(&'a str),
8989
}
@@ -298,7 +298,7 @@ impl<'a> ToIdlType<'a> for ConstType<'a> {
298298
impl<'a> ToIdlType<'a> for ReturnType<'a> {
299299
fn to_idl_type(&self, record: &FirstPassRecord<'a>) -> IdlType<'a> {
300300
match self {
301-
ReturnType::Void(t) => t.to_idl_type(record),
301+
ReturnType::Undefined(t) => t.to_idl_type(record),
302302
ReturnType::Type(t) => t.to_idl_type(record),
303303
}
304304
}
@@ -388,7 +388,7 @@ terms_to_idl_type! {
388388
Object => Object
389389
Octet => Octet
390390
Short => Short
391-
Void => Void
391+
Undefined => Undefined
392392
ArrayBuffer => ArrayBuffer
393393
DataView => DataView
394394
Error => Error
@@ -490,7 +490,7 @@ impl<'a> IdlType<'a> {
490490
}
491491

492492
IdlType::Any => dst.push_str("any"),
493-
IdlType::Void => dst.push_str("void"),
493+
IdlType::Undefined => dst.push_str("undefined"),
494494
}
495495
}
496496

@@ -642,7 +642,7 @@ impl<'a> IdlType<'a> {
642642
}
643643

644644
IdlType::Any => Ok(js_value),
645-
IdlType::Void => Ok(None),
645+
IdlType::Undefined => Ok(None),
646646
IdlType::Callback => Ok(js_sys("Function")),
647647
IdlType::UnknownInterface(_) => Err(TypeError::CannotConvert),
648648
}

0 commit comments

Comments
 (0)