blob: df16b061f0661e42e78d7d0175c44a9b2c14216c [file] [log] [blame]
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'kernel_builder.dart' show Builder, Scope;
/// Scope that returns an [UnlinkedDeclaration] if a name can't be resolved.
/// This is intended to be used as the `enclosingScope` in `BodyBuilder` to
/// create ASTs with building outlines.
class UnlinkedScope extends Scope {
UnlinkedScope() : false);
Builder lookupIn(String name, int charOffset, Uri fileUri,
Map<String, Builder> map, bool isInstanceScope) {
return new UnlinkedDeclaration(name, isInstanceScope, charOffset, fileUri);
class UnlinkedDeclaration extends Builder {
final String name;
final bool isInstanceScope;
final int charOffset;
final Uri fileUri;
UnlinkedDeclaration(, this.isInstanceScope, this.charOffset, this.fileUri);
Builder get parent => null;
String get fullNameForErrors => name;