WithLogger sets the logger to be used by Parser
(logger slog.Logger)
| 50 | |
| 51 | // WithLogger sets the logger to be used by Parser |
| 52 | func WithLogger(logger slog.Logger) Option { |
| 53 | return func(p *Parser) { |
| 54 | p.logger = logger |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // New returns a new instance of Parser, as well as any diagnostics |
| 59 | // encountered while parsing the module. |
no outgoing calls