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

Side by Side Diff: pkg/analyzer/test/generated/parser_fasta_test.dart

Issue 2694703002: Update parser_fasta_test in pkg/analyzer. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:analyzer/dart/ast/ast.dart'; 5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/dart/element/element.dart'; 6 import 'package:analyzer/dart/element/element.dart';
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:front_end/src/fasta/analyzer/ast_builder.dart'; 8 import 'package:front_end/src/fasta/analyzer/ast_builder.dart';
9 import 'package:front_end/src/fasta/analyzer/element_store.dart'; 9 import 'package:front_end/src/fasta/analyzer/element_store.dart';
10 import 'package:front_end/src/fasta/builder/scope.dart'; 10 import 'package:front_end/src/fasta/builder/scope.dart';
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 326 }
327 327
328 /** 328 /**
329 * Proxy implementation of [KernelLibraryBuilderProxy] used by Fasta parser 329 * Proxy implementation of [KernelLibraryBuilderProxy] used by Fasta parser
330 * tests. 330 * tests.
331 */ 331 */
332 class KernelLibraryBuilderProxy implements KernelLibraryBuilder { 332 class KernelLibraryBuilderProxy implements KernelLibraryBuilder {
333 @override 333 @override
334 final uri = Uri.parse('file:///test.dart'); 334 final uri = Uri.parse('file:///test.dart');
335 335
336 @override
337 Uri get fileUri => uri;
338
336 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 339 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
337 } 340 }
338 341
339 /** 342 /**
340 * Proxy implementation of [Scope] used by Fasta parser tests. 343 * Proxy implementation of [Scope] used by Fasta parser tests.
341 * 344 *
342 * Any name lookup request is satisfied by creating an instance of 345 * Any name lookup request is satisfied by creating an instance of
343 * [BuilderProxy]. 346 * [BuilderProxy].
344 */ 347 */
345 class ScopeProxy implements Scope { 348 class ScopeProxy implements Scope {
346 final _locals = <String, Builder>{}; 349 final _locals = <String, Builder>{};
347 350
348 Builder lookup(String name) => 351 @override
352 Builder lookup(String name, int charOffset, Uri fileUri) =>
349 _locals.putIfAbsent(name, () => new BuilderProxy()); 353 _locals.putIfAbsent(name, () => new BuilderProxy());
350 354
351 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 355 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
352 } 356 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698