parser: add placeholder for ini Parser
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -2,7 +2,10 @@ module asciigoat.org/ini
|
||||
|
||||
go 1.19
|
||||
|
||||
require github.com/mgechev/revive v1.3.3
|
||||
require (
|
||||
asciigoat.org/core v0.3.4
|
||||
github.com/mgechev/revive v1.3.3
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
asciigoat.org/core v0.3.4 h1:FQ4IvqQS7T1wke0dOeKUABtNY+JQHmccmedBjz18j9s=
|
||||
asciigoat.org/core v0.3.4/go.mod h1:tXj+JUutxRbcO40ZQRuUVaZ4rnYz1kAZ0nblisV8u74=
|
||||
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
||||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/chavacava/garif v0.0.0-20230608123814-4bd63c2919ab h1:5JxePczlyGAtj6R1MUEFZ/UFud6FfsOejq7xLC2ZIb0=
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user