6 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
345b52a4f7 Sort diagnostics by sloc range after (re) parsing 2024-10-11 09:43:39 +00:00
Pierre-Marie de Rodat
642f17e237 File readers: allow both diagnostics and contents in a result
It may be interesting for file readers to return both decoded contents
and also diagonstics, for example when doing error recovery while
transcoding the source buffer.

The Read primitives currently does not allow this: Contents is
considered uninitialized when Diagnostics is not empty. Always expect
Contents to be initialized instead to support this case.

TN: VA17-001
2022-11-02 09:12:53 +00:00
Pierre-Marie de Rodat
75d64a42d4 Add sloc info to source buffer decoding errors
This will allow users of Langkit-generated libraries to easily locate
invalid byte sequences in their sources.

TN: UB12-067
2021-11-23 14:18:18 +01:00
Pierre-Marie de Rodat
f7749fcc6b Testsuite: use "ascii" for non-ASCII test outputs
On Windows, the default encoding (not UTF-8) may not allow non-ASCII
test outputs. Use Python's "ascii" builtin where needed to ensure pure
ASCII test outputs.

TN: U720-016
2021-09-27 14:46:45 +02:00
Pierre-Marie de Rodat
5dbf999964 Python API: remove support for Python2
TN: U720-016
2021-09-24 15:54:42 +02:00
Pierre-Marie de Rodat
6119d49b15 Python API: accept unicode source buffers in get_from_buffer/reparse
TN: SC05-019
2019-12-18 15:28:19 +01:00