parser: implement basic dosini parsing

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-08-31 01:50:05 +00:00
parent 1090a374f0
commit eb36c195c0
3 changed files with 137 additions and 5 deletions
+4
View File
@@ -70,6 +70,10 @@ func (p *Parser) emitError(content string, err error) (lexer.StateFn, error) {
}
}
func (p *Parser) emitInvalidRune(r rune) (lexer.StateFn, error) {
return p.emitError(string([]rune{r}), lexer.ErrUnacceptableRune)
}
// stepLine discards the data and moves the position
// to the next line.
func (p *Parser) stepLine() {