Skip to content

Commit 0fd083a

Browse files
committed
Adds value attr to token
1 parent 1585f7a commit 0fd083a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/syntactes/token.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ class Token:
33
A token of the grammar. Can be a terminal or non-terminal symbol.
44
"""
55

6-
def __init__(self, symbol: str, is_terminal: bool) -> None:
6+
def __init__(self, symbol: str, is_terminal: bool, value=None) -> None:
77
self.symbol = symbol
88
self.is_terminal = is_terminal
9+
self.value = value
910

1011
@staticmethod
1112
def null() -> "Token":

0 commit comments

Comments
 (0)