Emit warning when unregistered mark is used with -m

This commit is contained in:
Max Berkowitz 2024-04-25 23:14:28 -04:00 committed by GitHub
parent 78dc0b0663
commit 9f7770efe3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@ from typing import Mapping
from typing import NoReturn
from typing import Optional
from typing import Sequence
from .structures import MARK_GEN
__all__ = [
@ -96,6 +97,7 @@ class Scanner:
elif value == "not":
yield Token(TokenType.NOT, value, pos)
else:
MARK_GEN.verify_mark(value)
yield Token(TokenType.IDENT, value, pos)
pos += len(value)
else: