Function check_token
Synopsis
def check_token(self, *choices)
Description
No description yet.
Mentioned in
- Documentation / Loader
Source
Lines 113-124 in lib3/yaml/scanner.py.
def check_token(self, *choices):
# Check if the next token is one of the given types.
while self.need_more_tokens():
self.fetch_more_tokens()
if self.tokens:
if not choices:
return True
for choice in choices:
if isinstance(self.tokens[0], choice):
return True
return False