blob: edc3835d40403bb489c17ce5d3b32d5fcdcee1c3 [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 '../builder/declaration.dart';
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 BuilderImpl {
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;