anchor.diff:      
         assert(_peek().type == TokenType.lineEnd || _i == 0);
     
  -      //TODO _readIf(TokenType) helper.
  -      var precedingLineEnd = _peek() != null && _peek().type == TokenType.lineEnd
  -          ? _read() : null;
  -      
  -      // The scanner guarantees that there will only be a single whitespace token,
  -      // there are never consecutive whitespace tokens.
  -      var precedingWhitespace =
  -        _peek() != null && _peek().type == TokenType.whitespace ? _read() : null;
  +      var precedingLineEnd = _readIf(TokenType.lineEnd, eofOk: true);
  +      var precedingWhitespace = _readIf(TokenType.whitespace, eofOk: true);
             
         Tag tag;
         Node tagNode;
  
positive.code:     
      _currentDelimiters = _delimiters;
      
      _stack.add(new SectionNode('root', 0, 0, _delimiters));    
    
      // Handle standalone tag on first line.
  
negative.code:     //TODO incorporate this into _readWhile()
      _checkEof();
      
      // Check to see if the tag name is valid.
      if (tagType != TagType.comment) {    
        if (name == '') throw _error('Empty tag name.', open.start);      
        if (!_lenient) {
          if (name.contains('\t') || name.contains('\n') || name.contains('\r')) {
            throw _error('Tags may not contain newlines or tabs.', open.start);
          }    
          
          if (!_validIdentifier.hasMatch(name)) {
            throw _error('Unless in lenient mode, tags may only contain the '
                'characters a-z, A-Z, minus, underscore and period.', open.start);
          }
        }
      }
      
      var close = _expect(TokenType.closeDelimiter);
  