Commit b01c5f0c authored by Christopher Happe's avatar Christopher Happe
Browse files

Bugfix: Bei GOTO zu nicht vorhandener Markierung wird jetzt die richtige Zeile angezeigt.

parent a1ae14e1
......@@ -118,10 +118,10 @@ class GOTOInterpreter:
current_token = self.next_token()
while current_token is not None and max(self.marker_to_position.keys()) < int(marker_number):
current_token = self.verify_line(current_token)
if marker_number not in self.marker_to_position.keys():
self.error_handler.handle_error('GOTO zu nicht vorhandener Markierung')
self.lex.current_position = self.marker_to_position.get(marker_number)
self.error_handler.line_number = self.marker_to_line.get(marker_number)
if marker_number not in self.marker_to_position.keys():
self.error_handler.handle_error('GOTO zu nicht vorhandener Markierung')
return self.next_token()
def verify_goto(self, goto_token):
......@@ -136,10 +136,10 @@ class GOTOInterpreter:
current_token = self.next_token()
while current_token is not None and max(self.marker_to_position.keys()) < int(marker_number):
current_token = self.verify_line(current_token)
if marker_number not in self.marker_to_position.keys():
self.error_handler.handle_error('GOTO zu nicht vorhandener Markierung')
self.lex.current_position = saved_position
self.error_handler.line_number = saved_line
if marker_number not in self.marker_to_position.keys():
self.error_handler.handle_error('GOTO zu nicht vorhandener Markierung')
return self.next_token()
def process_if(self, if_token):
......
Supports Markdown
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