SimpleVariables configures the parser to allow for key-value pairs to declare a variable name and expression. For example: variables: - foo: bar - baz: qux This is in contrast to the default behavior, which requires the following syntax: variables: - name: foo expression: bar
()
| 496 | // - name: baz |
| 497 | // expression: qux |
| 498 | func SimpleVariables() ParserOption { |
| 499 | return func(p *Parser) (*Parser, error) { |
| 500 | p.inlineStyleVariables = true |
| 501 | return p, nil |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | // CustomTagVisitor configures the parser to use the given TagVisitor for handling custom tags. |
| 506 | func CustomTagVisitor(visitor TagVisitor) ParserOption { |
no outgoing calls