[PATCH 2 of 2] parser: update documentation about tokenizer and elements

Augie Fackler raf at durin42.com
Tue Jun 23 09:18:42 CDT 2015


On Sun, Jun 21, 2015 at 05:28:42PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1434815769 -32400
> #      Sun Jun 21 00:56:09 2015 +0900
> # Node ID 90851ca8141f20b498f4d2239c6d5f5c2a1eaed0
> # Parent  f872d2a17b67f9c34140cb9a94279ce910985cc4
> parser: update documentation about tokenizer and elements

This all looks superficially fine to me, but I don't know the parser
well. mpm, can you look at this one?

>
> diff --git a/mercurial/parser.py b/mercurial/parser.py
> --- a/mercurial/parser.py
> +++ b/mercurial/parser.py
> @@ -10,8 +10,9 @@
>  # for background
>
>  # takes a tokenizer and elements
> -# tokenizer is an iterator that returns type, value pairs
> -# elements is a mapping of types to binding strength, prefix and infix actions
> +# tokenizer is an iterator that returns (type, value, pos) tuples
> +# elements is a mapping of types to binding strength, prefix, infix and
> +# optional suffix actions
>  # an action is a tree node name, a tree label, and an optional match
>  # __call__(program) parses program into a labeled tree
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list