(self, ins)
Parse PALETTE syntax.
Parse PALETTE syntax.
Parse PALETTE syntax .
def _parse_palette(self, ins):
        """Parse PALETTE syntax."""
        attrib = self.parse_expression(ins, allow_empty=True)
        yield attrib
        if attrib is None:
            yield None
            ins.require_end()
        else:
            ins.require_read((b',',))
            colour = self.parse_expression(ins, allow_empty=True)
            yield colour
            error.throw_if(attrib is None or colour is None, error.STX)
def _parse_palette ( self , ins ) : attrib = self . parse_expression ( ins , allow_empty = True ) yield attrib if attrib is None : yield None ins . require_end ( ) else : ins . require_read ( ( b',' , ) ) colour = self . parse_expression ( ins , allow_empty = True ) yield colour error . throw_if ( attrib is None or colour is None , error . STX )