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

Method matchToken

www/js/_hyperscript-max.js:70–76  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

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