blob: 59f3390b6e456eb2a5fe7ace084c307854339cd2 [file] [log] [blame]
// Copyright (c) 2016, 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 'package:_fe_analyzer_shared/src/scanner/token.dart';
import 'package:analyzer/src/dart/ast/ast.dart';
/// The instance of [AstFactoryImpl].
final AstFactoryImpl astFactory = AstFactoryImpl();
class AstFactoryImpl {
SimpleIdentifierImpl simpleIdentifier(Token token,
{bool isDeclaration = false}) {
if (isDeclaration) {
return DeclaredSimpleIdentifier(token);
}
return SimpleIdentifierImpl(token);
}
}