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)
| 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 |
no test coverage detected