(tokens)
| 387 | } |
| 388 | |
| 389 | parseHyperScript(tokens) { |
| 390 | var parser = new Parser(this, tokens); |
| 391 | var result; |
| 392 | var lastError = null; |
| 393 | try { |
| 394 | result = parser.parseElement("hyperscript"); |
| 395 | if (tokens.hasMore()) parser.raiseError(); |
| 396 | } catch (e) { |
| 397 | if (!(e instanceof ParseRecoverySentinel)) throw e; |
| 398 | lastError = e.parseError; |
| 399 | } |
| 400 | if (!result) result = new HyperscriptProgram([]); |
| 401 | result.errors = result.collectErrors(); |
| 402 | if (lastError) result.errors.push(lastError); |
| 403 | return result; |
| 404 | } |
| 405 | |
| 406 | #syncToFeature(parser) { |
| 407 | parser.tokens.clearFollows(); |
no test coverage detected