| 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 | 4 |
| 5 library fasta.procedure_builder; | 5 library fasta.procedure_builder; |
| 6 | 6 |
| 7 // Note: we're deliberately using AsyncMarker and ProcedureKind from kernel | 7 // Note: we're deliberately using AsyncMarker and ProcedureKind from kernel |
| 8 // outside the kernel-specific builders. This is simpler than creating | 8 // outside the kernel-specific builders. This is simpler than creating |
| 9 // additional enums. | 9 // additional enums. |
| 10 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; | 10 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 final T returnType; | 28 final T returnType; |
| 29 | 29 |
| 30 final String name; | 30 final String name; |
| 31 | 31 |
| 32 final List<TypeVariableBuilder> typeVariables; | 32 final List<TypeVariableBuilder> typeVariables; |
| 33 | 33 |
| 34 final List<FormalParameterBuilder> formals; | 34 final List<FormalParameterBuilder> formals; |
| 35 | 35 |
| 36 ProcedureBuilder( | 36 ProcedureBuilder( |
| 37 String documentationComment, |
| 37 this.metadata, | 38 this.metadata, |
| 38 this.modifiers, | 39 this.modifiers, |
| 39 this.returnType, | 40 this.returnType, |
| 40 this.name, | 41 this.name, |
| 41 this.typeVariables, | 42 this.typeVariables, |
| 42 this.formals, | 43 this.formals, |
| 43 LibraryBuilder compilationUnit, | 44 LibraryBuilder compilationUnit, |
| 44 int charOffset) | 45 int charOffset) |
| 45 : super(compilationUnit, charOffset); | 46 : super(compilationUnit, charOffset, documentationComment); |
| 46 | 47 |
| 47 String get debugName => "ProcedureBuilder"; | 48 String get debugName => "ProcedureBuilder"; |
| 48 | 49 |
| 49 AsyncMarker get asyncModifier; | 50 AsyncMarker get asyncModifier; |
| 50 | 51 |
| 51 ProcedureKind get kind; | 52 ProcedureKind get kind; |
| 52 | 53 |
| 53 bool get isConstructor => false; | 54 bool get isConstructor => false; |
| 54 | 55 |
| 55 bool get isRegularMethod => identical(ProcedureKind.Method, kind); | 56 bool get isRegularMethod => identical(ProcedureKind.Method, kind); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return new Scope(local, null, parent, isModifiable: false); | 114 return new Scope(local, null, parent, isModifiable: false); |
| 114 } | 115 } |
| 115 | 116 |
| 116 FormalParameterBuilder getFormal(String name) { | 117 FormalParameterBuilder getFormal(String name) { |
| 117 for (FormalParameterBuilder formal in formals) { | 118 for (FormalParameterBuilder formal in formals) { |
| 118 if (formal.name == name) return formal; | 119 if (formal.name == name) return formal; |
| 119 } | 120 } |
| 120 return null; | 121 return null; |
| 121 } | 122 } |
| 122 } | 123 } |
| OLD | NEW |