Commit 73de377e authored by erodrigu's avatar erodrigu
Browse files

Capture write statements with a REGEX and case insensitive

parent 13d8fcd1
......@@ -242,8 +242,8 @@ class ImplementRPE:
pattern = "^[^\!]*\s*write\([^()]*\) (.*)."
for l_index, line in enumerate(module.lines):
if re.search("WRITE *\(", line):
wc = BasicFunctions.close_brackets(line[line.find("WRITE"):])
if re.search("(?<!\w)(WRITE) *\(", line, re.IGNORECASE):
wc = BasicFunctions.close_brackets(line[line.lower().find("write"):])
line = line.replace(wc, "WRITE()")
matches = re.search(pattern, line.strip(), re.IGNORECASE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment