Example #1
0
func newOutput(p *core.Parser) (core.Code, error) {
	p.ForwardBy(2) // skip the {{
	value, err := p.ReadValue()
	if err != nil || value == nil {
		return nil, err
	}

	filters, err := p.ReadFilters()
	if err != nil {
		return nil, err
	}
	p.SkipPastOutput()
	return &Output{value, filters}, nil
}