| 474 | } |
| 475 | |
| 476 | func (bplist *BlockParameterList) String() (str string) { |
| 477 | buff := bytes.NewBuffer(nil) |
| 478 | for _, bp := range bplist.List { |
| 479 | if bp.Identifier == "" { |
| 480 | fmt.Fprintf(buff, "%s,", bp.Expression) |
| 481 | } else { |
| 482 | if bp.Expression == nil { |
| 483 | fmt.Fprintf(buff, "%s,", bp.Identifier) |
| 484 | } else { |
| 485 | fmt.Fprintf(buff, "%s=%s,", bp.Identifier, bp.Expression) |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | if buff.Len() > 0 { |
| 490 | str = buff.String()[0 : buff.Len()-1] |
| 491 | } |
| 492 | return |
| 493 | } |
| 494 | |
| 495 | // BlockNode represents a {{block }} action. |
| 496 | type BlockNode struct { |