Skip to content

Commit

Permalink
Merge pull request #1021 from coq/fix-uncaught-error
Browse files Browse the repository at this point in the history
Fixing server crashes
  • Loading branch information
rtetley authored Jan 30, 2025
2 parents 0f85c9f + cb9e85e commit dfb6989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion language-server/dm/document.ml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ let handle_parse_more ({loc; synterp_state; stream; raw; parsed; parsed_comments
| None, _ (* EOI *) -> create_parsing_event (Invalidate parse_state)
| Some ast, comments ->
let stop = Stream.count stream in
log @@ "Parsed: " ^ (Pp.string_of_ppcmds @@ Ppvernac.pr_vernac ast);
let begin_line, begin_char, end_char =
match ast.loc with
| Some lc -> lc.line_nb, lc.bp, lc.ep
Expand All @@ -535,6 +534,7 @@ let handle_parse_more ({loc; synterp_state; stream; raw; parsed; parsed_comments
let tokens = stream_tok 0 [] lex begin_line begin_char in
begin
try
log @@ "Parsed: " ^ (Pp.string_of_ppcmds @@ Ppvernac.pr_vernac ast);
let entry = get_entry ast in
let classification = Vernac_classifier.classify_vernac ast in
let synterp_state = Vernacstate.Synterp.freeze () in
Expand Down

0 comments on commit dfb6989

Please sign in to comment.