parser: add comment about structure of elements to each table
authorYuya Nishihara <yuya@tcha.org>
Sun, 05 Jul 2015 11:06:58 +0900
changeset 25800 f8f7ae0f4d98
parent 25799 0eb093e40813
child 25801 272ff3680bf3
parser: add comment about structure of elements to each table
mercurial/fileset.py
mercurial/revset.py
mercurial/templater.py
--- a/mercurial/fileset.py	Wed Jul 15 04:45:58 2015 +0900
+++ b/mercurial/fileset.py	Sun Jul 05 11:06:58 2015 +0900
@@ -10,6 +10,7 @@
 from i18n import _
 
 elements = {
+    # token-type: binding-strength, prefix, infix, suffix
     "(": (20, ("group", 1, ")"), ("func", 1, ")")),
     "-": (5, ("negate", 19), ("minus", 5)),
     "not": (10, ("not", 10)),
--- a/mercurial/revset.py	Wed Jul 15 04:45:58 2015 +0900
+++ b/mercurial/revset.py	Sun Jul 05 11:06:58 2015 +0900
@@ -115,6 +115,7 @@
     return baseset(sorted(reachable))
 
 elements = {
+    # token-type: binding-strength, prefix, infix, suffix
     "(": (21, ("group", 1, ")"), ("func", 1, ")")),
     "##": (20, None, ("_concat", 20)),
     "~": (18, None, ("ancestor", 18)),
--- a/mercurial/templater.py	Wed Jul 15 04:45:58 2015 +0900
+++ b/mercurial/templater.py	Sun Jul 05 11:06:58 2015 +0900
@@ -15,6 +15,7 @@
 # template parsing
 
 elements = {
+    # token-type: binding-strength, prefix, infix, suffix
     "(": (20, ("group", 1, ")"), ("func", 1, ")")),
     ",": (2, None, ("list", 2)),
     "|": (5, None, ("|", 5)),