mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
completions: Add completions for response IDs
This commit is contained in:
parent
866092ccf7
commit
b26433d865
16 changed files with 123 additions and 42 deletions
|
@ -28,19 +28,21 @@ class ExtResponse(AstNode):
|
|||
|
||||
ALLOWED_PARENTS: T.List[T.Tuple[str, str]] = [("Gtk", "Dialog"), ("Gtk", "InfoBar")]
|
||||
|
||||
grammar = [
|
||||
grammar = Statement(
|
||||
"[",
|
||||
Keyword("action"),
|
||||
Keyword("response"),
|
||||
"=",
|
||||
Match("=").expected(),
|
||||
AnyOf(
|
||||
UseIdent("response_id"),
|
||||
[
|
||||
Optional(UseExact("sign", "-")),
|
||||
UseNumber("response_id"),
|
||||
],
|
||||
),
|
||||
).expected("response ID"),
|
||||
Optional([Keyword("default"), UseLiteral("is_default", True)]),
|
||||
]
|
||||
end="]",
|
||||
)
|
||||
|
||||
@validate()
|
||||
def parent_has_action_widgets(self) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue