kotontrion
644806233a
Merge branch 'main' into 'main'
...
compile: fix flag values
Closes #180
See merge request jwestman/blueprint-compiler!220
2025-01-18 16:05:45 +00:00
James Westman
aa13c8f5af
Warn about single-quoted translated strings
...
gettext only recognizes double quoted strings
2025-01-05 14:27:59 -06:00
James Westman
8c6f8760f7
language: Add expression literals
...
Add expression literals, so you can set properties of type
Gtk.Expression.
2025-01-04 17:09:57 +00:00
James Westman
55e5095fba
values: Don't allow translated strings in arrays
...
Gtk.Builder has no way to translate individual strings in a string
array, so don't allow it in the syntax.
2025-01-03 18:56:24 -06:00
James Westman
d6f4b88d35
lsp: Fix crash on incomplete detailed signal
2024-12-25 10:31:35 -06:00
James Westman
a6d57cebec
language: Add not-swapped flag for signals
...
This is needed because GtkBuilder defaults to swapped when you specify
the object attribute.
2024-12-23 02:46:52 +00:00
James Westman
9b9fab832b
Add tests, remove unused code, fix bugs
...
- Added tests for more error messages
- Test the "go to reference" feature at every character index of every
test case
- Delete unused code and imports
- Fix some bugs I found along the way
2024-12-22 18:00:39 -06:00
kotontrion
e07da3c339
flags: use nick instead of name
2024-12-18 17:46:26 +00:00
kotontrion
2ae41020ab
Fix flag return value type
2024-12-18 17:46:26 +00:00
kotontrion
f48b840cfa
compile: fix flag values
...
gtk builder does not support combining interger values with | in flags
properties, so the short names are used instead.
2024-12-18 17:46:26 +00:00
James Westman
6acf0fe5a0
tests: Test deprecations separately
...
Libraries can add new deprecations, or the environment you're running
the tests in might have old libraries where the things we test aren't
deprecated yet. Move the deprecations test into its own module with its
own code, so it can check library versions and skip the test if it won't
work.
2024-12-09 19:06:10 -06:00
James Westman
e19975e1f8
lsp: Add reference documentation on hover
...
For most constructs and keywords, show the relevant section of the
reference documentation on hover.
2024-10-20 21:10:14 -05:00
James Westman
b107a85947
lsp: Add property docs on notify signal hover
2024-10-19 20:47:27 -05:00
James Westman
e5fba8f3c7
lsp: Add semantic tokens for flag members
2024-10-19 20:46:26 -05:00
James Westman
f6d05be10b
lsp: Add more "go to reference" implementations
2024-10-19 20:44:34 -05:00
James Westman
65d4612b51
decompiler: Support action widgets
2024-08-24 13:24:27 -05:00
James Westman
a12ac1b976
decompiler: Support Adw.Breakpoint syntax
...
Also, improve handling of translated strings.
2024-08-24 12:29:14 -05:00
James Westman
4d3dc92448
decompiler: Support list accessibility properties
2024-08-23 18:16:02 -05:00
Julian Schmidhuber
3dfce3bbe0
Allow for multiple a11y properties
2024-08-18 13:17:41 +02:00
James Westman
c1a82a034b
decompiler: Add more decompilable tags
...
Add more tags to the list of things the decompiler can handle. This
required some changes to track the containing object class in the
DecompileCtx, since some objects use the same tag names.
The improved support means we can test the decompiler on most of the
test suite. Any new test samples will by default be tested to ensure the
decompiler produces the original blueprint file.
Also, updated the decompiler to always use double quotes.
2024-07-26 23:05:37 -05:00
James Westman
8d734f7bbd
lsp: Add hover docs for lookup expression props
2024-07-27 02:52:56 +00:00
James Westman
3a712af4dd
Fix crash with bad escape sequence in string array
...
Invalid escape sequences aren't a fatal parser error, so the AST can be
built even when one is present, in which case the string token is None.
2024-07-26 21:10:33 -05:00
James Westman
b33cc7ccd7
adw-breakpoint: Fix bug when setting template prop
...
When a breakpoint setter's target object was the template, the compiler
failed with an assertion error. Fixed by allowing TemplateType objects
there. The assertion is still needed to make the type checker happy.
2024-07-22 20:31:15 -05:00
Sonny Piers
adc2be1454
Support template without parent
2024-07-04 22:14:16 +00:00
Diego Augusto
da5b9909fc
Support array type
2024-07-04 22:02:51 +00:00
James Westman
442fff69b6
Fix crash in validate_parent_type
...
If the type being checked for is not found (e.g. the library is not
installed or is out of date), parent.full_name would be None.
2024-05-30 17:51:40 -05:00
Gregor Niehl
25d08e56cb
signals: Support after
keyword
2024-05-30 22:34:05 +00:00
James Westman
07e824d8e7
lang: Also allow Gtk.ListHeader in factory template
2024-05-04 12:27:12 -05:00
James Westman
988e69ab25
lang: Allow ColumnView widgets to be built
...
Allow BuilderListItemFactory to contain Gtk.ColumnViewRow or
Gtk.ColumnViewCell templates, in addition to Gtk.ListItem templates.
This is necessary for people to use Gtk.ColumnView idiomatically in
Blueprint.
Fixes #157 .
2024-05-02 20:19:00 -05:00
James Westman
6a078ee075
Add warning for unused imports
2024-04-06 14:33:20 -05:00
Sonny Piers
ba8b492134
Add support for Adw.AlertDialog
2024-02-02 11:03:16 +01:00
James Westman
6522421251
Fix formatting
2024-02-01 19:38:19 -06:00
James Westman
e261180dcc
language: Add translation-domain
...
This allows you to set the translation domain of a blueprint file.
2023-12-13 23:43:29 +00:00
James Westman
3d5a5521aa
decompiler: Use single quotes
2023-09-28 17:18:45 -05:00
James Westman
3cd5daf025
Fix a crash found by the fuzzer
2023-09-07 12:13:05 -05:00
z00000000z
bcac788456
completions: property_completer improvements
2023-08-23 16:21:37 +00:00
James Westman
35ee058192
lsp: Add code action to add missing imports
2023-07-25 20:02:03 -05:00
James Westman
3bcc9f4cbd
Use the new Range class in more places
2023-07-25 20:01:41 -05:00
James Westman
a9cb423b3b
lsp: Add missing semantic highlight
2023-07-25 18:52:43 -05:00
James Westman
62f74178f7
lsp: Implement "go to definition"
2023-07-25 18:40:05 -05:00
James Westman
e087aeb44f
lsp: Add document outline
2023-07-25 17:59:52 -05:00
James Westman
950b141d26
lsp: Mark deprecation warnings
...
Some editors use different styling (e.g. strikethrough) for deprecation
warnings.
2023-07-23 18:17:48 -05:00
James Westman
94db929f74
Emit deprecation warnings
2023-07-23 18:09:29 -05:00
James Westman
0a4b5d07a1
Remove PropertyBinding rule, just use Binding
2023-07-20 18:46:45 -05:00
James Westman
abc4e5de65
lsp: Add docs for Adw.Breakpoint
2023-07-16 16:52:51 -05:00
James Westman
cb1eb9ba44
lsp: Show better info on IdentLiteral hover
...
Instead of showing the documentation for the expected type, show the
signature of the referenced object.
2023-07-16 16:52:51 -05:00
James Westman
9ff76b65cc
docs: Fix docs for accessibility properties
2023-07-16 16:52:51 -05:00
gregorni
3730e2e726
Add isort to CI and run on files
2023-07-09 14:26:37 +00:00
James Westman
4e02c34a5b
Minor performance optimizations
2023-06-13 19:01:33 -05:00
James Westman
6ac798ea6f
More errors for duplicates
2023-05-17 10:41:45 -05:00