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

Method __consume

PyBasic/basicparser.py:231–240  ·  view source on GitHub ↗

Consumes a token from the list

(self, expected_category)

Source from the content-addressed store, hash-verified

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

Callers 14

__printstmtMethod · 0.95
__assignmentstmtMethod · 0.95
__dimstmtMethod · 0.95
__arrayassignmentstmtMethod · 0.95
__openstmtMethod · 0.95
__closestmtMethod · 0.95
__fseekstmtMethod · 0.95
__inputstmtMethod · 0.95
__soundstmtMethod · 0.95
__factorMethod · 0.95
__ifstmtMethod · 0.95
__forstmtMethod · 0.95

Calls 1

__advanceMethod · 0.95

Tested by

no test coverage detected