Commit Graph

13 Commits

Author SHA1 Message Date
Alex Hoppen
294977534c [libSyntax] Remove incremental JSON transfer option
We were only keeping track of `RawSyntax` node IDs to incrementally transfer a syntax tree via JSON. However, AFAICT the incremental JSON transfer option has been superceeded by `SyntaxParseActions`, which are more efficient.

So, let’s clean up and remove the `RawSyntax` node ID and JSON incremental transfer option.

In places that still need a notion of `RawSyntax` identity (like determining the reused syntax regions), use the `RawSyntax`’s pointer instead of the manually created ID.

In `incr_transfer_round_trip.py` always use the code path that uses the `SyntaxParseActions` and remove the transitional code that was still using the incremental JSON transfer but was never called.
2021-04-07 10:01:34 +02:00
Alex Hoppen
8ec8516893 Remove ByteTree serialization format
It was originally designed for faster trasmission of syntax trees from
C++ to SwiftSyntax, but superceded by the CLibParseActions. There's no
deserializer for it anymore, so let's just remove it.
2021-01-14 20:37:49 +01:00
Saleem Abdulrasool
58d0cbcaea Update validate_parse.py
Attempt to appease the python linter
2020-07-03 12:41:47 -07:00
Saleem Abdulrasool
3ed6c994d2 test: make validate_parse more python3 friendly
Use `io.open` to open the files with the correct encoding and to allow
proper newline specification.  This allows the script to be python 2 and
python 3 compatible.
2020-07-02 12:47:27 -07:00
Argyrios Kyrtzidis
bea79d48c1 Fix python lint issue 2020-03-18 17:14:05 -07:00
Argyrios Kyrtzidis
1882b50555 [libSyntax] Enhance incremental re-parsing testing to also check whether unexpected diagnostics were emitted
Enhances `swift-syntax-test` to output the parser diagnostics so we can verify that
if the incremental parse resulted in parser diagnostics, those diagnostics were also emitted during the full parse.
2020-03-18 11:52:21 -07:00
Saleem Abdulrasool
0f0098265c incrparse: move include to top
Address feedback from ahoppen.  NFC.
2018-12-04 19:46:03 -08:00
Saleem Abdulrasool
2793b64491 incrparse: use python to diff rather than diff
Use the python library `difflib` which is part of a standard python
installation to generate the diff.  This allows us to run the tool on
Windows wihtout needing external tools installed.
2018-12-04 13:26:52 -08:00
Pavol Vaskovic
53cd115b0e [Gardening] Fix W291 trailing whitespace 2018-11-28 16:57:23 +01:00
Alex Hoppen
da7cdbb122 [libSyntax] Add test cases for ByteTree serialization and deserialization 2018-08-21 10:55:15 -07:00
Alex Hoppen
52acc04fa7 [libSyntax] Add test case to match the incrementally transferred syntax tree 2018-07-25 09:58:53 -07:00
Alex Hoppen
d926b74836 [incrParse] Add test cases to test the incremental syntax tree transfer 2018-07-24 16:32:23 -07:00
Alex Hoppen
d9d5afd15a [incrParse] Refactor the test utility to be more modular
This way we can use the same core of the test utility to verify
round-tripness of incrementally transferring the syntax tree to
swiftSyntax.
2018-07-19 14:47:58 -07:00