+ fix while
This commit is contained in:
12
gui/gui.py
12
gui/gui.py
@@ -134,14 +134,18 @@ class Gui:
|
||||
title='Created')
|
||||
|
||||
except JavaSyntaxError as JsE:
|
||||
logging.error(('||SyntaxError in Java File|| Failed to create Image with values = ' + str(values)))
|
||||
logging.error(
|
||||
('||SyntaxError in Java File|| Failed to create Image with values = ' + str(values)))
|
||||
sg.popup_error((str(JsE)))
|
||||
except ScopeNotFoundException as SnFe:
|
||||
logging.error(('||ScopeNotFoundExeption|| Failed to create Image with values = ' + str(values)))
|
||||
logging.error(
|
||||
('||ScopeNotFoundExeption|| Failed to create Image with values = ' + str(values)))
|
||||
sg.popup_error((str(SnFe)))
|
||||
except FileNotFoundError as FnFe:
|
||||
logging.error(('||FileNotFoundError|| Failed to create Image with values = ' + str(values)))
|
||||
sg.popup_error((str(FnFe) + 'File ' + str(file_path) + ' or ' + str(output_path) + ' is not reachable.'))
|
||||
logging.error(
|
||||
('||FileNotFoundError|| Failed to create Image with values = ' + str(values)))
|
||||
sg.popup_error(
|
||||
(str(FnFe) + 'File ' + str(file_path) + ' or ' + str(output_path) + ' is not reachable.'))
|
||||
except:
|
||||
logging.error(
|
||||
('Failed to create Image with values = ' + str(values)))
|
||||
|
||||
@@ -60,7 +60,7 @@ def get_instructions_in_scope(src: List[str], start_idx: int = 0) -> Tuple[List[
|
||||
brace_offset = get_scope_start_offset(src, i)
|
||||
child_instructions, i = get_instructions_in_scope(src, i+brace_offset)
|
||||
|
||||
outer_scope.append(while_instruction_front(instruction_txt, child_instructions))
|
||||
outer_scope.append(while_instruction_front(('while ' + instruction_txt), child_instructions))
|
||||
|
||||
elif line.startswith("if("):
|
||||
logging.debug("Found if instruction in line: %i", i+1)
|
||||
@@ -91,7 +91,7 @@ def get_instructions_in_scope(src: List[str], start_idx: int = 0) -> Tuple[List[
|
||||
bracket_idx = end_line.rindex(");")
|
||||
instruction_txt = end_line[7: bracket_idx]
|
||||
|
||||
outer_scope.append(while_instruction_back(instruction_txt, child_instructions))
|
||||
outer_scope.append(while_instruction_back(('do while' + instruction_txt), child_instructions))
|
||||
|
||||
else:
|
||||
logging.debug("Found generic instruction in line: %i", i+1)
|
||||
|
||||
Reference in New Issue
Block a user