Add GObject Introspection integration

- Parse .gir files
- Validate class, property, and signal names
This commit is contained in:
James Westman 2021-10-22 21:14:30 -05:00
parent 2ad2f1c54a
commit e553e5db29
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
10 changed files with 734 additions and 58 deletions

View file

@ -21,7 +21,7 @@
import re
from enum import Enum
from .errors import TokenizeError
from .errors import CompileError
class TokenType(Enum):
@ -106,7 +106,7 @@ def _tokenize(ui_ml: str):
break
if not matched:
raise TokenizeError(i)
raise CompileError("Could not determine what kind of syntax is meant here", i)
yield Token(TokenType.EOF, i, i, ui_ml)