You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ This file documents the changes made to the formatter with each release.
12
12
13
13
- Removed space between lambda function name and parameter list
14
14
- Force @export and @onready annotations to stay on the same line as a variable but keep other annotations separate
15
+
- Stop trying to format any code containing parse errors. Until now we tried to still format definitions around the code with errors, but this can lead to cases where the formatter produces invalid code
"We failed to parse input, the parser did not produce a valid AST"
41
+
}
42
+
Self::ParseErrors => "The input GDScript code contains parse errors",
43
+
Self::FailedToParseFormattedOutput => {
44
+
"The parser could not parse the formatted output, it did not produce a valid AST"
45
+
}
46
+
Self::StructureChanged => {
47
+
"The formatted output is structurally different from the input. Please report this to the bug tracker with a copy of the input code: https://github.com/GDQuest/GDScript-formatter/issues/"
48
+
}
49
+
};
50
+
formatter.write_str(message)
51
+
}
52
+
}
53
+
54
+
impl std::error::ErrorforFormatErrors{}
55
+
28
56
/// Selects which delimiters the formatter prefers for string literals.
29
57
#[derive(Clone,Copy,Debug,PartialEq,Eq)]
30
58
pubenumQuoteStyle{
@@ -81,7 +109,10 @@ impl Default for FormatterConfiguration {
81
109
///
82
110
/// For formatting multiple files, prefer [format_gdscript_with_buffers] to
83
111
/// reuse pre-allocated buffers across multiple calls.
0 commit comments