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

Method __compoundstmt

PyBasic/basicparser.py:1119–1138  ·  view source on GitHub ↗

Parses compound statements, specifically if-then-else and loops :return: The FlowSignal to indicate to the program how to branch if necessary, None otherwise

(self)

Source from the content-addressed store, hash-verified

1117 return arrayval
1118
1119 def __compoundstmt(self):
1120 """Parses compound statements,
1121 specifically if-then-else and
1122 loops
1123
1124 :return: The FlowSignal to indicate to the program
1125 how to branch if necessary, None otherwise
1126
1127 """
1128 if self.__token.category == Token.FOR:
1129 return self.__forstmt()
1130
1131 elif self.__token.category == Token.NEXT:
1132 return self.__nextstmt()
1133
1134 elif self.__token.category == Token.IF:
1135 return self.__ifstmt()
1136
1137 elif self.__token.category == Token.ON:
1138 return self.__ongosubstmt()
1139
1140 def __ifstmt(self):
1141 """Parses if-then-else

Callers 1

__stmtMethod · 0.95

Calls 4

__forstmtMethod · 0.95
__nextstmtMethod · 0.95
__ifstmtMethod · 0.95
__ongosubstmtMethod · 0.95

Tested by

no test coverage detected