parser: add placeholder for ini Parser

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-08-28 23:46:05 +00:00
parent 651b9691bf
commit 54ae6fe27e
3 changed files with 29 additions and 0 deletions
+2
View File
@@ -1,3 +1,5 @@
module asciigoat.org/ini
go 1.19
require asciigoat.org/core v0.3.2
+2
View File
@@ -0,0 +1,2 @@
asciigoat.org/core v0.3.2 h1:ef4cixd5YPDFUPylgcqMXQMKJTnMD/1IROsFAm/UOO0=
asciigoat.org/core v0.3.2/go.mod h1:o4QARukIxCAnOnIi7gIWd+7z1P1d9qNxuZmOVG4MAno=
+25
View File
@@ -0,0 +1,25 @@
// Package parser parses dosini-style files
package parser
import (
"io"
"asciigoat.org/core/lexer"
)
// Parser parses a dosini-style document
type Parser struct {
src *lexer.Reader
}
// NewParser creates a dosini-style parser using
// an [io.Reader] as source
func NewParser(r io.Reader) *Parser {
if r == nil {
return nil
}
return &Parser{
src: lexer.NewReader(r),
}
}