-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[🦩] Add ASTGen. #60943
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
[🦩] Add ASTGen. #60943
Conversation
Thanks @CodaFi for the initial code that this was built off of. |
98aa144
to
ca6d481
Compare
|
||
void *BridgedSourceLoc_advanced(void *loc, long len) { | ||
SourceLoc l = ((SourceLoc *)&loc)->getAdvancedLoc(len); | ||
return &l; // TODO: what? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SourceLoc
is just a pointer in a trench coat; you can return its opaque value.
} | ||
|
||
BridgedIdentifier | ||
SwiftASTContext_getIdentifier(void *ctx, const char *_Nullable str, long len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole file is mind-numbingly dull to write, but at least it's straightforward!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I wonder if we could write a python script that gets us 90% of the way there.
tools/driver/CMakeLists.txt
Outdated
@@ -49,9 +49,15 @@ add_swift_host_tool(swift-frontend | |||
) | |||
target_link_libraries(swift-frontend | |||
PUBLIC | |||
ASTGen | |||
swiftCore # TODO: how do we fix this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DougGregor any idea how to get the link paths for this?
I updated this to use your changes from #60888. Much cleaner :) |
@swift-ci please test. |
@swift-ci please test. |
@swift-ci please smoke test. |
|
||
void NominalTypeDecl_setMembers(void *decl, BridgedArrayRef members); | ||
|
||
struct DeclContextAndDecl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type really sucks :(
@swift-ci please smoke test |
@swift-ci please smoke test. |
@swift-ci please smoke test. |
@swift-ci please smoke test |
@swift-ci please smoke test |
@DougGregor pretty sure that resolved all the linker errors. I want to see the CI pass once, then I'll add the cmake option. |
Closing in favor of #61426 (review) |
Refs swiftlang/swift-syntax#703