mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-10-15 12:31:42 +02:00
Corrected bug with += in strings
This commit is contained in:
parent
e7f9ec3075
commit
3729312876
@ -366,7 +366,12 @@ def add_operators(text):
|
||||
result = []
|
||||
for line in 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 "):
|
||||
re_incr = re.compile(r"(.*)(\))(\s*)(.*)(\+=)(.*$)",re.S)
|
||||
line.text = re.sub(re_incr,r'\1\2\4=\4+(\6)', buffer)
|
||||
|
Loading…
Reference in New Issue
Block a user