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

Method parseURLOrExpression

www/js/_hyperscript.js:1306–1319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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