Skip to content

Commit 8fcc1ab

Browse files
committed
Some renaming
1 parent ac69364 commit 8fcc1ab

File tree

4 files changed

+51
-55
lines changed

4 files changed

+51
-55
lines changed

analysis/.depend

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
src/BuildSystem.cmx : src/ModuleResolution.cmx src/Log.cmx src/Infix.cmx \
22
src/Files.cmx
3-
src/EditorSupportCommands.cmx : src/Utils.cmx src/Uri2.cmx src/TopTypes.cmx \
4-
src/State.cmx src/SharedTypes.cmx src/Shared.cmx src/References.cmx \
5-
src/Protocol.cmx src/NewCompletions.cmx src/Hover.cmx src/Files.cmx
3+
src/Cli.cmx : src/Commands.cmx
4+
src/Commands.cmx : src/Utils.cmx src/Uri2.cmx src/TopTypes.cmx src/State.cmx \
5+
src/SharedTypes.cmx src/Shared.cmx src/References.cmx src/Protocol.cmx \
6+
src/NewCompletions.cmx src/Hover.cmx src/Files.cmx
67
src/Files.cmx :
78
src/FindFiles.cmx : src/Utils.cmx src/SharedTypes.cmx \
89
src/ModuleResolution.cmx src/Log.cmx src/vendor/Json.cmx src/Infix.cmx \
@@ -40,7 +41,6 @@ src/Protocol.cmx : src/vendor/Json.cmx
4041
src/Query.cmx : src/SharedTypes.cmx src/Log.cmx src/Infix.cmx
4142
src/References.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \
4243
src/Query.cmx src/Log.cmx src/Infix.cmx
43-
src/RescriptEditorSupport.cmx : src/EditorSupportCommands.cmx
4444
src/Shared.cmx : src/PrintType.cmx src/Files.cmx
4545
src/SharedTypes.cmx : src/Utils.cmx src/Uri2.cmx src/Shared.cmx \
4646
src/Infix.cmx

analysis/src/Cli.ml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
let help =
2+
{|
3+
**Private CLI For rescript-vscode usage only**
4+
5+
Examples:
6+
current-platform.exe dump src/MyFile.res src/MyFile2.res
7+
current-platform.exe complete src/MyFile.res 0 4 currentContent.res
8+
current-platform.exe hover src/MyFile.res 10 2
9+
current-platform.exe definition src/MyFile.res 9 3
10+
11+
Options:
12+
dump: debugging. definition and hover for Foo.res and Foo2.res:
13+
14+
current-platform.exe dump src/Foo.res src/Foo2.res
15+
16+
complete: compute autocomplete for Foo.res at line 0 and column 4,
17+
where Foo.res is being edited and the editor content is in file current.res.
18+
19+
current-platform.exe complete src/Foo.res 0 4 current.res
20+
21+
hover: get inferred type for Foo.res at line 10 column 2:
22+
23+
current-platform.exe hover src/Foo.res 10 2
24+
25+
definition: get inferred type for Foo.res at line 10 column 2:
26+
27+
current-platform.exe definition src/Foo.res 10 2|}
28+
29+
let main () =
30+
match Array.to_list Sys.argv with
31+
| [_; "complete"; path; line; col; currentFile] ->
32+
Commands.complete ~path ~line:(int_of_string line) ~col:(int_of_string col)
33+
~currentFile
34+
| [_; "hover"; path; line; col] ->
35+
Commands.hover ~path ~line:(int_of_string line) ~col:(int_of_string col)
36+
| [_; "definition"; path; line; col] ->
37+
Commands.definition ~path ~line:(int_of_string line)
38+
~col:(int_of_string col)
39+
| _ :: "dump" :: files -> Commands.dump files
40+
| [_; "test"; path] -> Commands.test ~path
41+
| args when List.mem "-h" args || List.mem "--help" args -> prerr_endline help
42+
| _ ->
43+
prerr_endline help;
44+
exit 1
45+
46+
;;
47+
main ()
File renamed without changes.

analysis/src/RescriptEditorSupport.ml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)