()
| 297 | } |
| 298 | |
| 299 | func (s *scanner) readTagName() bool { |
| 300 | s.skipSpace() |
| 301 | s.t.init(tagName, s.line, s.pos()) |
| 302 | for { |
| 303 | if s.isSpace() || s.c == '%' { |
| 304 | if s.c == '%' { |
| 305 | s.unreadByte('~') |
| 306 | } |
| 307 | s.nextTokenID = tagContents |
| 308 | return true |
| 309 | } |
| 310 | if (s.c >= 'a' && s.c <= 'z') || (s.c >= 'A' && s.c <= 'Z') || (s.c >= '0' && s.c <= '9') || s.c == '=' || s.c == '.' { |
| 311 | s.appendByte() |
| 312 | if !s.nextByte() { |
| 313 | return false |
| 314 | } |
| 315 | continue |
| 316 | } |
| 317 | if s.c == '-' { |
| 318 | s.unreadByte(s.c) |
| 319 | s.nextTokenID = tagContents |
| 320 | return true |
| 321 | } |
| 322 | s.err = fmt.Errorf("unexpected character: '%c'", s.c) |
| 323 | s.unreadByte('~') |
| 324 | return false |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | func (s *scanner) readTagContents() bool { |
| 329 | s.skipSpace() |
no test coverage detected