Consumes a token from the list
(self, expected_category)
| 229 | self.__token = self.__tokenlist[self.__tokenindex] |
| 230 | |
| 231 | def __consume(self, expected_category): |
| 232 | """Consumes a token from the list |
| 233 | |
| 234 | """ |
| 235 | if self.__token.category == expected_category: |
| 236 | self.__advance() |
| 237 | |
| 238 | else: |
| 239 | raise RuntimeError('Expecting ' + Token.catnames[expected_category] + |
| 240 | ' in line ' + str(self.__line_number)) |
| 241 | |
| 242 | def __stmt(self,infile,tmpfile,datastmts): |
| 243 | """Parses a program statement |
no test coverage detected