changeset 25802:cc741c76b26a

parser: remove unused parameter 'pos' from _match() This backs out 9d1cf337a78d. The issue spotted by that changeset was addressed earlier by d4cafcb63f77.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Jul 2015 17:50:35 +0900
parents 272ff3680bf3
children b3004d273874
files mercurial/parser.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/parser.py	Sun Jul 05 11:17:22 2015 +0900
+++ b/mercurial/parser.py	Sun Jul 05 17:50:35 2015 +0900
@@ -29,7 +29,7 @@
         t = self.current
         self.current = next(self._iter, None)
         return t
-    def _match(self, m, pos):
+    def _match(self, m):
         'make sure the tokenizer matches an end condition'
         if self.current[0] != m:
             raise error.ParseError(_("unexpected token: %s") % self.current[0],
@@ -45,12 +45,12 @@
             expr = (prefix[0], value)
         else:
             if len(prefix) > 2 and prefix[2] == self.current[0]:
-                self._match(prefix[2], pos)
+                self._match(prefix[2])
                 expr = (prefix[0], None)
             else:
                 expr = (prefix[0], self._parse(prefix[1]))
                 if len(prefix) > 2:
-                    self._match(prefix[2], pos)
+                    self._match(prefix[2])
         # gather tokens until we meet a lower binding strength
         while bind < self._elements[self.current[0]][0]:
             token, value, pos = self._advance()
@@ -63,12 +63,12 @@
                 if not infix:
                     raise error.ParseError(_("not an infix: %s") % token, pos)
                 if len(infix) == 3 and infix[2] == self.current[0]:
-                    self._match(infix[2], pos)
+                    self._match(infix[2])
                     expr = (infix[0], expr, (None))
                 else:
                     expr = (infix[0], expr, self._parse(infix[1]))
                     if len(infix) == 3:
-                        self._match(infix[2], pos)
+                        self._match(infix[2])
         return expr
     def parse(self, tokeniter):
         'generate a parse tree from tokens'