(context string)
| 235 | } |
| 236 | |
| 237 | func (t *Template) expectString(context string) string { |
| 238 | token := t.expectOneOf(itemString, itemRawString, context, "string literal") |
| 239 | s, err := unquote(token.val) |
| 240 | if err != nil { |
| 241 | t.error(err) |
| 242 | } |
| 243 | return s |
| 244 | } |
| 245 | |
| 246 | // parse is the top-level parser for a template, essentially the same |
| 247 | // It runs to EOF. |
no test coverage detected