mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
language: Rename extension classes
Rename extension classes to match the syntax reference.
This commit is contained in:
parent
9e82a2fb2a
commit
10806bce1e
11 changed files with 46 additions and 41 deletions
|
@ -1,5 +1,5 @@
|
|||
from .gtk_list_item_factory import ListItemFactory
|
||||
from .adw_message_dialog import Responses
|
||||
from .gtk_list_item_factory import ExtListItemFactory
|
||||
from .adw_message_dialog import ExtAdwMessageDialog
|
||||
from .attributes import BaseAttribute, BaseTypedAttribute
|
||||
from .binding import Binding
|
||||
from .contexts import ValueTypeCtx
|
||||
|
@ -15,14 +15,19 @@ from .expression import (
|
|||
from .gobject_object import Object, ObjectContent
|
||||
from .gobject_property import Property
|
||||
from .gobject_signal import Signal
|
||||
from .gtk_a11y import A11y
|
||||
from .gtk_combo_box_text import Items
|
||||
from .gtk_file_filter import mime_types, patterns, suffixes, Filters
|
||||
from .gtk_layout import Layout
|
||||
from .gtk_a11y import ExtAccessibility
|
||||
from .gtk_combo_box_text import ExtComboBoxItems
|
||||
from .gtk_file_filter import (
|
||||
ext_file_filter_mime_types,
|
||||
ext_file_filter_patterns,
|
||||
ext_file_filter_suffixes,
|
||||
Filters,
|
||||
)
|
||||
from .gtk_layout import ExtLayout
|
||||
from .gtk_menu import menu, Menu, MenuAttribute
|
||||
from .gtk_size_group import Widgets
|
||||
from .gtk_string_list import Strings
|
||||
from .gtk_styles import Styles
|
||||
from .gtk_size_group import ExtSizeGroupWidgets
|
||||
from .gtk_string_list import ExtStringListStrings
|
||||
from .gtk_styles import ExtStyles
|
||||
from .gtkbuilder_child import Child, ChildType, ChildInternal, ChildExtension
|
||||
from .gtkbuilder_template import Template
|
||||
from .imports import GtkDirective, Import
|
||||
|
@ -48,17 +53,17 @@ from .common import *
|
|||
OBJECT_CONTENT_HOOKS.children = [
|
||||
Signal,
|
||||
Property,
|
||||
A11y,
|
||||
Styles,
|
||||
Layout,
|
||||
mime_types,
|
||||
patterns,
|
||||
suffixes,
|
||||
Widgets,
|
||||
Items,
|
||||
Strings,
|
||||
ListItemFactory,
|
||||
Responses,
|
||||
ExtAccessibility,
|
||||
ExtAdwMessageDialog,
|
||||
ExtComboBoxItems,
|
||||
ext_file_filter_mime_types,
|
||||
ext_file_filter_patterns,
|
||||
ext_file_filter_suffixes,
|
||||
ExtLayout,
|
||||
ExtListItemFactory,
|
||||
ExtSizeGroupWidgets,
|
||||
ExtStringListStrings,
|
||||
ExtStyles,
|
||||
Child,
|
||||
]
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class Response(AstNode):
|
|||
)
|
||||
|
||||
|
||||
class Responses(AstNode):
|
||||
class ExtAdwMessageDialog(AstNode):
|
||||
grammar = [
|
||||
Keyword("responses"),
|
||||
Match("[").expected(),
|
||||
|
|
|
@ -159,7 +159,7 @@ class A11yProperty(BaseTypedAttribute):
|
|||
return _get_docs(self.root.gir, self.tokens["name"])
|
||||
|
||||
|
||||
class A11y(AstNode):
|
||||
class ExtAccessibility(AstNode):
|
||||
grammar = [
|
||||
Keyword("accessibility"),
|
||||
"{",
|
||||
|
@ -190,7 +190,7 @@ def a11y_completer(ast_node, match_variables):
|
|||
|
||||
|
||||
@completer(
|
||||
applies_in=[A11y],
|
||||
applies_in=[ExtAccessibility],
|
||||
matches=new_statement_patterns,
|
||||
)
|
||||
def a11y_name_completer(ast_node, match_variables):
|
||||
|
|
|
@ -49,7 +49,7 @@ item = Group(
|
|||
)
|
||||
|
||||
|
||||
class Items(AstNode):
|
||||
class ExtComboBoxItems(AstNode):
|
||||
grammar = [
|
||||
Keyword("items"),
|
||||
"[",
|
||||
|
|
|
@ -67,9 +67,9 @@ def create_node(tag_name: str, singular: str):
|
|||
)
|
||||
|
||||
|
||||
mime_types = create_node("mime-types", "mime-type")
|
||||
patterns = create_node("patterns", "pattern")
|
||||
suffixes = create_node("suffixes", "suffix")
|
||||
ext_file_filter_mime_types = create_node("mime-types", "mime-type")
|
||||
ext_file_filter_patterns = create_node("patterns", "pattern")
|
||||
ext_file_filter_suffixes = create_node("suffixes", "suffix")
|
||||
|
||||
|
||||
@completer(
|
||||
|
|
|
@ -55,7 +55,7 @@ layout_prop = Group(
|
|||
)
|
||||
|
||||
|
||||
class Layout(AstNode):
|
||||
class ExtLayout(AstNode):
|
||||
grammar = Sequence(
|
||||
Keyword("layout"),
|
||||
"{",
|
||||
|
|
|
@ -5,7 +5,7 @@ from .common import *
|
|||
from .contexts import ScopeCtx
|
||||
|
||||
|
||||
class ListItemFactory(AstNode):
|
||||
class ExtListItemFactory(AstNode):
|
||||
grammar = [Keyword("template"), ObjectContent]
|
||||
|
||||
@property
|
||||
|
|
|
@ -44,7 +44,7 @@ class Widget(AstNode):
|
|||
)
|
||||
|
||||
|
||||
class Widgets(AstNode):
|
||||
class ExtSizeGroupWidgets(AstNode):
|
||||
grammar = [
|
||||
Keyword("widgets"),
|
||||
"[",
|
||||
|
|
|
@ -32,7 +32,7 @@ class Item(AstNode):
|
|||
return self.children[StringValue][0]
|
||||
|
||||
|
||||
class Strings(AstNode):
|
||||
class ExtStringListStrings(AstNode):
|
||||
grammar = [
|
||||
Keyword("strings"),
|
||||
"[",
|
||||
|
|
|
@ -26,7 +26,7 @@ class StyleClass(AstNode):
|
|||
grammar = UseQuoted("name")
|
||||
|
||||
|
||||
class Styles(AstNode):
|
||||
class ExtStyles(AstNode):
|
||||
grammar = [
|
||||
Keyword("styles"),
|
||||
"[",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue