NewParser creates a new parser with optional configuration.
(opts ...ParserOption)
| 810 | |
| 811 | // NewParser creates a new parser with optional configuration. |
| 812 | func NewParser(opts ...ParserOption) *Parser { |
| 813 | p := &Parser{} |
| 814 | for _, opt := range opts { |
| 815 | opt(p) |
| 816 | } |
| 817 | return p |
| 818 | } |
| 819 | |
| 820 | // ApplyOptions applies parser options to configure behavior. |
| 821 | func (p *Parser) ApplyOptions(opts ...ParserOption) { |
no outgoing calls