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

Side by Side Diff: pkg/analyzer/lib/src/task/html.dart

Issue 1831133005: Consolidate duplicate code for resloving URIs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Sort Created 4 years, 9 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 library analyzer.src.task.html; 5 library analyzer.src.task.html;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/dart/scanner/scanner.dart'; 10 import 'package:analyzer/src/dart/scanner/scanner.dart';
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 @override 82 @override
83 Uri get uri => throw new StateError('uri not supported for scripts'); 83 Uri get uri => throw new StateError('uri not supported for scripts');
84 84
85 @override 85 @override
86 UriKind get uriKind => 86 UriKind get uriKind =>
87 throw new StateError('uriKind not supported for scripts'); 87 throw new StateError('uriKind not supported for scripts');
88 88
89 @override 89 @override
90 bool exists() => source.exists(); 90 bool exists() => source.exists();
91
92 @override
93 Uri resolveRelativeUri(Uri relativeUri) =>
94 throw new StateError('resolveRelativeUri not supported for scripts');
95 } 91 }
96 92
97 /** 93 /**
98 * A task that looks for Dart scripts in an HTML file and computes both the Dart 94 * A task that looks for Dart scripts in an HTML file and computes both the Dart
99 * libraries that are referenced by those scripts and the embedded Dart scripts. 95 * libraries that are referenced by those scripts and the embedded Dart scripts.
100 */ 96 */
101 class DartScriptsTask extends SourceBasedAnalysisTask { 97 class DartScriptsTask extends SourceBasedAnalysisTask {
102 /** 98 /**
103 * The name of the [HTML_DOCUMENT] input. 99 * The name of the [HTML_DOCUMENT] input.
104 */ 100 */
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 * The content of the fragment. 402 * The content of the fragment.
407 */ 403 */
408 final String content; 404 final String content;
409 405
410 /** 406 /**
411 * Initialize a newly created script fragment to have the given [offset] and 407 * Initialize a newly created script fragment to have the given [offset] and
412 * [content]. 408 * [content].
413 */ 409 */
414 ScriptFragment(this.offset, this.line, this.column, this.content); 410 ScriptFragment(this.offset, this.line, this.column, this.content);
415 } 411 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698