diff --git a/releasenotes.md b/releasenotes.md index 29405cc33..d286e1f07 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -24,6 +24,7 @@ - Splatting const slices would not be const. #2185 - Fixes to `$define` handling of binary ops. - Fixes methodsof to pick up all sorts of extension methods. #2192 +- `--lsp` sometimes does not emit end tag #2194. ### Stdlib changes - Deprecate `String.is_zstr` and `String.quick_zstr` #2188. diff --git a/src/compiler/compiler.c b/src/compiler/compiler.c index 8e68eadbc..eb6a9ba3c 100644 --- a/src/compiler/compiler.c +++ b/src/compiler/compiler.c @@ -415,7 +415,15 @@ void compiler_parse(void) if (!parse_stdin()) has_error = true; } - if (has_error) exit_compiler(EXIT_FAILURE); + if (has_error) + { + if (compiler.build.lsp_output) + { + eprintf("> ENDLSP-ERROR\n"); + exit_compiler(COMPILER_SUCCESS_EXIT); + } + exit_compiler(EXIT_FAILURE); + } compiler_parsing_time = bench_mark(); }