# HG changeset patch # User Yuya Nishihara # Date 2015-07-06 13:01:41 # Node ID 455190fb4e510e37830eec27da08743ef207729a # Parent 42ac9d1d1572e07760927f75781f911bcb3fa9cc parser: take suffix action if no infix action is defined If no infix action is defined, a suffix action isn't ambiguous, so it should be taken no matter if the next token can be an operand. This is exactly the same flow as prefix/primary handling. This change has no effect now because all suffix tokens have infix actions. diff --git a/mercurial/parser.py b/mercurial/parser.py --- a/mercurial/parser.py +++ b/mercurial/parser.py @@ -62,7 +62,7 @@ class parser(object): token, value, pos = self._advance() # handle infix rules, take as suffix if unambiguous infix, suffix = self._elements[token][3:] - if suffix and not self._hasnewterm(): + if suffix and not (infix and self._hasnewterm()): expr = (suffix[0], expr) elif infix: expr = (infix[0], expr, self._parseoperand(*infix[1:]))