File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,13 @@ let command ~path ~pos =
76
76
let parser =
77
77
Res_driver. parsingEngine.parseImplementation ~for Printer:false
78
78
in
79
- let {Res_driver. parsetree = structure; comments; filename} =
80
- parser ~filename: path
81
- in
79
+ let {Res_driver. parsetree = structure; comments} = parser ~filename: path in
82
80
let printer =
83
- Res_driver. printEngine.printImplementation
84
- ~width: ! Res_cli.ResClflags. width ~comments ~filename
81
+ Res_printer. printImplementation ~width: ! Res_cli.ResClflags. width ~comments
85
82
in
86
83
let changed = ref false in
87
84
let mapper = mkMapper ~pos ~changed in
88
85
let newStructure = mapper.structure mapper structure in
89
- if ! changed then printer newStructure
86
+ if ! changed then
87
+ let formatted = printer newStructure in
88
+ Printf. printf " Formatted:\n %s" formatted
Original file line number Diff line number Diff line change 1
1
Actions tests/src/Actions.res 3:10
2
2
Hit _ifThenElse
3
+ Formatted:
3
4
type kind = First | Second | Third
4
5
5
6
let _ = (kind, kindStr) => {
@@ -15,6 +16,7 @@ let _ = (kind, kindStr) => {
15
16
16
17
Actions tests/src/Actions.res 10:9
17
18
Hit _ternary
19
+ Formatted:
18
20
type kind = First | Second | Third
19
21
20
22
let _ = (kind, kindStr) => {
You can’t perform that action at this time.
0 commit comments