Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23899] Add support for open access level keyword #163

Merged
merged 1 commit into from May 3, 2017

Conversation

janvennemann
Copy link
Contributor

@@ -201,6 +201,7 @@ function generateSwiftMetabase (buildDir, sdk, sdkPath, iosMinVersion, xcodeTarg
componentRE = /component id='(.*)'/,
patternNamedRE = /pattern_named type='(\w+)' '(\w+)'/,
typeRE = /type='(\w+)'/,
publicAccessPattern = /access=(public|open)/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about other accessors? Swift has some unique ones like fileprivate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other access levels are restricted in a certain way and cannot be used from any code that is written in Hyperloop so they can be safely ignored.

@@ -229,7 +230,7 @@ function generateSwiftMetabase (buildDir, sdk, sdkPath, iosMinVersion, xcodeTarg
language: 'swift'
};
tok.slice(2).forEach(function (t, i) {
if (t.indexOf('access=public') === 0) {
if (publicAccessPattern.test(t)) {
classdef.public = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An open class is not a public class. Not sure if setting those flags is generic enough to deal with Swift properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but the way we use this flag is to determine if a entity can be accessed via Hyperloop and in that case, it doesn't matter if it is public or open. I tried to make as little changes as possible considering we have a huge Swift overhaul coming anyway.

@hansemannn hansemannn merged commit d58f49e into tidev:master May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants