diff mercurial/formatter.py @ 28871:6d6201fc5aae

parser: move alias declaration parser to common rule-set class The original _parsealiasdecl() function is split into common _builddecl() and revset-specific _parsealiasdecl(). And the original _parsealiasdecl() call is temporarily replaced by rules._builddecl(), which should be eliminated later. The doctests are mostly ported by using the dummy parse(), but the test for 'foo bar' is kept in _parsealiasdecl() as it checks if "pos != len(decl)" is working. Also, 'foo($1)' test is added to make sure the alias tokenizer can handle '$1' symbol, which is the only reason why we need _parsealiasdecl().
author Yuya Nishihara <yuya@tcha.org>
date Mon, 29 Feb 2016 17:54:03 +0900
parents bf35644b9f3a
children f97a0bcfd7a1
line wrap: on
line diff