Argyrios Kyrtzidis
791309155d
[Parse] Fix issue with incremental re-parsing for SwiftSyntax emitting bogus parsing error
...
rdar://60232712
2020-03-18 16:00:04 -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
Jonas Devlieghere
b4d268e9e1
Migrate llvm::make_unique to std::make_unique
...
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances in the swift repo.
2019-08-15 11:32:39 -07:00
Michael Munday
ce3aff12da
[Basic] Always serialize integers in little-endian byte order
...
This change fixes the ExponentialGrowthAppendingBinaryByteStream
tests on big endian machines.
Force ExponentialGrowthAppendingBinaryByteStreams to use little-
endian byte order. We always used little-endian byte order anyway
and it seems very unlikely we'll need the flexibility to make the
stream big-endian in the future. The benefit of this is that we
can use portable APIs while still allowing the compiler to remove
conditional byte swaps.
Also replace writeRaw with writeInteger and make it explicitly
little-endian to make the API cleaner and more portable.
2019-07-02 11:36:58 -04:00
Nathan Hawes
1e1025291d
Add test for the SwiftSyntax tree produced when parsing '= super' in a module interface
2019-04-16 15:21:26 -07:00
Nathan Hawes
9003d83ffe
[gardening] convert ByteBasedSourceRange to CharSourceRange rather than SourceRange
...
The only client of the 'toSourceRange' method immediately constructs a
CharSourceRange from it, and ByteBasedSourceRange's EndLoc isn't the start of
the last token in the range (as SourceRange expects).
2018-10-11 14:36:09 -07:00
Alex Hoppen
9d9bb5377a
[incrParse] Fix issue that did not report the first reparsed character as reparsed
2018-10-11 17:54:35 +02:00
Alex Hoppen
5f341999e5
Merge pull request #18905 from ahoppen/semantic-version-number
...
[libSyntax] Make the ByteTree protocol version consist of a major and minor component
2018-08-29 16:40:08 -07:00
Alex Hoppen
49d0d5b7a3
[libSyntax] Make the ByteTree protocol version consist of a major and minor component
2018-08-29 13:40:50 -07:00
Xi Ge
9f7e2f7610
swift-syntax-test: teach the test driver to accept RequestEvaluatorGraphVizPath.
2018-08-29 11:13:42 -07:00
Alex Hoppen
33d86d5cb6
[byteTree] Write fixed sized data using an optimized form
...
If we know the size of a type at compile time (like we do for all the
integer types), it is cheaper to assign the data buffer directly instead
of using a memcpy.
2018-08-24 15:27:23 -07:00
Alex Hoppen
34a89d45e2
[libSyntax] Make the ByteTree format forwards-compatible
2018-08-22 12:07:57 -07:00
Alex Hoppen
da7cdbb122
[libSyntax] Add test cases for ByteTree serialization and deserialization
2018-08-21 10:55:15 -07:00
Alex Hoppen
e9e7d5cf68
[libSyntax] Generate TokenKinds.def from gyb_syntax_support
2018-08-15 11:11:27 -07:00
swift-ci
7a25818d82
Merge remote-tracking branch 'origin/master' into master-next
2018-07-31 13:49:49 -07:00
Alex Hoppen
775beece65
[libSyntax] Add a swift token classifier for syntax highlighting
2018-07-30 14:54:43 -07:00
swift-ci
4b684e97ef
Merge remote-tracking branch 'origin/master' into master-next
2018-07-25 19:29:15 -07:00
Rintaro Ishizaki
6346e9b437
[libSyntax] Fix compiler error ( #18243 )
...
Another instance of 7ad81a88b9 .
2018-07-26 11:12:24 +09:00
swift-ci
879a10aa57
Merge remote-tracking branch 'origin/master' into master-next
2018-07-25 15:29:05 -07:00
Alex Hoppen
57196f8902
[libSyntax] Enable serialization of syntax trees for incremental transfer
2018-07-23 12:32:49 -07:00
swift-ci
7b5e5028b7
Merge remote-tracking branch 'origin/master' into master-next
2018-07-20 13:49:10 -07:00
swift-ci
770b29634b
Merge remote-tracking branch 'origin/master' into master-next
2018-07-19 14:50:16 -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
Alex Hoppen
419ba044f1
[libSyntax] Record reused node IDs
...
This is cheaper than recording reused region offsets and the reused node
IDs will later be used to incrementally transfer the syntax to
SwiftSyntax.
2018-07-19 13:55:57 -07:00
swift-ci
3e0444534b
Merge remote-tracking branch 'origin/master' into master-next
2018-07-19 10:49:42 -07:00
Alex Hoppen
705f5b79a2
[libSyntax] Rename getAbsolutePosition-related methods for more clarity
2018-07-19 09:15:53 -07:00
swift-ci
c4feb3611d
Merge remote-tracking branch 'origin/master' into master-next
2018-07-18 17:09:20 -07:00
Alex Hoppen
7a750bf024
[libSyntax] Allow syntax cache reuse info to be passed back via SourceKit
2018-07-18 13:35:10 -07:00
Bob Wilson
e1cbc560f9
[master-next] More changes to adapt to new LLVM flags in r334221
...
My previous change for this issue (033b884de6 ) did not fix all the
affected code. This gets the rest of them. Thanks for Jason Molenda
for helping with this. rdar://problem/41025365
2018-06-12 14:55:40 -07:00
Alex Hoppen
2decf8ffaf
[libSyntax] Rename recordReuseInformation to setRecordReuseInformation
2018-05-22 09:07:56 -07:00
Alex Hoppen
b26dd1118c
[incrParse] Fix swift-syntax-test not complaining about unexpected reparsed functions
2018-05-22 08:52:40 -07:00
Alex Hoppen
c31a880a47
[incrParse] Allow whitespaces to be reparsed in test
...
This greatly improves the ergonomics of writing tests and outweighs the
ability to test which whitespaces get parsed since their parsing
overhead should be minimal.
2018-05-22 08:52:38 -07:00
Alex Hoppen
d026b2da04
[incrParse] Add verification of reparsed regions to swift-syntax-test
2018-05-22 08:52:37 -07:00
Alex Hoppen
4da37b1702
[incrParse] Add option to force coloured output
2018-05-22 08:52:36 -07:00
Alex Hoppen
6135f10151
[incrParse] Outdated documentation fixes
2018-05-22 08:52:36 -07:00
Alex Hoppen
bc5e4d709a
[incrParse] Compute byte offsets of pre-edit file based on that file
2018-05-22 08:52:35 -07:00
Alex Hoppen
d9fd523897
[swift-syntax-test] Refactor to allow incremental parsing on all actions
2018-05-22 08:52:34 -07:00
Alex Hoppen
8998b27dd4
[incrParse] Add coloured output indicating which code got reused
2018-05-22 08:52:34 -07:00
Alex Hoppen
92f8f34d22
[incrParse] Store reused regions and output them after parsing
2018-05-22 08:52:34 -07:00
Alex Hoppen
3382fac436
[incrParse] Allow line:column notation to specify edits
2018-05-22 08:52:34 -07:00
Alex Hoppen
186feb6f0e
[incrParse] Allow information about node reused be outputted
2018-05-22 08:52:33 -07:00
Alex Hoppen
db52819d94
[swift-syntax-test] Fix formatting of command-line-argument descriptions
2018-05-22 08:52:33 -07:00
Alex Hoppen
60d11d24f8
[incrParse] Reparse a node if the next leaf node has been modified
2018-05-22 08:52:33 -07:00
Alex Hoppen
de9737c946
[incrParse] Support incremental parsing for edited files
2018-05-22 08:52:33 -07:00
David Zarzycki
95473a10d7
[Misc] NFC: Fix random build warnings
...
Unused variables/methods, language extensions, extra semicolons, intentional
self assignment, platform specific quirks, etc.
2018-04-30 12:52:43 -04:00
Alex Hoppen
699ca79ac5
[swift-syntax-test] Add batch option to execute action for every swift file in directory
2018-04-20 13:38:14 -07:00
Dexin Li
e0f8b27117
[Syntax]Add a deserializer that convert json to libSyntax tree ( #15203 )
2018-03-16 15:22:04 -07:00
Rintaro Ishizaki
194a14346d
[swift-syntax-test] Make VerifySyntaxTree a command line option ( #15227 )
...
Add `-verify-syntax-tree` option to `swift-syntax-test`.
Defaulted to `true`, can be disabled with `-verify-syntax-tree=false`
2018-03-14 14:05:25 +09:00
omochimetaru
d12542503f
[Syntax] test diagnostics in Lexer with libSyntax ( #14954 )
2018-03-04 08:53:54 +09:00
Jordan Rose
3cd9f166bc
Don't spend time initializing LLVM when running the driver ( #14896 )
...
Tiny start-up time optimization noticed while looking at how we do
PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few
more of our testing tools, via the new PROGRAM_START macro.
2018-02-28 19:56:19 -08:00