Skip to content

Commit

Permalink
dart formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rutvik110 committed Aug 31, 2024
1 parent 2c7713d commit 173ad31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 11 additions & 8 deletions web_generator/lib/src/translator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1223,9 +1223,12 @@ class Translator {

final jsObject = _typeReference(_RawType('JSObject', false));
const representationFieldName = '_';
final legacyNameSpace = extendedAttributes.firstWhereOrNull(
(extendedAttribute)=> extendedAttribute.name == 'LegacyNamespace',
)?.rhs.value;
final legacyNameSpace = extendedAttributes
.firstWhereOrNull(
(extendedAttribute) => extendedAttribute.name == 'LegacyNamespace',
)
?.rhs
.value;
final instanceProperties = <code.Method>[];
final staticProperties = <code.Method>[];
for (final property in _properties(properties, mdnInterface)) {
Expand All @@ -1234,12 +1237,12 @@ class Translator {
return code.ExtensionType((b) => b
..docs.addAll(docs)
..annotations.addAll(
_jsOverride(
legacyNameSpace != null
? '$legacyNameSpace.$jsName'
_jsOverride(
legacyNameSpace != null
? '$legacyNameSpace.$jsName'
: (isObjectLiteral || jsName == dartClassName ? '' : jsName),
),
)
),
)
..name = dartClassName
..primaryConstructorName = '_'
..representationDeclaration = code.RepresentationDeclaration((b) => b
Expand Down
6 changes: 2 additions & 4 deletions web_generator/lib/src/webidl_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ extension type Member._(JSObject _) implements JSObject {
extension type ExtendedAttribute._(JSObject _) implements JSObject {
external String get name;
external RHS get rhs;

}

extension type RHS._(JSObject _) implements JSObject {
external String get type;
external String get value;
external String get type;
external String get value;
}


extension type Argument._(JSObject _) implements JSObject {
external String get type;
@JS('default')
Expand Down

0 comments on commit 173ad31

Please sign in to comment.