blueprint-compiler/tests/sample_errors
James Westman 8f3ae9a626
parser: Tweak parsing during error conditions
When an explicit parsing error is encountered and a CompileError raised,
apply the changes to the context state. This way, the rule that catches
the exception (e.g. Statement or Until) knows where the error occurred.

Also, changed "Expected" errors to be reported at the end of the
previous non-whitespace token.
2025-05-03 14:27:45 -05:00
..
a11y_in_non_widget.blp Validate parent object for accessibility and layout 2021-11-12 17:10:30 -06:00
a11y_in_non_widget.err Validate parent object for accessibility and layout 2021-11-12 17:10:30 -06:00
a11y_list_empty.blp Allow for multiple a11y properties 2024-08-18 13:17:41 +02:00
a11y_list_empty.err Allow for multiple a11y properties 2024-08-18 13:17:41 +02:00
a11y_non_list_property.blp Allow for multiple a11y properties 2024-08-18 13:17:41 +02:00
a11y_non_list_property.err Allow for multiple a11y properties 2024-08-18 13:17:41 +02:00
a11y_prop_dne.blp validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
a11y_prop_dne.err Add accessibility properties 2021-11-12 00:51:01 -06:00
a11y_prop_obj_dne.blp validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
a11y_prop_obj_dne.err Add accessibility properties 2021-11-12 00:51:01 -06:00
a11y_prop_type.blp validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
a11y_prop_type.err language: Support boxed types and GType 2022-10-06 13:03:33 -05:00
abstract_class.blp Change template syntax 2023-05-13 16:49:48 -05:00
abstract_class.err validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
action_widget_float_response.blp tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_float_response.err tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_have_no_id.blp tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_have_no_id.err completions: Add completions for response IDs 2025-05-03 14:27:44 -05:00
action_widget_in_invalid_container.blp fix: allow adding action widgets to GtkInfoBar 2022-02-19 12:51:34 +03:00
action_widget_in_invalid_container.err completions: Add completions for response IDs 2025-05-03 14:27:44 -05:00
action_widget_multiple_default.blp tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_multiple_default.err tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_negative_response.blp tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_negative_response.err Fix bugs in number literals 2023-03-12 14:58:35 -05:00
action_widget_response_dne.blp tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
action_widget_response_dne.err tests: add tests for action widget syntax 2022-02-18 19:04:08 +03:00
adw_alert_dialog_duplicate_flags.blp Add support for Adw.AlertDialog 2024-02-02 11:03:16 +01:00
adw_alert_dialog_duplicate_flags.err Add support for Adw.AlertDialog 2024-02-02 11:03:16 +01:00
adw_breakpoint.blp Add Adw.Breakpoint custom syntax 2023-05-08 10:11:40 -05:00
adw_breakpoint.err Add Adw.Breakpoint custom syntax 2023-05-08 10:11:40 -05:00
adw_message_dialog_duplicate_flags.blp ExtAdwMessageDialog: Duplicate flag errors 2023-05-17 09:58:51 -05:00
adw_message_dialog_duplicate_flags.err ExtAdwMessageDialog: Duplicate flag errors 2023-05-17 09:58:51 -05:00
array_wrong_type.blp Support array type 2024-07-04 22:02:51 +00:00
array_wrong_type.err Support array type 2024-07-04 22:02:51 +00:00
array_wrong_type_value.blp Support array type 2024-07-04 22:02:51 +00:00
array_wrong_type_value.err Support array type 2024-07-04 22:02:51 +00:00
bad_escape_sequence.blp Parse escape sequences instead of using replace 2023-09-28 17:18:45 -05:00
bad_escape_sequence.err Parse escape sequences instead of using replace 2023-09-28 17:18:45 -05:00
binding_flags.blp Remove PropertyBinding rule, just use Binding 2023-07-20 18:46:45 -05:00
binding_flags.err Remove PropertyBinding rule, just use Binding 2023-07-20 18:46:45 -05:00
binding_object_not_found.blp Remove PropertyBinding rule, just use Binding 2023-07-20 18:46:45 -05:00
binding_object_not_found.err Remove PropertyBinding rule, just use Binding 2023-07-20 18:46:45 -05:00
bitfield_member_dne.blp Add validation for flag values 2022-03-02 14:06:57 -06:00
bitfield_member_dne.err Add validation for flag values 2022-03-02 14:06:57 -06:00
children.blp Validate that an object can have children 2022-07-09 16:40:02 -05:00
children.err Validate that an object can have children 2022-07-09 16:40:02 -05:00
class_assign.blp Validate object types 2021-11-05 00:44:33 -05:00
class_assign.err Validate object types 2021-11-05 00:44:33 -05:00
class_dne.blp Change template syntax 2023-05-13 16:49:48 -05:00
class_dne.err Change template syntax 2023-05-13 16:49:48 -05:00
consecutive_unexpected_tokens.blp parser: Merge consecutive "Unexpected tokens" errors 2021-12-16 23:18:31 -06:00
consecutive_unexpected_tokens.err parser: Merge consecutive "Unexpected tokens" errors 2021-12-16 23:18:31 -06:00
convert_bool_to_obj.blp values: Don't allow assigning true/false to object 2025-05-03 08:27:29 -05:00
convert_bool_to_obj.err values: Don't allow assigning true/false to object 2025-05-03 08:27:29 -05:00
does_not_implement.blp gir: Fix assignable_to for interface implementations 2022-01-11 22:37:24 -06:00
does_not_implement.err gir: Fix assignable_to for interface implementations 2022-01-11 22:37:24 -06:00
duplicate_internal_child.blp More errors for duplicates 2023-05-17 10:41:45 -05:00
duplicate_internal_child.err More errors for duplicates 2023-05-17 10:41:45 -05:00
duplicate_obj_id.blp Report duplicate object IDs 2021-11-03 14:58:33 -05:00
duplicate_obj_id.err Report duplicate object IDs 2021-11-03 14:58:33 -05:00
duplicates.blp Add errors for duplicate properties and blocks 2022-06-08 23:08:15 -05:00
duplicates.err Add errors for duplicate properties and blocks 2022-06-08 23:08:15 -05:00
empty.blp Fix compiling empty file 2022-06-17 11:12:21 -05:00
empty.err parser: Tweak parsing during error conditions 2025-05-03 14:27:45 -05:00
enum_member_dne.blp Add more tests 2021-11-04 00:05:38 -05:00
enum_member_dne.err Add more tests 2021-11-04 00:05:38 -05:00
expected_semicolon.blp Fix misleading error message for missing semicolon 2023-03-28 10:10:37 -05:00
expected_semicolon.err parser: Tweak parsing during error conditions 2025-05-03 14:27:45 -05:00
expr_cast_conversion.blp language: Add cast expressions 2022-12-25 14:04:40 -06:00
expr_cast_conversion.err language: Add cast expressions 2022-12-25 14:04:40 -06:00
expr_cast_needed.blp Change template syntax 2023-05-13 16:49:48 -05:00
expr_cast_needed.err Change template syntax 2023-05-13 16:49:48 -05:00
expr_closure_not_cast.blp language: Add closure expressions 2022-12-25 14:04:41 -06:00
expr_closure_not_cast.err language: Add closure expressions 2022-12-25 14:04:41 -06:00
expr_item_not_cast.blp language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_item_not_cast.err language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_lookup_dne.blp language: Add cast expressions 2022-12-25 14:04:40 -06:00
expr_lookup_dne.err language: Add cast expressions 2022-12-25 14:04:40 -06:00
expr_lookup_no_properties.blp language: Add cast expressions 2022-12-25 14:04:40 -06:00
expr_lookup_no_properties.err language: Add cast expressions 2022-12-25 14:04:40 -06:00
expr_value_assignment.blp language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_value_assignment.err language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_value_closure_arg.blp language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_value_closure_arg.err language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_value_item.blp language: Add expression literals 2025-01-04 17:09:57 +00:00
expr_value_item.err language: Add expression literals 2025-01-04 17:09:57 +00:00
filters_in_non_file_filter.blp validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
filters_in_non_file_filter.err validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
float_to_int_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
float_to_int_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
gtk_3.blp tests: Add GTK directive error tests 2022-03-28 14:38:05 -05:00
gtk_3.err tests: Add GTK directive error tests 2022-03-28 14:38:05 -05:00
gtk_exact_version.blp tests: Add GTK directive error tests 2022-03-28 14:38:05 -05:00
gtk_exact_version.err tests: Add GTK directive error tests 2022-03-28 14:38:05 -05:00
incomplete_signal.blp lsp: Fix crash on incomplete detailed signal 2024-12-25 10:31:35 -06:00
incomplete_signal.err parser: Tweak parsing during error conditions 2025-05-03 14:27:45 -05:00
inline_menu.blp language: Remove inline menus 2022-10-14 22:12:56 -05:00
inline_menu.err language: Remove inline menus 2022-10-14 22:12:56 -05:00
int_object.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
int_object.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
invalid_bool.blp Add more tests 2021-11-04 00:05:38 -05:00
invalid_bool.err Add more tests 2021-11-04 00:05:38 -05:00
layout_in_non_widget.blp Validate parent object for accessibility and layout 2021-11-12 17:10:30 -06:00
layout_in_non_widget.err Validate parent object for accessibility and layout 2021-11-12 17:10:30 -06:00
legacy_template.blp Change template syntax 2023-05-13 16:49:48 -05:00
legacy_template.err tests: Ignore deprecation warnings 2024-11-03 14:40:36 -06:00
list_factory.blp Add type to BuilderListItemFactory extension 2023-05-13 16:49:48 -05:00
list_factory.err lang: Also allow Gtk.ListHeader in factory template 2024-05-04 12:27:12 -05:00
menu_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
menu_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
menu_no_id.blp Fix menus 2022-12-19 15:15:25 -06:00
menu_no_id.err Fix menus 2022-12-19 15:15:25 -06:00
menu_toplevel_attribute.blp Update menu syntax 2023-04-12 21:44:07 -05:00
menu_toplevel_attribute.err parser: Tweak parsing during error conditions 2025-05-03 14:27:45 -05:00
newline_in_string_array.blp Support array type 2024-07-04 22:02:51 +00:00
newline_in_string_array.err Support array type 2024-07-04 22:02:51 +00:00
newline_in_string_array_multi.blp Support array type 2024-07-04 22:02:51 +00:00
newline_in_string_array_multi.err Support array type 2024-07-04 22:02:51 +00:00
no_import_version.blp lsp: Fix crash when import version missing 2022-07-09 20:00:10 +00:00
no_import_version.err parser: Tweak parsing during error conditions 2025-05-03 14:27:45 -05:00
not_a_class.blp Change template syntax 2023-05-13 16:49:48 -05:00
not_a_class.err Change template syntax 2023-05-13 16:49:48 -05:00
ns_not_found.blp Reduce errors when a namespace is not found 2023-03-21 11:31:02 -05:00
ns_not_found.err Reduce errors when a namespace is not found 2023-03-21 11:31:02 -05:00
ns_not_imported.blp Change template syntax 2023-05-13 16:49:48 -05:00
ns_not_imported.err Change template syntax 2023-05-13 16:49:48 -05:00
obj_in_string_list.blp validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
obj_in_string_list.err Add StringValue 2023-04-12 21:44:07 -05:00
obj_prop_type.blp Validate object types 2021-11-05 00:44:33 -05:00
obj_prop_type.err Change the way values work 2023-01-12 15:49:19 -06:00
object_dne.blp Validate object types 2021-11-05 00:44:33 -05:00
object_dne.err Validate object types 2021-11-05 00:44:33 -05:00
property_dne.blp Add more tests 2021-11-04 00:05:38 -05:00
property_dne.err language: Add cast expressions 2022-12-25 14:04:40 -06:00
read_only_properties.blp validation: Writable/construct-only properties 2022-04-28 22:52:30 -05:00
read_only_properties.err Move bindings out of the Value syntax 2023-04-12 21:44:07 -05:00
scale_mark_position.blp Add Gtk.Scale mark syntax 2023-05-13 20:19:29 -05:00
scale_mark_position.err Add Gtk.Scale mark syntax 2023-05-13 20:19:29 -05:00
signal_dne.blp language: Use new extern syntax in signal handlers 2023-01-12 15:49:19 -06:00
signal_dne.err Add more tests 2021-11-04 00:05:38 -05:00
signal_exclusive_flags.blp language: Add not-swapped flag for signals 2024-12-23 02:46:52 +00:00
signal_exclusive_flags.err language: Add not-swapped flag for signals 2024-12-23 02:46:52 +00:00
signal_object_dne.blp language: Use new extern syntax in signal handlers 2023-01-12 15:49:19 -06:00
signal_object_dne.err language: Use new extern syntax in signal handlers 2023-01-12 15:49:19 -06:00
signal_unnecessary_flags.blp language: Add not-swapped flag for signals 2024-12-23 02:46:52 +00:00
signal_unnecessary_flags.err language: Add not-swapped flag for signals 2024-12-23 02:46:52 +00:00
single_quoted_translated.blp Warn about single-quoted translated strings 2025-01-05 14:27:59 -06:00
single_quoted_translated.err Warn about single-quoted translated strings 2025-01-05 14:27:59 -06:00
size_group_non_widget.blp Remove some semicolons 2021-11-30 21:04:35 -06:00
size_group_non_widget.err Remove the ':' in a few places 2021-11-12 17:47:09 -06:00
size_group_obj_dne.blp Remove some semicolons 2021-11-30 21:04:35 -06:00
size_group_obj_dne.err Remove the ':' in a few places 2021-11-12 17:47:09 -06:00
string_to_num_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
string_to_num_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
string_to_object_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
string_to_object_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
string_to_type_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
string_to_type_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
strv.blp typelib: Fix crash when handling array types 2023-02-16 20:43:17 -06:00
strv.err typelib: Fix crash when handling array types 2023-02-16 20:43:17 -06:00
styles_in_non_widget.blp Remove some semicolons 2021-11-30 21:04:35 -06:00
styles_in_non_widget.err Improved validation 2021-11-12 18:01:56 -06:00
subscope.blp Add type to BuilderListItemFactory extension 2023-05-13 16:49:48 -05:00
subscope.err Make builder template factories use a subscope 2023-04-28 20:49:22 -05:00
template_parent.blp Change template syntax 2023-05-13 16:49:48 -05:00
template_parent.err Change template syntax 2023-05-13 16:49:48 -05:00
translated_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
translated_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
translated_string_array.blp values: Don't allow translated strings in arrays 2025-01-03 18:56:24 -06:00
translated_string_array.err values: Don't allow translated strings in arrays 2025-01-03 18:56:24 -06:00
two_templates.blp Change template syntax 2023-05-13 16:49:48 -05:00
two_templates.err Change template syntax 2023-05-13 16:49:48 -05:00
typeof_assignment.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
typeof_assignment.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
uint.blp Fix uint properties 2021-11-24 14:46:49 -06:00
uint.err Fix uint properties 2021-11-24 14:46:49 -06:00
unrecognized_syntax.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
unrecognized_syntax.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
upgrade_sync_create.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
upgrade_sync_create.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
upgrade_template_list_item.blp Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
upgrade_template_list_item.err Add tests, remove unused code, fix bugs 2024-12-22 18:00:39 -06:00
using_invalid_namespace.blp tests: Add some error handling tests 2021-11-03 23:03:43 -05:00
using_invalid_namespace.err Add more tests 2021-11-04 00:05:38 -05:00
warn_old_bind.blp Remove PropertyBinding rule, just use Binding 2023-07-20 18:46:45 -05:00
warn_old_bind.err Remove PropertyBinding rule, just use Binding 2023-07-20 18:46:45 -05:00
warn_old_extern.blp language: Use new extern syntax in signal handlers 2023-01-12 15:49:19 -06:00
warn_old_extern.err Use <> instead of () for casts & typeof 2023-04-10 09:39:34 -05:00
warn_unused_import.blp Add warning for unused imports 2024-04-06 14:33:20 -05:00
warn_unused_import.err Add warning for unused imports 2024-04-06 14:33:20 -05:00
widgets_in_non_size_group.blp validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00
widgets_in_non_size_group.err validation: Disallow instantiating abstract classes 2022-04-28 23:35:34 -05:00