anchor.diff:    
     final RegExp _validIdentifier = new RegExp(r'^[0-9a-zA-Z\_\-\.]+$');
     
  +  static const _tagTypeMap = const {
  +          '#': TagType.openSection,
  +          '^': TagType.openInverseSection,
  +          '/': TagType.closeSection,
  +          '&': TagType.unescapedVariable,
  +          '>': TagType.partial,
  +          '!': TagType.comment};
  +  
     //TODO clean up EOF handling.
     Tag _readTag() {
       
  -    var open = _read();
  -    
  -    checkEof() {
  -      if (_peek() == null) {
  -        throw _error(
  -            'Tag not closed before the end of the template.', open.start);
  -      }
  -    }
  - 
  -    checkEof();
  -    
  -    //TODO perhaps handle Eof in readif
  -    //TODO _readIf()
  -    if (_peek().type == TokenType.whitespace) _read();
  -    
  -    checkEof();
  +    var open = _expect(TokenType.openDelimiter);
  +    
  +    _readIf(TokenType.whitespace);
       
       // A sigil is the character which identifies which sort of tag it is,
       // i.e.  '#', '/', or '>'.
       // Variable tags and triple mustache tags don't have a sigil.
       TagType tagType;
  +    
       if (open.value == '{{{') {
         tagType = TagType.tripleMustache;
  -    } else if (_peek().type == TokenType.sigil) {
  -      tagType = tagTypeFromString(_read().value);
       } else {
  -      tagType = TagType.variable;
  -    }
  -
  -    checkEof();
  -      
  -    if (_peek().type == TokenType.whitespace) _read();
  -    
  -    checkEof();
  +      var sigil = _readIf(TokenType.sigil);
  +      tagType = sigil == null ? TagType.variable : _tagTypeMap[sigil.value];
  +    }
  +      
  +    _readIf(TokenType.whitespace);
       
       // TODO split up names here instead of during render.
       // Also check that they are valid token types.
  
positive.code:          .join()
           .trim();
    
      checkEof();
      
      // Check to see if tag name is valid.
      if (tagType != TagType.comment) {    
  
negative.code:       }    
      }
      
      var close = _expect(TokenType.closeDelimiter);
          
      return new Tag(tagType, name, open.start, close.end);
    }
  