Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: lib/src/utils.dart

Issue 1644823002: Remove library tags, they aren't needed (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Holds a couple utility functions used at various places in the system. 5 /// Holds a couple utility functions used at various places in the system.
6 library dev_compiler.src.utils;
7 6
8 import 'dart:io'; 7 import 'dart:io';
9 8
10 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
11 import 'package:analyzer/src/generated/ast.dart' 10 import 'package:analyzer/src/generated/ast.dart'
12 show 11 show
13 ImportDirective, 12 ImportDirective,
14 ExportDirective, 13 ExportDirective,
15 PartDirective, 14 PartDirective,
16 CompilationUnit, 15 CompilationUnit,
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 '(expected one of ${enumValues.map(getEnumName)})')); 441 '(expected one of ${enumValues.map(getEnumName)})'));
443 442
444 /// Gets the "simple" name of an enum value. 443 /// Gets the "simple" name of an enum value.
445 getEnumName(v) { 444 getEnumName(v) {
446 var parts = '$v'.split('.'); 445 var parts = '$v'.split('.');
447 if (parts.length != 2 || !parts.every((p) => p.isNotEmpty)) { 446 if (parts.length != 2 || !parts.every((p) => p.isNotEmpty)) {
448 throw new ArgumentError('Invalid enum value: $v'); 447 throw new ArgumentError('Invalid enum value: $v');
449 } 448 }
450 return parts[1]; 449 return parts[1];
451 } 450 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698