()
| 720 | } |
| 721 | |
| 722 | func (p *parser) isNamedRoute() (bool, string) { |
| 723 | keys := p.block.Keys |
| 724 | // A named route block is a single key with parens, prefixed with &. |
| 725 | if len(keys) == 1 && strings.HasPrefix(keys[0].Text, "&(") && strings.HasSuffix(keys[0].Text, ")") { |
| 726 | return true, strings.TrimSuffix(keys[0].Text[2:], ")") |
| 727 | } |
| 728 | return false, "" |
| 729 | } |
| 730 | |
| 731 | func (p *parser) isSnippet() (bool, string) { |
| 732 | keys := p.block.Keys |