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

Method parseURLOrExpression

www/js/_hyperscript-max.js:1305–1318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 4

parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45

Calls 4

currentTokenMethod · 0.95
matchTokenTypeMethod · 0.95
requireElementMethod · 0.95

Tested by

no test coverage detected