@@ 106,9 106,8 @@ class Lexer:
self, source: str, initial_location: Optional[SourceLocation] = None
) -> None:
self.source: str = source
# vvv What position does the source "start" being parsed from.
# None if the source is being lexed in a location-independent
# What position does the source "start" being parsed from.
# None if the source is being lexed in a location-independent manner.
self.location: Optional[SourceLocation] = initial_location
self.position: int = 0
self.read_position: int = 0
@@ 116,6 115,12 @@ class Lexer:
def next_token(self) -> Token:
# Create a new copy of the lexer's source location so that each token
# has a unique own source location object (i.e. separate reference).
if self.location is not None:
self.location = SourceLocation(
if self.ch == "=":