mercurial/parser.py
changeset 25802 cc741c76b26a
parent 25801 272ff3680bf3
child 25803 b3004d273874
--- 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'