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
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
[Exposed=Window]
interface WebGLContextEvent : Event {
[Throws] constructor(DOMString type, optional WebGLContextEventInit eventInit = {});
readonly attribute DOMString statusMessage;
};
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
dictionary WebGLContextEventInit : EventInit {
DOMString statusMessage;
};
fails the following error:
[src/main.rs:29] parsed = Err(
Failure(
Code(
CompleteStr(
"/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\n// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15\n[Exposed=Window]\ninterface WebGLContextEvent : Event {\n [Throws] constructor(DOMString type, optional WebGLContextEventInit eventInit = {});\n readonly attribute DOMString statusMessage;\n};\n\n// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15\ndictionary WebGLContextEventInit : EventInit {\n DOMString statusMessage;\n};\n",
),
Custom(
0,
),
),
),
)
Steps to Reproduce
let parsed = weedle::parse("/* This Source Code Form is subject to the terms of the Mozilla Public* License, v. 2.0. If a copy of the MPL was not distributed with this* file, You can obtain one at https://mozilla.org/MPL/2.0/. */// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15[Exposed=Window]interface WebGLContextEvent : Event { [Throws] constructor(DOMString type, optional WebGLContextEventInit eventInit = {}); readonly attribute DOMString statusMessage;};// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15dictionary WebGLContextEventInit : EventInit { DOMString statusMessage;};");
The problem appears to be the following content: optional WebGLContextEventInit eventInit = {}. Removing the default value declaration to have optional WebGLContextEventInit eventInit makes the parsing work OK.
Expected Behavior
The WebIDL is parsed properly and the corresponding AST is returned.
The text was updated successfully, but these errors were encountered:
Default is defined in common.rs and relies on DefaultValue which is defined in literals.rs and does have a specific case for the empty dict initializer:
Describe the Bug
The parsing of WebGLContextEvent.webidl:
fails the following error:
Steps to Reproduce
The problem appears to be the following content:
optional WebGLContextEventInit eventInit = {}
. Removing the default value declaration to haveoptional WebGLContextEventInit eventInit
makes the parsing work OK.Expected Behavior
The WebIDL is parsed properly and the corresponding AST is returned.
The text was updated successfully, but these errors were encountered: