Skip to content

Commit

Permalink
Add comment (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidchu authored Jul 15, 2024
1 parent 112011d commit 75225c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/parser/lol_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,12 @@ def eat_token(stream: TokenStream, expected_type: LolTokenType) -> LolToken:


def get_start(token: LolToken) -> int:
"""Get the start position of a token."""
return token.start_position


def get_end(token: LolToken) -> int:
"""Get the end position of a token."""
return token.start_position + len(token.lexeme)


Expand Down

0 comments on commit 75225c4

Please sign in to comment.