(tokens)
| 1662 | return this.#features[token.value || ""]; |
| 1663 | } |
| 1664 | parseHyperScript(tokens) { |
| 1665 | var parser = new Parser(this, tokens); |
| 1666 | var result; |
| 1667 | var lastError = null; |
| 1668 | try { |
| 1669 | result = parser.parseElement("hyperscript"); |
| 1670 | if (tokens.hasMore()) parser.raiseError(); |
| 1671 | } catch (e) { |
| 1672 | if (!(e instanceof ParseRecoverySentinel)) throw e; |
| 1673 | lastError = e.parseError; |
| 1674 | } |
| 1675 | if (!result) result = new HyperscriptProgram([]); |
| 1676 | result.errors = result.collectErrors(); |
| 1677 | if (lastError) result.errors.push(lastError); |
| 1678 | return result; |
| 1679 | } |
| 1680 | #syncToFeature(parser) { |
| 1681 | parser.tokens.clearFollows(); |
| 1682 | while (parser.hasMore() && !parser.featureStart(parser.currentToken()) && parser.currentToken().value !== "end" && parser.currentToken().type !== "EOF") { |
no test coverage detected