Support hyphens in dictionary identifiers.
WebIDL allows hyphens in identifiers[1], specifically in dictionary keys. Currently the generated bindings end up emitting the hyphen in C++ which fails to compile. One option would be to use the ImplementedBy name more uniformly: at the moment it's used in a couple of places, but generally not for methods that have strings appended or prepended (like "get" or "set"). That could be changed at the cost of tweaking a bunch of existing usages. Instead, this change doesn't touch existing code, but tweaks the generation so that hyphens in WebIDL identifiers are lowerCamelCased. This is all motivated because WebAuthn defines a dictionary of extensions[2] and FIDO has defined an extension with a hyphen in the name[3]. [1] https://heycam.github.io/webidl/#prod-identifier [2] https://www.w3.org/TR/webauthn/#iface-authentication-extensions-client-inputs [3] https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-client-to-authenticator-protocol-v2.0-rd-20180702.html#sctn-hmac-secret-extension Change-Id: Id17c528c5594251385a0a10fa5e91988908b88b6 Reviewed-on: https://chromium-review.googlesource.com/c/1247233 Commit-Queue: Adam Langley <agl@chromium.org> Reviewed-by:Hitoshi Yoshida <peria@chromium.org> Cr-Commit-Position: refs/heads/master@{#597296}
Showing
This diff is collapsed.
Please register or sign in to comment