mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
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:
parent
6938267952
commit
1df46b5a06
30 changed files with 707 additions and 291 deletions
|
@ -20,16 +20,17 @@
|
|||
|
||||
from .attributes import BaseTypedAttribute
|
||||
from .gobject_object import ObjectContent, validate_parent_type
|
||||
from .values import Value, TranslatedStringValue
|
||||
from .values import Value, Translated
|
||||
from .common import *
|
||||
from .contexts import ValueTypeCtx
|
||||
|
||||
|
||||
class Item(AstNode):
|
||||
grammar = VALUE_HOOKS
|
||||
grammar = Value
|
||||
|
||||
@property
|
||||
def value_type(self):
|
||||
return StringType()
|
||||
@context(ValueTypeCtx)
|
||||
def value_type(self) -> ValueTypeCtx:
|
||||
return ValueTypeCtx(StringType())
|
||||
|
||||
|
||||
class Strings(AstNode):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue