(parser)
| 6135 | this.dontThrow = dontThrow; |
| 6136 | } |
| 6137 | static parseConversionInfo(parser) { |
| 6138 | var type = "text"; |
| 6139 | var conversion; |
| 6140 | parser.matchToken("a") || parser.matchToken("an"); |
| 6141 | if (parser.matchToken("json") || parser.matchToken("JSON") || parser.matchToken("Object")) { |
| 6142 | type = "json"; |
| 6143 | } else if (parser.matchToken("response") || parser.matchToken("Response")) { |
| 6144 | type = "response"; |
| 6145 | } else if (parser.matchToken("html") || parser.matchToken("HTML")) { |
| 6146 | type = "html"; |
| 6147 | } else if (parser.matchToken("text") || parser.matchToken("Text") || parser.matchToken("String")) { |
| 6148 | } else { |
| 6149 | conversion = parser.requireElement("dotOrColonPath").evalStatically(); |
| 6150 | } |
| 6151 | return { type, conversion }; |
| 6152 | } |
| 6153 | static parse(parser) { |
| 6154 | if (!parser.matchToken("fetch")) return; |
| 6155 | parser.pushFollow("as"); |
no test coverage detected