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

Method parseURLOrExpression

www/js/_hyperscript.esm.js:1304–1317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1302 }
1303 }
1304 parseURLOrExpression() {
1305 var cur = this.currentToken();
1306 if (cur.value === "/" && cur.type === "DIVIDE") {
1307 var tokens = this.consumeUntilWhitespace();
1308 this.matchTokenType("WHITESPACE");
1309 return new NakedString(tokens);
1310 }
1311 if (cur.type === "IDENTIFIER" && (cur.value === "http" || cur.value === "https" || cur.value === "ws" || cur.value === "wss")) {
1312 var tokens = this.consumeUntilWhitespace();
1313 this.matchTokenType("WHITESPACE");
1314 return new NakedString(tokens);
1315 }
1316 return this.requireElement("expression");
1317 }
1318 ensureTerminated(commandList) {
1319 var implicitReturn = new ImplicitReturn();
1320 var end = commandList;

Callers 2

parseMethod · 0.45
parseMethod · 0.45

Calls 4

currentTokenMethod · 0.95
matchTokenTypeMethod · 0.95
requireElementMethod · 0.95

Tested by

no test coverage detected