Skip to content

Commit c1bb312

Browse files
committed
minor changes
1 parent 4e750af commit c1bb312

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cmd/src/tools/cmd_fmt.ri

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,18 @@ public func cmd_fmt(args: []string) -> ! {
3535
}
3636
for input in remaining {
3737
mut prefs_ := prefs.Prefs(
38-
input: input,
3938
is_fmt: true,
4039
hide_all_warns: true
4140
);
4241
prefs_.check_input(input);
43-
prefs_.load_data()!;
42+
prefs_.load_module_info()!;
4443
report.reportTable.prefs = prefs_;
4544
table_ := ast.Table.new(prefs_);
4645
mut compiler := rivet.Compiler(table: table_, prefs: prefs_);
4746
compiler.load_root_module()!;
4847
mut formatter := fmt.Formatter(prefs_, table_, write_to_file: write_to_file);
4948
for source_file in table_.source_files {
50-
output := formatter.fmt(source_file);
49+
output := formatter.format(source_file);
5150
console.writeln(output);
5251
}
5352
}

lib/rivet/src/fmt/mod.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct Formatter {
2222
mut line_len: uint;
2323
mut empty_line: bool;
2424

25-
public func fmt(mut self, source_file: ast.SourceFile) -> string {
25+
public func format(mut self, source_file: ast.SourceFile) -> string {
2626
self.source_file = source_file;
2727
self.format_decls(source_file.decls);
2828
return self.output.to_string();

lib/rivet/src/prefs/mod.ri

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public struct Prefs {
278278
if prefs.input.is_empty() {
279279
utils.error("no input received");
280280
}
281-
prefs.load_data()!;
281+
prefs.load_module_info()!;
282282
return prefs;
283283
}
284284

@@ -301,7 +301,7 @@ public struct Prefs {
301301
}
302302
}
303303

304-
public func load_data(mut self) -> ! {
304+
public func load_module_info(mut self) -> ! {
305305
if self.is_test {
306306
self.mod_output = "_rivet_tests_runner_";
307307
} else if self.mod_output.is_empty() {

0 commit comments

Comments
 (0)