MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / __gotostmt

Method __gotostmt

PyBasic/basicparser.py:438–449  ·  view source on GitHub ↗

Parses a GOTO statement :return: A FlowSignal containing the target line number of the GOTO

(self)

Source from the content-addressed store, hash-verified

436 self.__assignmentstmt()
437
438 def __gotostmt(self):
439 """Parses a GOTO statement
440
441 :return: A FlowSignal containing the target line number
442 of the GOTO
443
444 """
445 self.__advance() # Advance past GOTO token
446 self.__expr()
447
448 # Set up and return the flow signal
449 return FlowSignal(ftarget=self.__operand_stack.pop())
450
451 def __gosubstmt(self):
452 """Parses a GOSUB statement

Callers 1

__simplestmtMethod · 0.95

Calls 3

__advanceMethod · 0.95
__exprMethod · 0.95
FlowSignalClass · 0.90

Tested by

no test coverage detected