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

Yuya Nishihara yuya at tcha.org
Sun Jun 21 03:28:42 CDT 2015


# 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

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
 


More information about the Mercurial-devel mailing list