| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library fasta.compiler_command_line; | 5 library fasta.compiler_command_line; |
| 6 | 6 |
| 7 import 'dart:io' show exit; | 7 import 'dart:io' show exit; |
| 8 | 8 |
| 9 import 'command_line.dart' show CommandLine, deprecated_argumentError; | 9 import 'command_line.dart' show CommandLine, deprecated_argumentError; |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 switch (programName) { | 148 switch (programName) { |
| 149 case "outline": | 149 case "outline": |
| 150 summary = | 150 summary = |
| 151 "Creates an outline of a Dart program in the Dill/Kernel IR format."; | 151 "Creates an outline of a Dart program in the Dill/Kernel IR format."; |
| 152 break; | 152 break; |
| 153 | 153 |
| 154 case "compile": | 154 case "compile": |
| 155 summary = "Compiles a Dart program to the Dill/Kernel IR format."; | 155 summary = "Compiles a Dart program to the Dill/Kernel IR format."; |
| 156 break; | 156 break; |
| 157 | 157 |
| 158 case "kompile": | |
| 159 summary = | |
| 160 "Compiles a Dart program to the Dill/Kernel IR format via dartk."; | |
| 161 break; | |
| 162 | |
| 163 case "run": | 158 case "run": |
| 164 summary = "Runs a Dart program."; | 159 summary = "Runs a Dart program."; |
| 165 break; | 160 break; |
| 166 | 161 |
| 167 case "compile_platform": | 162 case "compile_platform": |
| 168 summary = "Compiles Dart SDK platform to the Dill/Kernel IR format."; | 163 summary = "Compiles Dart SDK platform to the Dill/Kernel IR format."; |
| 169 basicUsage = "Usage: $programName [options] patched_sdk fullOutput " | 164 basicUsage = "Usage: $programName [options] patched_sdk fullOutput " |
| 170 "outlineOutput\n"; | 165 "outlineOutput\n"; |
| 171 } | 166 } |
| 172 StringBuffer sb = new StringBuffer(basicUsage); | 167 StringBuffer sb = new StringBuffer(basicUsage); |
| 173 if (summary != null) { | 168 if (summary != null) { |
| 174 sb.writeln(); | 169 sb.writeln(); |
| 175 sb.writeln(summary); | 170 sb.writeln(summary); |
| 176 sb.writeln(); | 171 sb.writeln(); |
| 177 } | 172 } |
| 178 sb.write(options); | 173 sb.write(options); |
| 179 // TODO(ahe): Don't use [templateUnspecified]. | 174 // TODO(ahe): Don't use [templateUnspecified]. |
| 180 return templateUnspecified.withArguments("$sb"); | 175 return templateUnspecified.withArguments("$sb"); |
| 181 } | 176 } |
| OLD | NEW |