(tokens)
| 1672 | return this.#features[token.value || ""]; |
| 1673 | } |
| 1674 | parseHyperScript(tokens) { |
| 1675 | var parser = new Parser(this, tokens); |
| 1676 | var result; |
| 1677 | var lastError = null; |
| 1678 | try { |
| 1679 | result = parser.parseElement("hyperscript"); |
| 1680 | if (tokens.hasMore()) parser.raiseError(); |
| 1681 | } catch (e) { |
| 1682 | if (!(e instanceof ParseRecoverySentinel)) throw e; |
| 1683 | lastError = e.parseError; |
| 1684 | } |
| 1685 | if (!result) result = new HyperscriptProgram([]); |
| 1686 | result.errors = result.collectErrors(); |
| 1687 | if (lastError) result.errors.push(lastError); |
| 1688 | return result; |
| 1689 | } |
| 1690 | #syncToFeature(parser) { |
| 1691 | parser.tokens.clearFollows(); |
| 1692 | while (parser.hasMore() && !parser.featureStart(parser.currentToken()) && parser.currentToken().value !== "end" && parser.currentToken().type !== "EOF") { |
no test coverage detected