MCPcopy Create free account
hub / github.com/CloudyKit/jet / parseTry

Method parseTry

parse.go:991–1001  ·  view source on GitHub ↗

Try-catch: {{try}} itemList {{catch }} itemList {{end}} try keyword is past.

()

Source from the content-addressed store, hash-verified

989//
990// try keyword is past.
991func (t *Template) parseTry() *TryNode {
992 var recov *catchNode
993 line := t.lex.lineNumber()
994 pos := t.expectRightDelim("try").pos
995 list, next := t.itemList(nodeCatch, nodeEnd)
996 if next.Type() == nodeCatch {
997 recov = next.(*catchNode)
998 }
999
1000 return t.newTry(pos, line, list, recov)
1001}
1002
1003// catch:
1004//

Callers 1

actionMethod · 0.95

Calls 5

expectRightDelimMethod · 0.95
itemListMethod · 0.95
newTryMethod · 0.95
lineNumberMethod · 0.80
TypeMethod · 0.65

Tested by

no test coverage detected