chore: переместил функцию получения текущей строкиисходного кода

This commit is contained in:
ElectronixTM
2025-04-02 00:37:34 +03:00
parent 90040c9823
commit a9bedc18cf

View File

@ -85,6 +85,9 @@ class Debugger:
return "Unknown command" return "Unknown command"
return self._callbacks_table[callback_name](command[1:]) return self._callbacks_table[callback_name](command[1:])
def get_current_source_line_number(self) -> int:
return self._dbg_dict["instructions"][self._vm.pc.value]['srcline']
def _reset(self, args: list[str]) -> str: def _reset(self, args: list[str]) -> str:
self._vm.reset() self._vm.reset()
return "VM reseted" return "VM reseted"
@ -98,9 +101,6 @@ class Debugger:
return f"Virtual machine exception: {e.message}" return f"Virtual machine exception: {e.message}"
return "" return ""
def get_current_source_line_number(self) -> int:
return self._dbg_dict["instructions"][self._vm.pc.value]['srcline']
def _continue(self, args: list[str]) -> str: def _continue(self, args: list[str]) -> str:
try: try:
self._vm.continue_() self._vm.continue_()