Commit Graph

9 Commits

Author SHA1 Message Date
Hassan
09b794d002 [Localization] Correct namings and improve comment 2021-03-23 22:39:35 +02:00
Hassan
8665e0cb55 [Localization] Move localization allocator from DiagEngine to the localization producer 2021-03-23 10:41:54 +02:00
Hassan
d4ae82628b [Localization] Assert if printDiagnosticNames is true; the StringSaver is also present 2021-03-21 21:00:53 +02:00
Hassan
ef7551d4f5 [Localization] Add an allocator to to retain diagnostic strings 2021-03-17 10:23:02 +02:00
Hassan
651655e3db [Localization] Allocate a copy of diagnostic + name strings in LocalizationProducer 2021-03-14 17:38:34 +02:00
Hassan
1b0e8f9cec [Localization] Make localization producer handle printing diagnostics IDs 2021-03-14 17:38:34 +02:00
Pavel Yaskevich
c7a15e108c [Localization] Simplify localization producer interface
Require producers to implement `getMessage(DiagID)` and
establish default implementation of `getMessageOr`, so
producers don't have to worry about handling fallback if
translation is unavailable.
2020-09-16 11:47:07 -07:00
Pavel Yaskevich
5d11fe6b62 [Localization] Extract def-to-yaml conversion logic into DefToYAMLConverter to ease testing 2020-09-03 16:33:23 -07:00
Saleem Abdulrasool
fe0a945898 AST: split out diagnostics serialization
Create a new diagnostics serialization library, splitting out of
swiftAST to reduce the overheads for building the tooling for
cross-compiling the toolchain.  This should reduce the build time for
swift-serialize-diagnostics to enable cross-compilation.
2020-08-24 09:21:55 -07:00