Commit Graph

16 Commits

Author SHA1 Message Date
Yuya Nishihara
ca51f820ee parser: add helper to reduce nesting of chained infix operations
This will be used to avoid stack overflow caused by chained 'or' operations
in revset.
2015-04-26 18:05:23 +09:00
Yuya Nishihara
1ec56bf564 parser: extract closure of prettyformat() to a top-level function
There was no capture until I added 'leafnodes' argument.
2015-05-06 10:17:41 +09:00
Yuya Nishihara
09759e9679 parser: move prettyformat() function from revset module
I want to use it in doctests that I'll add by future patches. Also, it can
be used in "hg debugfileset" command.
2015-04-26 22:20:03 +09:00
Pierre-Yves David
5ec3f86b27 parsers: use 'next' instead of try/except
This get rid of another StopIteration abomination. The change in self.current
value is supposed to not matter as nobody should be calling '_advance' after
that (as per Matt wisdom).
2015-05-18 12:27:15 -05:00
Matt Mackall
39f29cd5bc parser: allow passing a lookup function to a tokenizer
This will allow us to dynamically handle hyphenated symbols in revsets.
2014-03-18 17:17:23 -05:00
timeless@mozdev.org
023e023a87 en-us: labeled 2012-08-17 13:58:18 -07:00
Mads Kiilerich
473bcd3ed1 parsers: fix localization markup of parser errors 2011-06-21 00:17:52 +02:00
Bernhard Leiner
baf797018e revset: report a parse error if a revset is not parsed completely (issue2654) 2011-03-16 23:09:14 +01:00
Matt Mackall
0b9296f805 templater: use the parser.py parser to extend the templater syntax 2010-12-20 12:09:00 -06:00
Julian Cowley
96da4ff949 parser: fix URL to effbot 2010-06-11 01:35:38 -10:00
Matt Mackall
8de0daaafc parser: improve infix error checking
(spotted by timeless)
2010-06-19 17:56:52 -05:00
Peter Arrenbrecht
e4f22f6bc6 parser: fix missing param in _match 2010-06-08 16:27:59 +02:00
Dirkjan Ochtman
64bb18f0dd cleanups: undefined variables 2010-06-08 09:30:45 +02:00
Matt Mackall
a963622643 revset: raise ParseError exceptions 2010-06-04 20:57:52 -05:00
Matt Mackall
96ee2ad35a revset: add support for prefix and suffix versions of : and :: 2010-06-02 14:07:46 -05:00
Matt Mackall
f9905b5aeb revset: introduce basic parser 2010-06-01 11:18:57 -05:00