Skip to content

Commit 91c2e68

Browse files
committed
Adds State protocol
1 parent 9d886fa commit 91c2e68

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/syntactes/_state.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
from typing import Iterable
1+
from typing import Iterable, Optional, Protocol
22

3-
from syntactes._item import LR0Item, LR1Item
3+
from syntactes._item import Item, LR0Item, LR1Item
4+
5+
6+
class State(Protocol):
7+
number: Optional[int]
8+
items: set[Item]
49

510

611
class LR0State:

0 commit comments

Comments
 (0)