-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for global functions and variables (#1610)
- Loading branch information
1 parent
6595118
commit f723a58
Showing
26 changed files
with
561 additions
and
229 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
pkgs/swift2objc/lib/src/ast/_core/interfaces/compound_memeber.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
/// An interface to describe a Swift entity's compound membership | ||
abstract interface class CompoundMemeber { | ||
abstract final bool isStatic; | ||
} |
15 changes: 15 additions & 0 deletions
15
pkgs/swift2objc/lib/src/ast/_core/interfaces/function_declaration.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import '../shared/referred_type.dart'; | ||
import 'declaration.dart'; | ||
import 'executable.dart'; | ||
import 'parameterizable.dart'; | ||
import 'type_parameterizable.dart'; | ||
|
||
/// Describes a function-like entity. | ||
abstract interface class FunctionDeclaration | ||
implements Declaration, Parameterizable, Executable, TypeParameterizable { | ||
abstract final ReferredType? returnType; | ||
} |
12 changes: 12 additions & 0 deletions
12
pkgs/swift2objc/lib/src/ast/_core/interfaces/variable_declaration.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import '../shared/referred_type.dart'; | ||
import 'declaration.dart'; | ||
|
||
/// Describes a variable-like entity. | ||
abstract interface class VariableDeclaration implements Declaration { | ||
abstract final bool isConstant; | ||
abstract final ReferredType type; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.