catch: {{catch }} itemList {{end}} catch keyword is past.
()
| 1008 | // |
| 1009 | // catch keyword is past. |
| 1010 | func (t *Template) parseCatch() *catchNode { |
| 1011 | line := t.lex.lineNumber() |
| 1012 | var errVar *IdentifierNode |
| 1013 | peek := t.peekNonSpace() |
| 1014 | if peek.typ != itemRightDelim { |
| 1015 | _errVar := t.term() |
| 1016 | if typ := _errVar.Type(); typ != NodeIdentifier { |
| 1017 | t.errorf("unexpected node type '%s' in catch", typ) |
| 1018 | } |
| 1019 | errVar = _errVar.(*IdentifierNode) |
| 1020 | } |
| 1021 | t.expectRightDelim("catch") |
| 1022 | list, _ := t.itemList(nodeEnd) |
| 1023 | return t.newCatch(peek.pos, line, errVar, list) |
| 1024 | } |
| 1025 | |
| 1026 | // term: |
| 1027 | // |
no test coverage detected