From bd73a8dbfba529a532b98c1bd34379f1334da38f Mon Sep 17 00:00:00 2001 From: moculus Date: Fri, 3 Aug 2007 16:56:46 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- tab2.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tab2.py b/tab2.py index 905ee2d..63a707b 100644 --- a/tab2.py +++ b/tab2.py @@ -66,6 +66,19 @@ class Tabber: return tokens[i - j] 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): self.lines = {} def region_removed(self, p1, p2):