Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cd35c83125 | |||
| 1b236f3638 | |||
| 76659d2326 | |||
| 7a5dc59929 | |||
| 7c0688e3b1 | |||
| e0155b5103 | |||
| 8f34cdf891 | |||
| 70c8ed1d34 | |||
| 00fcde4c5b |
@@ -5,7 +5,7 @@ go 1.19
|
||||
replace asciigoat.org/core => ../core
|
||||
|
||||
require (
|
||||
asciigoat.org/core v0.3.6
|
||||
asciigoat.org/core v0.3.4
|
||||
github.com/mgechev/revive v1.3.3
|
||||
)
|
||||
|
||||
|
||||
+2
-16
@@ -13,24 +13,10 @@ type Parser struct {
|
||||
|
||||
pos lexer.Position
|
||||
|
||||
// OnSection is called after a [section] is parsed.
|
||||
// Returning an error will abort the process.
|
||||
OnSection func(pos lexer.Position, name, subname string, hasSubname bool) error
|
||||
|
||||
// OnField is called after a `key = value` entry is parsed
|
||||
// Returning an error will abort the process.
|
||||
OnField func(pos lexer.Position, key, value string) error
|
||||
|
||||
// OnComment is called after a comment is parsed
|
||||
// Returning an error will abort the process.
|
||||
OnField func(pos lexer.Position, key, value string) error
|
||||
OnComment func(pos lexer.Position, comment string) error
|
||||
|
||||
// OnError is called after each parsing error, which you are allowed to
|
||||
// override.
|
||||
// OnError is called for EOF as well, but this error isn't returned as such by
|
||||
// Parser.Run(). The caller will receive (nil, nil) instead indicating the
|
||||
// processes terminated correctly.
|
||||
OnError func(pos lexer.Position, content string, err error) error
|
||||
OnError func(pos lexer.Position, content string, err error) error
|
||||
}
|
||||
|
||||
func defaultOnSection(_ lexer.Position, _, _ string, _ bool) error { return nil }
|
||||
|
||||
Reference in New Issue
Block a user