Mercurial > hg
diff mercurial/parser.py @ 13176:895f54a79c6e
templater: use the parser.py parser to extend the templater syntax
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 20 Dec 2010 12:09:00 -0600 |
parents | 05af334bac05 |
children | e798e430c5e5 |
line wrap: on
line diff
--- a/mercurial/parser.py Mon Dec 20 12:09:00 2010 -0600 +++ b/mercurial/parser.py Mon Dec 20 12:09:00 2010 -0600 @@ -22,6 +22,7 @@ self._tokenizer = tokenizer self._elements = elements self._methods = methods + self.current = None def _advance(self): 'advance the tokenizer' t = self.current @@ -76,7 +77,7 @@ def parse(self, message): 'generate a parse tree from a message' self._iter = self._tokenizer(message) - self.current = self._iter.next() + self._advance() return self._parse() def eval(self, tree): 'recursively evaluate a parse tree using node methods'