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