OLD | NEW |
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/ast/token.dart' as analyzer; | 6 import 'package:analyzer/dart/ast/token.dart' as analyzer; |
7 import 'package:analyzer/dart/element/element.dart'; | 7 import 'package:analyzer/dart/element/element.dart'; |
8 import 'package:analyzer/error/error.dart'; | 8 import 'package:analyzer/error/error.dart'; |
9 import 'package:analyzer/src/fasta/ast_builder.dart'; | 9 import 'package:analyzer/src/fasta/ast_builder.dart'; |
10 import 'package:analyzer/src/fasta/element_store.dart'; | 10 import 'package:analyzer/src/fasta/element_store.dart'; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 /** | 823 /** |
824 * Proxy implementation of [Scope] used by Fasta parser tests. | 824 * Proxy implementation of [Scope] used by Fasta parser tests. |
825 * | 825 * |
826 * Any name lookup request is satisfied by creating an instance of | 826 * Any name lookup request is satisfied by creating an instance of |
827 * [BuilderProxy]. | 827 * [BuilderProxy]. |
828 */ | 828 */ |
829 class ScopeProxy implements Scope { | 829 class ScopeProxy implements Scope { |
830 final _locals = <String, Builder>{}; | 830 final _locals = <String, Builder>{}; |
831 | 831 |
832 @override | 832 @override |
833 void operator []=(String name, Builder member) { | 833 declare(String name, Builder builder, int charOffset, Uri fileUri) { |
834 _locals[name] = member; | 834 _locals[name] = builder; |
| 835 return null; |
835 } | 836 } |
836 | 837 |
837 @override | 838 @override |
838 Scope createNestedScope({bool isModifiable: true}) { | 839 Scope createNestedScope({bool isModifiable: true}) { |
839 return new Scope.nested(this, isModifiable: isModifiable); | 840 return new Scope.nested(this, isModifiable: isModifiable); |
840 } | 841 } |
841 | 842 |
842 @override | 843 @override |
843 Builder lookup(String name, int charOffset, Uri fileUri, | 844 Builder lookup(String name, int charOffset, Uri fileUri, |
844 {bool isInstanceScope: true}) => | 845 {bool isInstanceScope: true}) => |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 } | 954 } |
954 | 955 |
955 @override | 956 @override |
956 @failingTest | 957 @failingTest |
957 void test_parsePartOfDirective_uri() { | 958 void test_parsePartOfDirective_uri() { |
958 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by | 959 // TODO(paulberry,ahe): URIs in "part of" declarations are not supported by |
959 // Fasta. | 960 // Fasta. |
960 super.test_parsePartOfDirective_uri(); | 961 super.test_parsePartOfDirective_uri(); |
961 } | 962 } |
962 } | 963 } |
OLD | NEW |