James Westman
883a136103
Fix parsing decimals
...
A number literal is a float if it contains ".", not if it is divisible
by 1. For example, 1.0 should be considered a float literal.
2023-07-20 19:25:25 -05:00
James Westman
0a4b5d07a1
Remove PropertyBinding rule, just use Binding
2023-07-20 18:46:45 -05:00
gregorni
3730e2e726
Add isort to CI and run on files
2023-07-09 14:26:37 +00:00
James Westman
2ca71de061
Fix template IDs in breakpoint setters
2023-05-17 10:01:23 -05:00
James Westman
c95195197d
Fix template IDs in a couple more places
2023-05-16 19:59:25 -05:00
James Westman
3ebe5c72c1
Fix templates in bind-property
2023-05-16 17:42:53 -05:00
James Westman
e4bad039b0
Fix simple bindings with template soure
2023-05-16 17:14:34 -05:00
James Westman
46e467bbfb
Fix 'template' keyword in list item factories
2023-05-13 20:24:31 -05:00
James Westman
5a782c653b
Add Gtk.Scale mark syntax
2023-05-13 20:19:29 -05:00
James Westman
04509e4b2e
Change template syntax
...
Templates now use a TypeName instead of an identifier, which makes it
clearer that it's an extern symbol (or that it's a Gtk.ListItem).
2023-05-13 16:49:48 -05:00
James Westman
8fcd08c835
Add Adw.Breakpoint custom syntax
2023-05-08 10:11:40 -05:00
James Westman
a9f6bf8d89
Remove unused imports and code
2023-05-06 15:30:18 -05:00
James Westman
10806bce1e
language: Rename extension classes
...
Rename extension classes to match the syntax reference.
2023-05-06 15:30:18 -05:00
James Westman
9e82a2fb2a
language: Rename expression classes
...
Rename the expression classes to match the documentation.
2023-05-06 15:30:18 -05:00
James Westman
3c1941a17e
Simplify Translated
...
Remove the TranslatedWithContext and TranslatedWithoutContext rules and
just use Translated.
2023-04-29 21:57:33 -05:00
James Westman
71f52d350a
Refactor child types
...
Didn't change the actual syntax, but changed the rules around to be less
confusing.
2023-04-29 21:52:20 -05:00
James Westman
a2eaaa26fe
Rename property to avoid conflict
...
TranslatedWithContext.context conflicted with AstNode.context
2023-04-28 20:49:22 -05:00
James Westman
75055ac967
Move bindings out of the Value syntax
...
They're only valid in properties, so they should just be there. Same
with object values.
2023-04-12 21:44:07 -05:00
James Westman
ac2a7d9282
Add StringValue
...
Makes the grammar more specific in a few places that take only a string
literal or translated string.
2023-04-12 21:44:07 -05:00
James Westman
64879491a1
Fix mypy error
2023-04-07 20:35:14 -05:00
Cameron Dehning
a2fb86bc31
Builder list factory
2023-04-08 01:34:47 +00:00
James Westman
0cf9a8e4fc
Add Adw.MessageDialog responses extension
2023-03-28 12:43:53 -05:00
James Westman
90001bd885
Fix mypy errors & other bugs
2023-03-12 21:49:36 -05:00
James Westman
98ba7d467a
Improve expression type checking
2023-03-12 16:12:16 -05:00
James Westman
1df46b5a06
Change the way values work
...
Change the parsing for values to make them more reusable, in particular
for when I implement extensions.
2023-01-12 15:49:19 -06:00
James Westman
6938267952
Add properties to AST types
...
I want to have a cleaner API that relies less on the specifics of the
grammar and parser.
2023-01-12 15:49:19 -06:00
James Westman
59aa054c4c
language: Add closure expressions
2022-12-25 14:04:41 -06:00
James Westman
5cf9b63547
language: Add cast expressions
2022-12-25 14:04:40 -06:00
James Westman
6c67e1fc5a
xml: Fix flags and enums
...
GtkBuilder XML uses enum nicknames, full names, or integer values, but
we accept GIR names, so passing those through doesn't work if the name
has an underscore (which traditionally turns into a dash in the
nickname). Avoid the problem by always writing the integer value of the
enum member.
2022-12-19 15:15:25 -06:00
James Westman
8fee46ec68
Format using black
2022-12-19 11:52:59 -06:00
James Westman
0b8012b8e1
Support Python 3.9
...
Remove the '|' syntax for type unions, since it's a 3.10 feature, and
set mypy to check with version 3.9.
2022-10-27 13:16:18 -05:00
James Westman
a24f16109f
Separate output into its own module
2022-10-15 19:40:47 -05:00