Files
react-native-devtools-frontend/node_modules/webidl2/lib/productions/callback-interface.js
T
Johan Bay 986acd0681 Add dependencies for js signature generation to top-level node_modules
This change makes it easier to run the script from directly
`roll_py.deps` without having to fetch the dependencies first. This also
makes it easier to track which dependencies our tooling have.

Change-Id: I1ce55074ee6a1fffa6f2a2f05a56d0d74b4aca90
Bug: 1255619
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3431346
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-02-02 17:33:42 +00:00

34 lines
793 B
JavaScript

// @ts-check
import { Container } from "./container.js";
import { Operation } from "./operation.js";
import { Constant } from "./constant.js";
export class CallbackInterface extends Container {
/**
* @param {import("../tokeniser").Tokeniser} tokeniser
*/
static parse(tokeniser, callback, { partial = null } = {}) {
const tokens = { callback };
tokens.base = tokeniser.consume("interface");
if (!tokens.base) {
return;
}
return Container.parse(
tokeniser,
new CallbackInterface({ source: tokeniser.source, tokens }),
{
inheritable: !partial,
allowedMembers: [
[Constant.parse],
[Operation.parse, { regular: true }],
],
}
);
}
get type() {
return "callback interface";
}
}