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

Method textOrAction

parse.go:502–512  ·  view source on GitHub ↗

textOrAction: text | action

()

Source from the content-addressed store, hash-verified

500//
501// text | action
502func (t *Template) textOrAction() Node {
503 switch token := t.nextNonSpace(); token.typ {
504 case itemText:
505 return t.newText(token.pos, token.val)
506 case itemLeftDelim:
507 return t.action()
508 default:
509 t.unexpected(token, "input", "text or action")
510 }
511 return nil
512}
513
514func (t *Template) action() (n Node) {
515 switch token := t.nextNonSpace(); token.typ {

Callers 2

parseTemplateMethod · 0.95
itemListMethod · 0.95

Calls 4

nextNonSpaceMethod · 0.95
newTextMethod · 0.95
actionMethod · 0.95
unexpectedMethod · 0.95

Tested by

no test coverage detected