mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-22 04:13:33 +01:00
Corrected bug with += in strings
This commit is contained in:
parent
e7f9ec3075
commit
3729312876
@ -366,7 +366,12 @@ def add_operators(text):
|
|||||||
result = []
|
result = []
|
||||||
for line in text:
|
for line in text:
|
||||||
buffer = line.text
|
buffer = line.text
|
||||||
if "+=" in buffer:
|
ls = buffer.strip()
|
||||||
|
if ls.startswith('print ') or \
|
||||||
|
ls.startswith('print*') or \
|
||||||
|
ls.startswith('write('):
|
||||||
|
pass
|
||||||
|
elif "+=" in buffer:
|
||||||
if buffer.lstrip().startswith("if "):
|
if buffer.lstrip().startswith("if "):
|
||||||
re_incr = re.compile(r"(.*)(\))(\s*)(.*)(\+=)(.*$)",re.S)
|
re_incr = re.compile(r"(.*)(\))(\s*)(.*)(\+=)(.*$)",re.S)
|
||||||
line.text = re.sub(re_incr,r'\1\2\4=\4+(\6)', buffer)
|
line.text = re.sub(re_incr,r'\1\2\4=\4+(\6)', buffer)
|
||||||
|
Loading…
Reference in New Issue
Block a user