From 99834e6a15eed841cd5f85a0bfb8b7bbff582071 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 12 May 2020 13:48:49 -0700 Subject: [PATCH 1/3] Add new Dart 2.9 keywords for Null Safety language feature --- src/languages/dart.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/languages/dart.js b/src/languages/dart.js index c7101b0643..25a05b63f1 100644 --- a/src/languages/dart.js +++ b/src/languages/dart.js @@ -75,12 +75,12 @@ export default function(hljs) { var KEYWORDS = { keyword: 'abstract as assert async await break case catch class const continue covariant default deferred do ' + 'dynamic else enum export extends extension external factory false final finally for Function get hide if ' + - 'implements import in inferface is library mixin new null on operator part rethrow return set show static ' + - 'super switch sync this throw true try typedef var void while with yield', + 'implements import in inferface is late library mixin new null on operator part required rethrow return set ' + + 'show static super switch sync this throw true try typedef var void while with yield', built_in: // dart:core - 'Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set ' + - 'Stopwatch String StringBuffer StringSink Symbol Type Uri bool double dynamic int num print ' + + 'Comparable DateTime Duration Function Iterable Iterator List Map Match Never Null Object Pattern RegExp ' + + 'Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double dynamic int num print ' + // dart:html 'Element ElementList document querySelector querySelectorAll window' }; From 1714202f19bf78ffd86972a94d79d84bc9138b76 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 12 May 2020 13:54:53 -0700 Subject: [PATCH 2/3] CHANGELOG --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 3ddb1a2c23..44f4e100a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,6 +33,7 @@ Language Improvements: - fix(typescript) `=>` function with nested `()` in params now works (#2502) [Josh Goebel][] - fix(yaml) Fix tags to include non-word characters (#2486) [Peter Plantinga][] - fix(swift) `@objcMembers` was being partially highlighted (#2543) [Nick Randall][] +- fix(dart) Add `late` and `required` keywords, and `Never` built-in type (#2550) [Sam Rawlins][] [Josh Goebel]: https://github.com/yyyc514 [Peter Plantinga]: https://github.com/pplantinga @@ -40,6 +41,7 @@ Language Improvements: [Vania Kucher]: https://github.com/qWici [Hankun Lin]: https://github.com/Linhk1606 [Nick Randall]: https://github.com/nicked +[Sam Rawlins]: https://github.com/srawlins ## Version 10.0.2 From ab0815998c1cda135a1d342c38bea0957d45453d Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Tue, 12 May 2020 18:12:59 -0400 Subject: [PATCH 3/3] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 44f4e100a4..03e90acb8e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,7 +33,7 @@ Language Improvements: - fix(typescript) `=>` function with nested `()` in params now works (#2502) [Josh Goebel][] - fix(yaml) Fix tags to include non-word characters (#2486) [Peter Plantinga][] - fix(swift) `@objcMembers` was being partially highlighted (#2543) [Nick Randall][] -- fix(dart) Add `late` and `required` keywords, and `Never` built-in type (#2550) [Sam Rawlins][] +- enh(dart) Add `late` and `required` keywords, and `Never` built-in type (#2550) [Sam Rawlins][] [Josh Goebel]: https://github.com/yyyc514 [Peter Plantinga]: https://github.com/pplantinga