openapi-generator/bin/utils/dart-keywords
Nick Meinhold 11bcb661a1 Dart generate keywords (#4449)
* Add script to use Dart SDK to generate keywords

* Read generated keywords in dart generator
2019-11-12 00:11:43 +08:00
..
dart-version.txt Dart generate keywords (#4449) 2019-11-12 00:11:43 +08:00
pubspec.lock Dart generate keywords (#4449) 2019-11-12 00:11:43 +08:00
pubspec.yaml Dart generate keywords (#4449) 2019-11-12 00:11:43 +08:00
README.md Dart generate keywords (#4449) 2019-11-12 00:11:43 +08:00
save_dart_keywords.sh Dart generate keywords (#4449) 2019-11-12 00:11:43 +08:00
save-dart-keywords.dart Dart generate keywords (#4449) 2019-11-12 00:11:43 +08:00

What is the purpose?

Running ./save_dart_keywords.sh from this directory will generate dart-keywords.txt which contains the current Dart keywords and is used by the dart generator as a set of reserved words.

When should the keywords be generated?

save_dart_keywords.sh should be run when a new version of Dart is release to update the keywords file.

The last Dart version that was used to generate the keywords can be found in dart-version.txt.

What does the shellscript do?

  1. compile a dart app

    • dart2native save-dart-keywords.dart
  2. run the dart app

    • ./save-dart-keywords.exe
  3. the ouput is dart-keywords.txt and dart-version.txt