MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / matchToken

Method matchToken

tools/common/_hyperscript.iife.js:71–77  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

69 }
70 // ----- Token matching -----
71 matchToken(value, type) {
72 if (this.#follows.includes(value)) return;
73 type = type || "IDENTIFIER";
74 if (this.currentToken() && this.currentToken().value === value && this.currentToken().type === type) {
75 return this.consumeToken();
76 }
77 }
78 matchOpToken(value) {
79 if (this.currentToken() && this.currentToken().op && this.currentToken().value === value) {
80 return this.consumeToken();

Callers 15

matchAnyTokenMethod · 0.45
parseErrorAndFinallyMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
matchTokenMethod · 0.45
parseCommandListMethod · 0.45
parseUnaryExpressionMethod · 0.45
parseExpressionMethod · 0.45
parseMethod · 0.45

Calls 2

currentTokenMethod · 0.45
consumeTokenMethod · 0.45

Tested by

no test coverage detected