OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.analyzer.loader; | 4 library kernel.analyzer.loader; |
5 | 5 |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'dart:convert'; | 7 import 'dart:convert'; |
8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
9 | 9 |
10 import 'package:analyzer/analyzer.dart'; | 10 import 'package:analyzer/analyzer.dart'; |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 isAbstract: false, | 519 isAbstract: false, |
520 isStatic: true, | 520 isStatic: true, |
521 isExternal: constructor.isExternal, | 521 isExternal: constructor.isExternal, |
522 isConst: constructor.isConst, | 522 isConst: constructor.isConst, |
523 fileUri: '${element.source.uri}') | 523 fileUri: '${element.source.uri}') |
524 ..fileOffset = element.nameOffset; | 524 ..fileOffset = element.nameOffset; |
525 } | 525 } |
526 return new ast.Constructor(scope.buildFunctionInterface(constructor), | 526 return new ast.Constructor(scope.buildFunctionInterface(constructor), |
527 name: _nameOfMember(element), | 527 name: _nameOfMember(element), |
528 isConst: constructor.isConst, | 528 isConst: constructor.isConst, |
529 isExternal: constructor.isExternal) | 529 isExternal: constructor.isExternal, |
| 530 isSyntheticDefault: constructor.isSynthetic) |
530 ..fileOffset = element.nameOffset; | 531 ..fileOffset = element.nameOffset; |
531 | 532 |
532 case ElementKind.FIELD: | 533 case ElementKind.FIELD: |
533 case ElementKind.TOP_LEVEL_VARIABLE: | 534 case ElementKind.TOP_LEVEL_VARIABLE: |
534 VariableElement variable = element; | 535 VariableElement variable = element; |
535 return new ast.Field(_nameOfMember(variable), | 536 return new ast.Field(_nameOfMember(variable), |
536 isStatic: variable.isStatic, | 537 isStatic: variable.isStatic, |
537 isFinal: variable.isFinal, | 538 isFinal: variable.isFinal, |
538 isConst: variable.isConst, | 539 isConst: variable.isConst, |
539 type: scope.buildType(variable.type), | 540 type: scope.buildType(variable.type), |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 AnalysisContext context = AnalysisEngine.instance.createAnalysisContext() | 1003 AnalysisContext context = AnalysisEngine.instance.createAnalysisContext() |
1003 ..sourceFactory = new SourceFactory(resolvers) | 1004 ..sourceFactory = new SourceFactory(resolvers) |
1004 ..analysisOptions = createAnalysisOptions(options.strongMode); | 1005 ..analysisOptions = createAnalysisOptions(options.strongMode); |
1005 | 1006 |
1006 options.declaredVariables.forEach((String name, String value) { | 1007 options.declaredVariables.forEach((String name, String value) { |
1007 context.declaredVariables.define(name, value); | 1008 context.declaredVariables.define(name, value); |
1008 }); | 1009 }); |
1009 | 1010 |
1010 return context; | 1011 return context; |
1011 } | 1012 } |
OLD | NEW |