Menu

[r1]: / IgnoreRule.py  Maximize  Restore  History

Download this file

36 lines (20 with data), 828 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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)
MongoDB Logo MongoDB