Repository navigation
4.0.0
CHANGES:
- LSP:
- New: language server
elpi-lspsupporting type information via hovering,
jump to definition and semantic highlighting. Seelsp/README.md - New: elpi-webrunner npm package containing the lsp server that runs in a
web worker, compiled to WebAssembly and to JavaScript. Moreover
part of theAPImodulesSetup,Parse,CompileandExecute
exposed JavaScript. Seewebrunner/README.md
- New: language server
- Compiler:
- Change: new field
max_errorsofCompile.flags - Change: the passes can be error resilient: they return their result and
the list of the errors found. WithCompile.flags.max_errors = 0they do
stop at the first error, as before.
See also the flag-max-errors Ntoelpi. - Change: an undeclared global is reported by a warning of its own, located
at its first occurrence (formerly one warning, without a location, for
all the undeclared globals).
- Change: new field
- API:
- New: module
LSP, with what the language server needs - Change:
API.Compile.hoveris nowAPI.LSP.hover - Change: new module
Error: the type of errorsError.t(component,
location, message), printers, the exceptionError.ElpiError(formerly
Compile.CompileError). - Change:
Setup.set_error,set_anomaly,set_type_errorand
Utils.error,anomaly,type_errorare removed; the errors of the
builtins can be redirected withBuiltin.set_runtime_error,
set_runtime_anomaly,set_runtime_type_error(they take a
Builtin.runtime_error_hook, a function that raises). - Change: the parser and the passes
of the compiler return their warnings (Error.warning) with their result
and their errors;Setup.set_warnis removed. The warnings at run time
(Builtin.warn, formerlyUtils.warn) can be redirected with
Builtin.set_runtime_warn.
Setup.warning_idis nowError.warning_id. - Change:
Parse.goalandParse.goal_fromare nowParse.queryand
Parse.query_from; likeCompile.query, they return the query or its
syntax error (instead of raisingParse.ParseError), and its warnings.
- New: module
- Parser:
- Change:
Parse.programandParse.program_fromare error
resilient whenmax_errors > 0: a declaration with a syntax error is
skipped up to the next.and dropped, and they return the program and the
list of the errors like the passes of the compiler. - Change: a syntax error in an accumulated file is located on the
accumulate directive, its message gives the position in the file. - New: the comment block on the line before a declaration (
pred,func,
type,kind...) is its documentation and is used by the LSP server.
- Change:
- Builtins:
- New:
reset_new_int N: resets the counter ofnew_inttoN, so the
nextnew_intgivesN + 1(its values are increasing only between two
resets)
- New: