Exemple #1
0
def func1(text):
    for name, regexp in cppRules.items():
        matches = regexp.finditer(text)
        for match in matches:
            microbe.select(match.start(), match.end())
            #print "match", match.start(), match.end()

    return "ok"
Exemple #2
0
def func00(text):
    regexp = re.compile('[^/]/\*(.|[\r\n])*?\*/')
    matches = regexp.finditer(text)
    for match in matches:
        microbe.select(match.start(), match.end())
        print "match", match.start(), match.end()

    return "ok"
Exemple #3
0
def func1(text):
    for name, regexp in regexs.items():
        matches = regexp.finditer(text)
        colors = { 'm' : 1, 'f' : 2, 's' : 3, 'c' : 4, 't' : 5, 'v' : 6 , 'd' : 7}
        for match in matches:
            microbe.select(match.start(), match.end(), colors[name.split('####')[1]])
            #print "match", match.start(), match.end()

    return "ok"
Exemple #4
0
def func0(a):
	print "python '" + a + "'"
	print microbe.select(7, 12);
	return "yes"
Exemple #5
0
def func1(text):
    for range in textRanges:
        microbe.select(range.start, range.end, range.color)

    return "ok"
Exemple #6
0
def func1(text):
    for range in textRanges:
    	#print "colors: select", range.start, range.end, range.color
        microbe.select(range.start, range.end, range.color)

    return "ok"