File tree Expand file tree Collapse file tree 5 files changed +9
-10
lines changed Expand file tree Collapse file tree 5 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ let main () =
71
71
| _ :: "dump" :: files -> Commands. dump files
72
72
| [_; " documentSymbol" ; path] -> Commands. documentSymbol ~path
73
73
| [_; " semanticTokens" ; currentFile] ->
74
- SemanticTokens. testCommand ~current File
74
+ SemanticTokens. semanticTokens ~current File
75
75
| [_; " hover" ; path; line; col] ->
76
76
Commands. hover ~path ~line: (int_of_string line) ~col: (int_of_string col)
77
77
| [_; " references" ; path; line; col] ->
Original file line number Diff line number Diff line change @@ -347,9 +347,9 @@ let test ~path =
347
347
close_out cout;
348
348
completion ~path ~line ~col ~current File;
349
349
Sys. remove currentFile
350
- | "par " ->
351
- print_endline (" Parse " ^ path);
352
- SemanticTokens. parser ~debug: true
350
+ | "hig " ->
351
+ print_endline (" Highlight " ^ path);
352
+ SemanticTokens. command ~debug: true
353
353
~emitter: (SemanticTokens.Token. createEmitter () )
354
354
~path
355
355
| _ -> () );
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ let emitVariant ~(name : Longident.t Location.loc) ~debug emitter =
208
208
~pos: (Utils. tupleOfLexing name.loc.loc_start)
209
209
~lid: name.txt ~debug
210
210
211
- let parser ~debug ~emitter ~path =
211
+ let command ~debug ~emitter ~path =
212
212
let processTypeArg (coreType : Parsetree.core_type ) =
213
213
if debug then Printf. printf " TypeArg: %s\n " (locToString coreType.ptyp_loc)
214
214
in
@@ -441,8 +441,7 @@ let parser ~debug ~emitter ~path =
441
441
(List. length signature) (List. length diagnostics);
442
442
mapper.signature mapper signature |> ignore
443
443
444
- let testCommand ~currentFile =
444
+ let semanticTokens ~currentFile =
445
445
let emitter = Token. createEmitter () in
446
- parser ~emitter ~debug: false ~path: currentFile;
447
- (* emitter |> Token.add ~line:0 ~char:0 ~length:3 ~type_:Token.Keyword; *)
446
+ command ~emitter ~debug: false ~path: currentFile;
448
447
Printf. printf " {\" data\" :[%s]}" (Token. emit emitter)
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ open XX.YY
53
53
54
54
type tt = t
55
55
56
- // ^par
56
+ // ^hig
57
57
58
58
module T = {
59
59
type someRecord <'typeParameter > = {
Original file line number Diff line number Diff line change 1
- Parse tests/src/Highlight.res
1
+ Highlight tests/src/Highlight.res
2
2
structure items:38 diagnostics:0
3
3
Lident: M (0,7) Class
4
4
Lident: C (1,9) Class
You can’t perform that action at this time.
0 commit comments