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

[WIP] Typed declarations. #112

Closed
wants to merge 2 commits into from

Conversation

paulyoung
Copy link
Contributor

This relates to #87.

I've added FIXMEs where I ran into hurdles that didn't have an easy immediate fix (or I wasn't sure what to do) just to get something started.


public struct ObjCDeclaration: DeclarationType {
public let language: Language = .Swift
public let kind: ObjCDeclarationKind? // FIXME: Type 'ObjCDeclaration' does not conform to protocol 'DeclarationType'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because the expected type here DeclarationKindType.

let end = SourceLocation.init(file: file, line: line, column: column, offset: parsedScopeEnd)
extent = (start: start, end: end)
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not entirely sure that this is the right thing to do here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW .map(UInt32.init) didn't work here ¯_(ツ)_/¯

@paulyoung
Copy link
Contributor Author

@jpsim any more thoughts on this since we last spoke? Would love to keep moving forward if we can.

@jpsim
Copy link
Owner

jpsim commented Dec 8, 2015

@jpsim any more thoughts on this since we last spoke? Would love to keep moving forward if we can.

Yes, sorry for the delay. What about our conversation about having a single Declaration type with a language switch property?

@paulyoung
Copy link
Contributor Author

I'll try something to that effect later tonight.

@paulyoung
Copy link
Contributor Author

I took a shot at this in paulyoung#2.

@paulyoung paulyoung mentioned this pull request Aug 22, 2016
@eugeneego eugeneego mentioned this pull request May 1, 2017
@jpsim
Copy link
Owner

jpsim commented Nov 10, 2017

We'll probably never revive this as-is, closing. #428 shows promise though and is along these lines.

Thanks anyway Paul!

@jpsim jpsim closed this Nov 10, 2017
SteffenL pushed a commit to SteffenL/SourceKitten that referenced this pull request Feb 13, 2019
- no more <<error type>> or default
- closes jpsim#65 and jpsim#112
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.

2 participants