from Translator import *
import Object, pdb
class SSSIgnoreRule(Object.SSSObject):
def __init__(self, rule = ''):
super(SSSIgnoreRule, self).__init__()
if rule: self._parse(rule)
def _parse(self, text):
matches = preg_match('^@ignore\s*\{([\w|\W]*)\}$', text.strip())
if not matches:
# Throw error
pdb.set_trace()
#self._values = ValueList.SSSValueList(matches[0], self)
def __str__(self):
string = 'Declarations have been ignored.'
return self.createCommentText(string) + '\n\n'
def set_cssText(self, txt):
return self._parse(txt)
def get_cssText(self):
return self.__str__()
cssText = property(get_cssText, set_cssText)