branch : pmacs2
This commit is contained in:
moculus 2007-08-03 16:56:46 +00:00
parent 7f93cf0910
commit bd73a8dbfb
1 changed files with 13 additions and 0 deletions

13
tab2.py
View File

@ -66,6 +66,19 @@ class Tabber:
return tokens[i - j] return tokens[i - j]
return None return None
def get_nonws_tokens(self, y):
tokens = self.get_tokens(y)
for i in range(0, len(tokens)):
if not self.token_is_whitespace(y, i):
yield tokens[i]
raise StopIteration
def get_nons_tokens(self, y):
tokens = self.get_tokens(y)
for i in range(0, len(tokens)):
if not self.token_is_space(y, i):
yield tokens[i]
raise StopIteration
def region_added(self, p, newlines): def region_added(self, p, newlines):
self.lines = {} self.lines = {}
def region_removed(self, p1, p2): def region_removed(self, p1, p2):