Commit graph

447 commits

Author SHA1 Message Date
James Westman
22ac50b611 formatter: Make it pass the new tests 2023-09-28 17:33:43 -05:00
James Westman
abc90d7eae tests: Test string escaping in the formatter 2023-09-28 17:33:43 -05:00
James Westman
ac971f9fd6 tests: Add to the formatter tests 2023-09-28 17:33:43 -05:00
James Westman
85a21086f6 Merge branch 'main' into formatter-improvements 2023-09-28 17:32:23 -05:00
James Westman
3d5a5521aa decompiler: Use single quotes 2023-09-28 17:18:45 -05:00
James Westman
ea92838cf3 Parse escape sequences instead of using replace
That way we can warn about invalid sequences. Also, the previous code had at least one subtle bug (`\\\\'`).
2023-09-28 17:18:45 -05:00
gregorni
c38c6b06f3 main.py: Fix a debug print statement 2023-09-28 18:05:55 +02:00
gregorni
adabbd8ecd formatter.py: Properly remove another_newline() this time 2023-09-28 17:57:54 +02:00
gregorni
49937b5dd5 Revert "formatter.py: Remove another_newline()"
This reverts commit dbcc094fc1.
2023-09-28 17:54:29 +02:00
gregorni
dbcc094fc1 formatter.py: Remove another_newline() 2023-09-28 17:54:18 +02:00
gregorni
a28c6b23a3 formatter.py: Remove another_newline() 2023-09-28 17:52:45 +02:00
gregorni
d740c73530 Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter 2023-09-28 17:47:03 +02:00
gregorni
46c10ef97a formatter.py: Clean up commit_current_line() 2023-09-28 17:34:07 +02:00
James Westman
bc798c544c docs: Fix grammar for bindings
Binding flags were missing from the documented grammar. Also added prose
documentation about the available flags.
2023-09-27 10:51:48 -05:00
gregorni
8cd27f1219 formatter.py: Add TODO comments 2023-09-27 17:27:50 +02:00
gregorni
134ddbb80f formatter.py: Fix a typo in LineType Enum 2023-09-27 17:14:18 +02:00
gregorni
720594549b formatter.py: Make constant lists tuples 2023-09-27 17:08:04 +02:00
gregorni
de62c03b29 formatter.py: Run black 2023-09-27 16:39:21 +02:00
gregorni
17ab8156fd Revert "Formatter: Make tests pass"
This reverts commit be133eaab2.
2023-09-27 16:36:19 +02:00
gregorni
be133eaab2 Formatter: Make tests pass 2023-09-27 16:35:33 +02:00
gregorni
ad1ea4f51f Formatter: Make tests pass 2023-09-27 16:34:46 +02:00
gregorni
31ce6261b7 formatter.py: simplify functions 2023-09-25 14:59:31 +02:00
gregorni
4acc05cfda Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter 2023-09-22 22:25:15 +02:00
gregorni
529b26b759 formatter.py: Remove unecessary variable 2023-09-22 22:25:10 +02:00
gregorni
53534d08b0 formatter.py: Use prev_line_type more often 2023-09-18 16:43:24 +02:00
gregorni
1e0251fcce formatter.py: Improve imports 2023-09-17 14:46:14 +02:00
gregorni
91e00ee6ac Formatter: No newline between comments and opening tokens 2023-09-17 14:43:11 +02:00
gregorni
2851dffe06 Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter 2023-09-17 12:38:15 +02:00
gregorni
aac03a02d9 formatter.py: stuff more logic into variables 2023-09-17 12:18:22 +02:00
gregorni
025f2d4dae Formatter: Better handle nested lists 2023-09-17 11:46:15 +02:00
gregorni
f777c531e4 Apply some of @jwestman's suggestions 2023-09-17 10:10:25 +02:00
Urtsi Santsi
1371dec494 Use the updated test repo 2023-09-17 02:25:39 +03:00
Urtsi Santsi
cc66b05a87 Add generated notice to test files 2023-09-17 02:25:39 +03:00
Urtsi Santsi
cf136ab09f Add notice that the file is generated
Fixes #123
2023-09-17 02:25:39 +03:00
James Westman
455924e22f tests: Add another formatter test 2023-09-16 14:01:18 -05:00
Marco Capypara Köpcke
80cb57cb88 batch-compile: Fix mixing relative+absolute paths 2023-09-16 16:41:43 +00:00
gregorni
8d7103dbe5 Formatter: Handle item (a, b, c) syntax 2023-09-16 15:52:23 +02:00
gregorni
8dc0abd0ca Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter 2023-09-16 15:32:48 +02:00
gregorni
e37e5180cf Formatter: Handle properties after child 2023-09-16 15:29:45 +02:00
James Westman
057c767fbb typelib: Fix byte order issue 2023-09-14 10:19:49 -05:00
Jerry James
0c02195510
Handle big endian bitfields correctly 2023-09-13 08:43:54 -06:00
gregorni
ffff63da41 Formatter: Handle lists with only 1 item correctly 2023-09-09 17:50:13 +02:00
gregorni
41042b0a78 Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter 2023-09-08 10:40:24 +02:00
gregorni
825f6e3b15 Formatter: adapt to unittest 2023-09-08 09:56:52 +02:00
gregorni
13b66e2875 Formatter: LSP: Return TextEdit as JSON 2023-09-07 21:59:20 +02:00
James Westman
19d0410ea0
tests: Add formatter test 2023-09-07 13:00:15 -05:00
James Westman
3cd5daf025
Fix a crash found by the fuzzer 2023-09-07 12:13:05 -05:00
gregorni
461ef19a46 Run black 2023-09-03 18:44:58 +02:00
gregorni
1dc913c5c1 Merge branch 'main' of https://gitlab.gnome.org/jwestman/blueprint-compiler into formatter 2023-09-03 18:42:24 +02:00
James Westman
0f5be1b051 docs: Use correct lexer name for code blocks 2023-08-31 14:58:29 -05:00