File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,18 @@ public func cmd_fmt(args: []string) -> ! {
35
35
}
36
36
for input in remaining {
37
37
mut prefs_ := prefs.Prefs(
38
- input: input,
39
38
is_fmt: true,
40
39
hide_all_warns: true
41
40
);
42
41
prefs_.check_input(input);
43
- prefs_.load_data ()!;
42
+ prefs_.load_module_info ()!;
44
43
report.reportTable.prefs = prefs_;
45
44
table_ := ast.Table.new(prefs_);
46
45
mut compiler := rivet.Compiler(table: table_, prefs: prefs_);
47
46
compiler.load_root_module()!;
48
47
mut formatter := fmt.Formatter(prefs_, table_, write_to_file: write_to_file);
49
48
for source_file in table_.source_files {
50
- output := formatter.fmt (source_file);
49
+ output := formatter.format (source_file);
51
50
console.writeln(output);
52
51
}
53
52
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public struct Formatter {
22
22
mut line_len: uint;
23
23
mut empty_line: bool;
24
24
25
- public func fmt (mut self, source_file: ast.SourceFile) -> string {
25
+ public func format (mut self, source_file: ast.SourceFile) -> string {
26
26
self.source_file = source_file;
27
27
self.format_decls(source_file.decls);
28
28
return self.output.to_string();
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ public struct Prefs {
278
278
if prefs.input.is_empty() {
279
279
utils.error("no input received");
280
280
}
281
- prefs.load_data ()!;
281
+ prefs.load_module_info ()!;
282
282
return prefs;
283
283
}
284
284
@@ -301,7 +301,7 @@ public struct Prefs {
301
301
}
302
302
}
303
303
304
- public func load_data (mut self) -> ! {
304
+ public func load_module_info (mut self) -> ! {
305
305
if self.is_test {
306
306
self.mod_output = "_rivet_tests_runner_";
307
307
} else if self.mod_output.is_empty() {
You can’t perform that action at this time.
0 commit comments