func (p *Parser) ParseDeclaration(s *Scanner) *Declaration {
	p.skipWhitespace(&scanner{s})
	if tok := s.Scan(); tok.Tok != IdentToken {
		p.Errors = append(p.Errors, &Error{Message: fmt.Sprintf("expected ident, got %s", print(s.current())), Pos: Position(s.current())})
		return nil
	}
	s.unscan()
	return p.ConsumeDeclaration(&scanner{s})
}
ParseDeclaration parses a name/value declaration.
package css
import (
	"fmt"
	"strings"
)
type Parser struct {
	Errors ErrorList
}
func (p *Parser) ParseStyleSheet(s *Scanner) *StyleSheet {
	ss := &StyleSheet{}
	ss.Rules = p.ConsumeRules(&scanner{s}, true)
	return ss
}
func (p *Parser) ParseRules(s *Scanner) Rules {
	return p.ConsumeRules(&scanner{s}, false)
}
func (p *Parser) ParseRule(s *Scanner) Rule {
	var r Rule
	p.skipWhitespace(&scanner{s})
	tok := s.Scan()
	if tok.Tok == EOFToken {
		p.Errors = append(p.Errors, &Error{Message: "unexpected EOF", Pos: Position(s.current())})
		return nil
	} else if tok.Tok == AtKeywordToken {
		r = p.ConsumeAtRule(&scanner{s})
	} else {
		s.unscan()
		r = p.ConsumeQualifiedRule(&scanner{s})
	}
	p.skipWhitespace(&scanner{s})
	if tok := s.Scan(); tok.Tok != EOFToken {
		p.Errors = append(p.Errors, &Error{Message: fmt.Sprintf("expected EOF, got %s", print(s.current())), Pos: Position(s.current())})
		return nil
	}
	return r
}