Skip to content

Commit

Permalink
Adds value attr to token
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxcode123 committed Nov 5, 2024
1 parent bc88443 commit f1db38b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/syntactes/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ class Token:
A token of the grammar. Can be a terminal or non-terminal symbol.
"""

def __init__(self, symbol: str, is_terminal: bool) -> None:
def __init__(self, symbol: str, is_terminal: bool, value=None) -> None:
self.symbol = symbol
self.is_terminal = is_terminal
self.value = value

@staticmethod
def null() -> "Token":
Expand Down

0 comments on commit f1db38b

Please sign in to comment.