mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-07 16:29:07 -04:00
Compare commits
2 commits
97eeb4f32d
...
6f87c07320
Author | SHA1 | Date | |
---|---|---|---|
|
6f87c07320 | ||
|
d6f4b88d35 |
3 changed files with 9 additions and 1 deletions
|
@ -143,12 +143,13 @@ class Signal(AstNode):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def document_symbol(self) -> DocumentSymbol:
|
def document_symbol(self) -> DocumentSymbol:
|
||||||
|
detail = self.ranges["detail_start", "detail_end"]
|
||||||
return DocumentSymbol(
|
return DocumentSymbol(
|
||||||
self.full_name,
|
self.full_name,
|
||||||
SymbolKind.Event,
|
SymbolKind.Event,
|
||||||
self.range,
|
self.range,
|
||||||
self.group.tokens["name"].range,
|
self.group.tokens["name"].range,
|
||||||
self.ranges["detail_start", "detail_end"].text,
|
detail.text if detail is not None else None,
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_reference(self, idx: int) -> T.Optional[LocationLink]:
|
def get_reference(self, idx: int) -> T.Optional[LocationLink]:
|
||||||
|
|
5
tests/sample_errors/incomplete_signal.blp
Normal file
5
tests/sample_errors/incomplete_signal.blp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
using Gtk 4.0;
|
||||||
|
|
||||||
|
Label {
|
||||||
|
notify::
|
||||||
|
}
|
2
tests/sample_errors/incomplete_signal.err
Normal file
2
tests/sample_errors/incomplete_signal.err
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
5,1,0,Expected a signal detail name
|
||||||
|
4,9,3,Unexpected tokens
|
Loading…
Add table
Add a link
Reference in a new issue