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

Side by Side Diff: pkg/docgen/lib/src/models/model_helpers.dart

Issue 1166723002: Add StringLengthConstantExpression (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update .fromEnvironment test expectations. Created 5 years, 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 docgen.model_helpers; 5 library docgen.model_helpers;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:compiler/src/constants/expressions.dart'; 9 import 'package:compiler/src/constants/expressions.dart';
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 @override 224 @override
225 Annotation visitStringFromEnvironment( 225 Annotation visitStringFromEnvironment(
226 StringFromEnvironmentConstantExpression exp, 226 StringFromEnvironmentConstantExpression exp,
227 AnnotationInfo context) { 227 AnnotationInfo context) {
228 return null; 228 return null;
229 } 229 }
230 230
231 @override 231 @override
232 Annotation visitStringLength(StringLengthConstantExpression exp,
233 AnnotationInfo context) {
234 return null;
235 }
236
237 @override
232 Annotation visitDeferred(DeferredConstantExpression exp, 238 Annotation visitDeferred(DeferredConstantExpression exp,
233 AnnotationInfo context) { 239 AnnotationInfo context) {
234 return exp.expression.accept(this, context); 240 return exp.expression.accept(this, context);
235 } 241 }
236 } 242 }
237 243
238 /// A declaration is private if itself is private, or the owner is private. 244 /// A declaration is private if itself is private, or the owner is private.
239 bool isHidden(DeclarationSourceMirror mirror) { 245 bool isHidden(DeclarationSourceMirror mirror) {
240 if (mirror is LibraryMirror) { 246 if (mirror is LibraryMirror) {
241 return _isLibraryPrivate(mirror); 247 return _isLibraryPrivate(mirror);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // the time. 434 // the time.
429 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)]; 435 var sdkLibrary = LIBRARIES[dart2js_util.nameOf(mirror)];
430 if (sdkLibrary != null) { 436 if (sdkLibrary != null) {
431 return !sdkLibrary.documented; 437 return !sdkLibrary.documented;
432 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf( 438 } else if (dart2js_util.nameOf(mirror).startsWith('_') || dart2js_util.nameOf(
433 mirror).contains('._')) { 439 mirror).contains('._')) {
434 return true; 440 return true;
435 } 441 }
436 return false; 442 return false;
437 } 443 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/constants/expressions.dart ('k') | tests/compiler/dart2js/constant_expression_evaluate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698