]> git.lizzy.rs Git - rust.git/commitdiff
Add comments.
authorNick Hamann <nick@wabbo.org>
Mon, 13 Jul 2015 02:19:19 +0000 (21:19 -0500)
committerNick Hamann <nick@wabbo.org>
Mon, 13 Jul 2015 02:19:19 +0000 (21:19 -0500)
src/etc/errorck.py

index 4f529f5632c39e3197bc85b53b8d1bf876e5e23d..48736542f20c7fda99c1d0c316049ed892a5a86f 100644 (file)
@@ -23,6 +23,15 @@ src_dir = sys.argv[1]
 errcode_map = {}
 error_re = re.compile("(E\d\d\d\d)")
 
+# In the register_long_diagnostics! macro, entries look like this:
+#
+# EXXXX: r##"
+# <Long diagnostic message>
+# "##,
+#
+# These two variables are for detecting the beginning and end of diagnostic
+# messages so that duplicate error codes are not reported when a code occurs
+# inside a diagnostic message
 long_diag_begin = "r##\""
 long_diag_end = "\"##"
 
@@ -41,6 +50,7 @@ for (dirpath, dirnames, filenames) in os.walk(src_dir):
             inside_long_diag = False
             for line_num, line in enumerate(f, start=1):
                 if inside_long_diag:
+                    # Skip duplicate error code checking for this line
                     if long_diag_end in line:
                         inside_long_diag = False
                     continue