#NEWLINE# def read_at_rule( self , at_keyword_token , tokens ) : #NEWLINE# #INDENT# 'Read an at-rule from a token stream.\n\n        :param at_keyword_token:\n            The ATKEYWORD token that starts this at-rule\n            You may have read it already to distinguish the rule\n            from a ruleset.\n        :param tokens:\n            An iterator of subsequent tokens. Will be consumed just enough\n            for one at-rule.\n        :return:\n            An unparsed :class:`AtRule`.\n        :raises:\n            :class:`~.parsing.ParseError` if the head is invalid for the core\n            grammar. The body is **not** validated. See :class:`AtRule`.\n\n        ' #NEWLINE# at_keyword = at_keyword_token . value . lower ( ) #NEWLINE# head = [ ] #NEWLINE# token = at_keyword_token #NEWLINE# for token in tokens : #NEWLINE# #INDENT# if ( token . type in '{;' ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# head . append ( token ) #NEWLINE# #UNINDENT# #UNINDENT# head = strip_whitespace ( head ) #NEWLINE# for head_token in at_keyword : #NEWLINE# #INDENT# validate_any ( head_token , 'at-rule head' ) #NEWLINE# #UNINDENT# body = ( token . content if ( token . type == '{' ) else None ) #NEWLINE# return AtRule ( at_keyword , head , body , at_keyword_token . line , at_keyword_token . column )