MCPcopy Index your code
hub / github.com/python/cpython / _parse_optional_field_quantifier

Method _parse_optional_field_quantifier

Parser/asdl.py:355–363  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

353 return None
354
355 def _parse_optional_field_quantifier(self):
356 quantifiers = []
357 while self.cur_token.kind in (TokenKind.Asterisk, TokenKind.Question):
358 if self.cur_token.kind == TokenKind.Asterisk:
359 quantifiers.append(Quantifier.SEQUENCE)
360 elif self.cur_token.kind == TokenKind.Question:
361 quantifiers.append(Quantifier.OPTIONAL)
362 self._advance()
363 return quantifiers
364
365 def _advance(self):
366 """ Return the value of the current token and read the next one into

Callers 1

_parse_fieldsMethod · 0.95

Calls 2

_advanceMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected