()
| 1259 | // Parser-owned methods |
| 1260 | // =========================== |
| 1261 | parseStringTemplate() { |
| 1262 | var returnArr = [""]; |
| 1263 | do { |
| 1264 | returnArr.push(this.lastWhitespace()); |
| 1265 | if (this.currentToken().value === "$") { |
| 1266 | this.consumeToken(); |
| 1267 | var startingBrace = this.matchOpToken("{"); |
| 1268 | returnArr.push(this.requireElement("expression")); |
| 1269 | if (startingBrace) { |
| 1270 | this.requireOpToken("}"); |
| 1271 | } |
| 1272 | returnArr.push(""); |
| 1273 | } else if (this.currentToken().value === "\\") { |
| 1274 | this.consumeToken(); |
| 1275 | this.consumeToken(); |
| 1276 | } else { |
| 1277 | var token = this.consumeToken(); |
| 1278 | returnArr[returnArr.length - 1] += token ? token.value : ""; |
| 1279 | } |
| 1280 | } while (this.hasMore()); |
| 1281 | returnArr.push(this.lastWhitespace()); |
| 1282 | return returnArr; |
| 1283 | } |
| 1284 | commandBoundary(token) { |
| 1285 | if (token.value == "end" || token.value == "then" || token.value == "else" || token.value == "otherwise" || token.value == ")" || this.commandStart(token) || this.featureStart(token) || token.type == "EOF") { |
| 1286 | return true; |
no test coverage detected