alecthomas / alecthomas/participle

error returned from Capture interface does not contain position and is not wrapped

Aperta
#137 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
3.9k
Fork
213
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Sometimes it is useful to return an error from the `Capture(values []string) error` method. However the final returned parser error is not decorated with the position properly.

Actually the returned error is a v2.parseError but it does not contain a valid lexer.Position. Also the original error is discarded and just the message is kept instead of using the wrappingParseError type.

It seems like that the decorate function in setField (nodes.go:553) should do the job, but it does not use the tokens position. Also it just uses the parseError type instead of the wrappingParseError.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.