rand dart fix
This commit is contained in:
@@ -25,10 +25,10 @@ extension ClauseDeclarationImplUtils on ClassDeclarationImpl {
|
||||
comments.add(item.toDartComment());
|
||||
}
|
||||
return base.copyWith(
|
||||
isAbstract: this?.abstractKeyword != null,
|
||||
extendsClause: this?.extendsClause?.toString(),
|
||||
implementsClause: this?.implementsClause?.toString(),
|
||||
withClause: this?.withClause?.toString(),
|
||||
isAbstract: this.abstractKeyword != null,
|
||||
extendsClause: this.extendsClause?.toString(),
|
||||
implementsClause: this.implementsClause?.toString(),
|
||||
withClause: this.withClause?.toString(),
|
||||
fields: fields,
|
||||
constructors: constructors,
|
||||
methods: methods,
|
||||
|
||||
@@ -51,12 +51,11 @@ extension DefaultFormalParameterImplUtils on DefaultFormalParameterImpl {
|
||||
base = base.copyWith(name: child.toString());
|
||||
}
|
||||
}
|
||||
if (fields != null)
|
||||
for (final field in fields) {
|
||||
if (field.name == base.name) {
|
||||
base = base.copyWith(type: field.type);
|
||||
}
|
||||
for (final field in fields) {
|
||||
if (field.name == base.name) {
|
||||
base = base.copyWith(type: field.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (node.runtimeType.toString() == 'SimpleToken' &&
|
||||
node.toString() == '=') {
|
||||
|
||||
@@ -38,22 +38,22 @@ class GenParser {
|
||||
|
||||
void merge(String source) {
|
||||
final DartResult result = parseSource(source);
|
||||
if (result?.file != null) {
|
||||
if (result?.file?.classes != null) {
|
||||
if (result.file != null) {
|
||||
if (result.file?.classes != null) {
|
||||
for (final item in result.file.classes) {
|
||||
this._classes.putIfAbsent(item.name, () => item);
|
||||
}
|
||||
}
|
||||
if (result?.file?.enums != null) {
|
||||
if (result.file?.enums != null) {
|
||||
this._enums.addAll(result.file.enums);
|
||||
}
|
||||
if (result?.file?.fields != null) {
|
||||
if (result.file?.fields != null) {
|
||||
this._fields.addAll(result.file.fields);
|
||||
}
|
||||
if (result?.file?.methods != null) {
|
||||
if (result.file?.methods != null) {
|
||||
this._methods.addAll(result.file.methods);
|
||||
}
|
||||
if (result?.file?.imports != null) {
|
||||
if (result.file?.imports != null) {
|
||||
this._imports.addAll(result.file.imports);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user