mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-05 03:41:05 +00:00
Merge pull request #837 from afdw/master
Update weedle: use special instead of specials
This commit is contained in:
commit
47acbab1e2
crates/webidl
@ -20,4 +20,4 @@ proc-macro2 = "0.4.8"
|
|||||||
quote = '0.6'
|
quote = '0.6'
|
||||||
syn = { version = '0.15', features = ['full'] }
|
syn = { version = '0.15', features = ['full'] }
|
||||||
wasm-bindgen-backend = { version = "=0.2.21", path = "../backend" }
|
wasm-bindgen-backend = { version = "=0.2.21", path = "../backend" }
|
||||||
weedle = "0.7"
|
weedle = "0.8"
|
||||||
|
@ -447,10 +447,6 @@ impl<'src> FirstPass<'src, &'src str> for weedle::interface::InterfaceMember<'sr
|
|||||||
|
|
||||||
impl<'src> FirstPass<'src, &'src str> for weedle::interface::OperationInterfaceMember<'src> {
|
impl<'src> FirstPass<'src, &'src str> for weedle::interface::OperationInterfaceMember<'src> {
|
||||||
fn first_pass(&'src self, record: &mut FirstPassRecord<'src>, self_name: &'src str) -> Result<()> {
|
fn first_pass(&'src self, record: &mut FirstPassRecord<'src>, self_name: &'src str) -> Result<()> {
|
||||||
if self.specials.len() > 1 {
|
|
||||||
warn!("Unsupported webidl operation: {:?}", self);
|
|
||||||
return Ok(())
|
|
||||||
}
|
|
||||||
let is_static = match self.modifier {
|
let is_static = match self.modifier {
|
||||||
Some(StringifierOrStatic::Stringifier(_)) => {
|
Some(StringifierOrStatic::Stringifier(_)) => {
|
||||||
warn!("Unsupported webidl stringifier: {:?}", self);
|
warn!("Unsupported webidl stringifier: {:?}", self);
|
||||||
@ -461,13 +457,13 @@ impl<'src> FirstPass<'src, &'src str> for weedle::interface::OperationInterfaceM
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut ids = vec![OperationId::Operation(self.identifier.map(|s| s.0))];
|
let mut ids = vec![OperationId::Operation(self.identifier.map(|s| s.0))];
|
||||||
for special in self.specials.iter() {
|
if let Some(special) = self.special {
|
||||||
ids.push(match special {
|
match special {
|
||||||
Special::Getter(_) => OperationId::IndexingGetter,
|
Special::Getter(_) => ids.push(OperationId::IndexingGetter),
|
||||||
Special::Setter(_) => OperationId::IndexingSetter,
|
Special::Setter(_) => ids.push(OperationId::IndexingSetter),
|
||||||
Special::Deleter(_) => OperationId::IndexingDeleter,
|
Special::Deleter(_) => ids.push(OperationId::IndexingDeleter),
|
||||||
Special::LegacyCaller(_) => continue,
|
Special::LegacyCaller(_) => {},
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
first_pass_operation(
|
first_pass_operation(
|
||||||
record,
|
record,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user