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

Method parseURLOrExpression

tools/common/_hyperscript.iife.js:1296–1309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1294 }
1295 }
1296 parseURLOrExpression() {
1297 var cur = this.currentToken();
1298 if (cur.value === "/" && cur.type === "DIVIDE") {
1299 var tokens = this.consumeUntilWhitespace();
1300 this.matchTokenType("WHITESPACE");
1301 return new NakedString(tokens);
1302 }
1303 if (cur.type === "IDENTIFIER" && (cur.value === "http" || cur.value === "https" || cur.value === "ws" || cur.value === "wss")) {
1304 var tokens = this.consumeUntilWhitespace();
1305 this.matchTokenType("WHITESPACE");
1306 return new NakedString(tokens);
1307 }
1308 return this.requireElement("expression");
1309 }
1310 ensureTerminated(commandList) {
1311 var implicitReturn = new ImplicitReturn();
1312 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