alecthomas / alecthomas/participle
Error recovery ideas
Aberta
- Linguagem predominante
- Go
- Estrelas
- 3.9k
- Forks
- 213
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Implement a `RecoverToNext(token...string)` option that allows resumption from synchronisation tokens. eg. a language might choose statement keywords like `if`, `while`, etc. as synchronisation tokens.
Edit: it might be better to specify a list of nodes to recover to, or generate a mapping of token value to node. The parser would then traverse up from the failing node to the nearest recovery node and attempt to match the token for that node. eg. `if`, `while`, etc. might map to the `Statement` node.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.