class _ParserState: # Attributes: # :scanner (Scanner): # :is_range_start_line_parsed (bool): Default is false. # :tokens: def __init__(self, source: str) -> None: self.scanner = Scanner(source) self.is_range_start_line_parsed = False self.tokens = self.scanner.scan() def next_token(self): return next(self.tokens)
def __init__(self, source): # type: (str) -> None self.scanner = Scanner(source) self.is_range_start_line_parsed = False self.tokens = self.scanner.scan()