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 () =
7171 | _ :: "dump" :: files -> Commands. dump files
7272 | [_; " documentSymbol" ; path] -> Commands. documentSymbol ~path
7373 | [_; " semanticTokens" ; currentFile] ->
74- SemanticTokens. testCommand ~current File
74+ SemanticTokens. semanticTokens ~current File
7575 | [_; " hover" ; path; line; col] ->
7676 Commands. hover ~path ~line: (int_of_string line) ~col: (int_of_string col)
7777 | [_; " references" ; path; line; col] ->
Original file line number Diff line number Diff line change @@ -347,9 +347,9 @@ let test ~path =
347347 close_out cout;
348348 completion ~path ~line ~col ~current File;
349349 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
353353 ~emitter: (SemanticTokens.Token. createEmitter () )
354354 ~path
355355 | _ -> () );
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ let emitVariant ~(name : Longident.t Location.loc) ~debug emitter =
208208 ~pos: (Utils. tupleOfLexing name.loc.loc_start)
209209 ~lid: name.txt ~debug
210210
211- let parser ~debug ~emitter ~path =
211+ let command ~debug ~emitter ~path =
212212 let processTypeArg (coreType : Parsetree.core_type ) =
213213 if debug then Printf. printf " TypeArg: %s\n " (locToString coreType.ptyp_loc)
214214 in
@@ -441,8 +441,7 @@ let parser ~debug ~emitter ~path =
441441 (List. length signature) (List. length diagnostics);
442442 mapper.signature mapper signature |> ignore
443443
444- let testCommand ~currentFile =
444+ let semanticTokens ~currentFile =
445445 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;
448447 Printf. printf " {\" data\" :[%s]}" (Token. emit emitter)
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ open XX.YY
5353
5454type tt = t
5555
56- // ^par
56+ // ^hig
5757
5858module T = {
5959 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
22structure items:38 diagnostics:0
33Lident: M (0,7) Class
44Lident: C (1,9) Class
You can’t perform that action at this time.
0 commit comments