OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library ddc.src.codegen.ast_builder; | 5 library dev_compiler.src.codegen.ast_builder; |
6 | 6 |
7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
8 import 'package:analyzer/src/generated/scanner.dart'; | 8 import 'package:analyzer/src/generated/scanner.dart'; |
9 import 'package:analyzer/src/generated/utilities_dart.dart'; | 9 import 'package:analyzer/src/generated/utilities_dart.dart'; |
10 import 'package:logging/logging.dart' as logger; | 10 import 'package:logging/logging.dart' as logger; |
11 | 11 |
12 final _log = new logger.Logger('ddc.ast_builder'); | 12 final _log = new logger.Logger('dev_compiler.ast_builder'); |
13 | 13 |
14 // Wrappers around constructors for the dart ast. The AstBuilder class | 14 // Wrappers around constructors for the dart ast. The AstBuilder class |
15 // provides a higher-level interface, abstracting both from the lexical | 15 // provides a higher-level interface, abstracting both from the lexical |
16 // details and some of helper classes. The RawAstBuilder class provides | 16 // details and some of helper classes. The RawAstBuilder class provides |
17 // a low-level wrapper class (below) abstracts from the lexical details | 17 // a low-level wrapper class (below) abstracts from the lexical details |
18 // but otherwise faithfully mirrors the construction API. | 18 // but otherwise faithfully mirrors the construction API. |
19 class AstBuilder { | 19 class AstBuilder { |
20 static SimpleIdentifier identifierFromString(String name) { | 20 static SimpleIdentifier identifierFromString(String name) { |
21 return RawAstBuilder.identifierFromString(name); | 21 return RawAstBuilder.identifierFromString(name); |
22 } | 22 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 382 |
383 static NamedExpression namedParameter(Identifier s, Expression e) { | 383 static NamedExpression namedParameter(Identifier s, Expression e) { |
384 return namedExpression(s, e); | 384 return namedExpression(s, e); |
385 } | 385 } |
386 | 386 |
387 static NamedExpression namedExpression(Identifier s, Expression e) { | 387 static NamedExpression namedExpression(Identifier s, Expression e) { |
388 Label l = new Label(s, new Token(TokenType.COLON, 0)); | 388 Label l = new Label(s, new Token(TokenType.COLON, 0)); |
389 return new NamedExpression(l, e); | 389 return new NamedExpression(l, e); |
390 } | 390 } |
391 } | 391 } |
OLD | NEW |