Change the way values work

Change the parsing for values to make them more reusable, in particular
for when I implement extensions.
This commit is contained in:
James Westman 2023-01-12 13:19:15 -06:00
parent 6938267952
commit 1df46b5a06
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
30 changed files with 707 additions and 291 deletions

View file

@ -1,4 +1,6 @@
from .attributes import BaseAttribute, BaseTypedAttribute
from .binding import Binding
from .contexts import ValueTypeCtx
from .expression import CastExpr, ClosureExpr, Expr, ExprChain, IdentExpr, LookupOp
from .gobject_object import Object, ObjectContent
from .gobject_property import Property
@ -14,16 +16,21 @@ from .gtk_styles import Styles
from .gtkbuilder_child import Child
from .gtkbuilder_template import Template
from .imports import GtkDirective, Import
from .property_binding import PropertyBinding
from .ui import UI
from .types import ClassName
from .values import (
TypeValue,
IdentValue,
TranslatedStringValue,
FlagsValue,
Flag,
QuotedValue,
NumberValue,
Flags,
IdentLiteral,
Literal,
NumberLiteral,
ObjectValue,
QuotedLiteral,
Translated,
TranslatedWithContext,
TranslatedWithoutContext,
TypeLiteral,
Value,
)
@ -43,12 +50,3 @@ OBJECT_CONTENT_HOOKS.children = [
Strings,
Child,
]
VALUE_HOOKS.children = [
TypeValue,
TranslatedStringValue,
FlagsValue,
IdentValue,
QuotedValue,
NumberValue,
]