parser: WIP

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-08-30 02:27:46 +01:00
parent 7c0688e3b1
commit 7a5dc59929
3 changed files with 43 additions and 13 deletions
+4
View File
@@ -13,3 +13,7 @@ func (p *Parser) emitError(content string, err error) (lexer.StateFn, error) {
return nil, err
}
}
func (p *Parser) emitInvalidRune(r rune) (lexer.StateFn, error) {
return p.emitError(string([]rune{r}), lexer.ErrUnacceptableRune)
}