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

Method __gosubstmt

PyBasic/basicparser.py:451–464  ·  view source on GitHub ↗

Parses a GOSUB statement :return: A FlowSignal containing the first line number of the subroutine

(self)

Source from the content-addressed store, hash-verified

449 return FlowSignal(ftarget=self.__operand_stack.pop())
450
451 def __gosubstmt(self):
452 """Parses a GOSUB statement
453
454 :return: A FlowSignal containing the first line number
455 of the subroutine
456
457 """
458
459 self.__advance() # Advance past GOSUB token
460 self.__expr()
461
462 # Set up and return the flow signal
463 return FlowSignal(ftarget=self.__operand_stack.pop(),
464 ftype=FlowSignal.GOSUB)
465
466 def __returnstmt(self):
467 """Parses a RETURN statement"""

Callers 1

__simplestmtMethod · 0.95

Calls 3

__advanceMethod · 0.95
__exprMethod · 0.95
FlowSignalClass · 0.90

Tested by

no test coverage detected