You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
externcrate weedle;fnparse_non_quoted(){let data:&str = r#" [Attribute=(hello, there)] interface HTMLImageElement : HTMLElement { }; "#;match weedle::parse(data){Ok(v) => println!(" parsed! \n\n{:?}", v),Err(e) => println!(" could not parse: {}", e),};}fnparse_quoted(){let data:&str = r#" [Attribute=("hello", "there")] interface Test { }; "#;match weedle::parse(data){Ok(v) => println!(" parsed! \n\n{:?}", v),Err(e) => println!(" could not parse: {}", e),};}fnmain(){println!("Parsing extended attribute with non-quoted values in tuple");parse_non_quoted();println!("Parsing extended attribute with quoted values in tuple");parse_quoted();}
Cargo.toml
[package]
name = "weedle_test"version = "0.1.0"authors = ["James Johnson <[email protected]>"]
edition = "2018"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
weedle = "0.11.0"
The text was updated successfully, but these errors were encountered:
I already made mention of this on the PR (#39), but wanted to bring it up here as well:
This may only be a chrome IDL issue since the official WebIDL grammar (https://heycam.github.io/webidl/#es-extended-attributes) only seems to support identifier lists, not string lists. Feel free to ignore/close this issue if this is indeed the case.
I can understand wanting to keep this library strictly in-line with the official grammar.
Describe the Bug
Weedle seems to be unable to parse extended attributes that contain a tuple of quoted values.
Steps to Reproduce
For example, this parses correctly:
With the result:
while quoted tuple values do not parse correctly:
This is also observed while parsing chrome IDLs:
Source Data
src/main.rs
Cargo.toml
The text was updated successfully, but these errors were encountered: