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

@ -18,9 +18,10 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
import argparse, sys
import argparse, json, os, sys
from .errors import PrintableError, report_compile_error
from .errors import PrintableError, report_compile_error, MultipleErrors
from .lsp import LanguageServer
from .pipeline import Pipeline
from . import parser, tokenizer
@ -43,6 +44,8 @@ class BlueprintApp:
try:
opts = self.parser.parse_args()
opts.func(opts)
except SystemExit as e:
raise e
except:
report_compile_error()
@ -60,7 +63,12 @@ class BlueprintApp:
try:
tokens = tokenizer.tokenize(data)
ast = parser.parse(tokens)
if len(ast.errors):
raise MultipleErrors(ast.errors)
xml = ast.generate()
if opts.output == "-":
print(xml)
else: