MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / matchToken

Method matchToken

www/js/ext/component.js:64–70  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

62 }
63 // ----- Token matching -----
64 matchToken(value, type) {
65 if (this.#follows.includes(value)) return;
66 type = type || "IDENTIFIER";
67 if (this.currentToken() && this.currentToken().value === value && this.currentToken().type === type) {
68 return this.consumeToken();
69 }
70 }
71 matchOpToken(value) {
72 if (this.currentToken() && this.currentToken().op && this.currentToken().value === value) {
73 return this.consumeToken();

Callers 15

bun-hyperscript.jsFile · 0.45
parseMethod · 0.45
parseErrorAndFinallyMethod · 0.45
parseMethod · 0.45
parseErrorAndFinallyMethod · 0.45
parseMethod · 0.45
parseErrorAndFinallyMethod · 0.45
parseMethod · 0.45
matchAnyTokenMethod · 0.45
parseMethod · 0.45

Calls 2

currentTokenMethod · 0.45
consumeTokenMethod · 0.45

Tested by

no test coverage detected