Skip to content
Snippets Groups Projects
Commit 4fb3286c authored by Norihiro Watanabe's avatar Norihiro Watanabe
Browse files

renaming also affects normalize-param-cache.py

parent f437bf6f
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,11 @@ comment = re.compile(r"^//! \\ogs_file_(param|attr)\{([A-Za-z_0-9]+)\}( \\todo . ...@@ -19,11 +19,11 @@ comment = re.compile(r"^//! \\ogs_file_(param|attr)\{([A-Za-z_0-9]+)\}( \\todo .
comment_special = re.compile(r"^//! \\ogs_file(_param|_attr)?_special(\{[A-Za-z_0-9]+\})?( \\todo .*)?$") comment_special = re.compile(r"^//! \\ogs_file(_param|_attr)?_special(\{[A-Za-z_0-9]+\})?( \\todo .*)?$")
# capture #5 is the parameter name # capture #5 is the parameter name
getter = re.compile(r'^(get|check|ignore|peek)Conf(Param|Attribute|Subtree)(List|Optional|All)?' getter = re.compile(r'^(get|check|ignore|peek)Config(Parameter|Attribute|Subtree)(List|Optional|All)?'
+r'(<.*>)?' +r'(<.*>)?'
+r'\("([a-zA-Z_0-9:]+)"[,)]') +r'\("([a-zA-Z_0-9:]+)"[,)]')
getter_special = re.compile(r'^(get|check|ignore|peek)Conf(Param|Attribute|Subtree)(List|Optional|All)?' getter_special = re.compile(r'^(get|check|ignore|peek)Config(Parameter|Attribute|Subtree)(List|Optional|All)?'
+r'(<.*>)?\(') +r'(<.*>)?\(')
state = "getter" state = "getter"
...@@ -78,7 +78,7 @@ for inline in sys.stdin: ...@@ -78,7 +78,7 @@ for inline in sys.stdin:
if m: if m:
param = m.group(5) param = m.group(5)
paramtype = m.group(4)[1:-1] if m.group(4) else "" paramtype = m.group(4)[1:-1] if m.group(4) else ""
method = m.group(1) + "Conf" + m.group(2) + (m.group(3) or "") method = m.group(1) + "Config" + m.group(2) + (m.group(3) or "")
if state != "comment" or oldpath != path: if state != "comment" or oldpath != path:
write_out("NODOC", path, lineno, "NONE", param, paramtype, method) write_out("NODOC", path, lineno, "NONE", param, paramtype, method)
...@@ -93,7 +93,7 @@ for inline in sys.stdin: ...@@ -93,7 +93,7 @@ for inline in sys.stdin:
debug("error: the associated comment is not on the line preceding this one." debug("error: the associated comment is not on the line preceding this one."
+ " line numbers {0} vs. {1}".format(oldlineno, lineno)) + " line numbers {0} vs. {1}".format(oldlineno, lineno))
write_out("NODOC", path, lineno, tag_path_comment, param, paramtype, method) write_out("NODOC", path, lineno, tag_path_comment, param, paramtype, method)
elif param_or_attr_comment == "param" and m.group(2) != "Param" and m.group(2) != "Subtree": elif param_or_attr_comment == "param" and m.group(2) != "Parameter" and m.group(2) != "Subtree":
debug("error: comment says param but code says different.") debug("error: comment says param but code says different.")
write_out("NODOC", path, lineno, tag_path_comment, param, paramtype, method) write_out("NODOC", path, lineno, tag_path_comment, param, paramtype, method)
elif param_or_attr_comment == "attr" and m.group(2) != "Attribute": elif param_or_attr_comment == "attr" and m.group(2) != "Attribute":
...@@ -111,7 +111,7 @@ for inline in sys.stdin: ...@@ -111,7 +111,7 @@ for inline in sys.stdin:
m = getter_special.match(line) m = getter_special.match(line)
if m: if m:
paramtype = m.group(4)[1:-1] if m.group(4) else "" paramtype = m.group(4)[1:-1] if m.group(4) else ""
method = m.group(1) + "Conf" + m.group(2) + (m.group(3) or "") method = m.group(1) + "Config" + m.group(2) + (m.group(3) or "")
if state != "comment" or oldpath != path: if state != "comment" or oldpath != path:
write_out("NODOC", path, lineno, "NONE", "UNKNOWN", paramtype, method) write_out("NODOC", path, lineno, "NONE", "UNKNOWN", paramtype, method)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment