mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Slight acceleration
This commit is contained in:
parent
cb52b89616
commit
b4273ba620
@ -11,10 +11,14 @@ import error
|
|||||||
def find_variables_in_line(line):
|
def find_variables_in_line(line):
|
||||||
assert isinstance(line,Line)
|
assert isinstance(line,Line)
|
||||||
result = []
|
result = []
|
||||||
buffer = regexps.re_string.sub('',line.text)
|
sub_done = False
|
||||||
|
buffer = line.text.lower()
|
||||||
for v in variables.keys():
|
for v in variables.keys():
|
||||||
var = variables[v]
|
var = variables[v]
|
||||||
if var.name in buffer.lower():
|
if var.name in buffer:
|
||||||
|
if not sub_done:
|
||||||
|
buffer = regexps.re_string.sub('',buffer)
|
||||||
|
sub_done = True
|
||||||
if var.regexp.search(buffer) is not None:
|
if var.regexp.search(buffer) is not None:
|
||||||
result.append(var.same_as)
|
result.append(var.same_as)
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user