changeset 25655:b8b73652c1c9

parser: update documentation about tokenizer and elements
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 Jun 2015 00:56:09 +0900
parents af329a84310c
children 88d244f4edfd
files mercurial/parser.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/parser.py	Sun Jun 21 00:49:26 2015 +0900
+++ b/mercurial/parser.py	Sun Jun 21 00:56:09 2015 +0900
@@ -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