()
| 302 | } |
| 303 | |
| 304 | parseURLOrExpression() { |
| 305 | var cur = this.currentToken(); |
| 306 | if (cur.value === "/" && cur.type === "DIVIDE") { |
| 307 | // starts with / - naked URL |
| 308 | var tokens = this.consumeUntilWhitespace(); |
| 309 | this.matchTokenType("WHITESPACE"); |
| 310 | return new NakedString(tokens); |
| 311 | } |
| 312 | if (cur.type === "IDENTIFIER" && (cur.value === "http" || cur.value === "https" || cur.value === "ws" || cur.value === "wss")) { |
| 313 | // starts with http/https - naked URL |
| 314 | var tokens = this.consumeUntilWhitespace(); |
| 315 | this.matchTokenType("WHITESPACE"); |
| 316 | return new NakedString(tokens); |
| 317 | } |
| 318 | return this.requireElement("expression"); |
| 319 | } |
| 320 | |
| 321 | ensureTerminated(commandList) { |
| 322 | var implicitReturn = new ImplicitReturn(); |
no test coverage detected