mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-14 14:56:47 +00:00
![Argyrios Kyrtzidis](/assets/img/avatar_default.png)
Parsing of @implementations was based on modifying global state from the parser; the logic for late parsing of methods was spread in multiple places making it difficult to have a robust error recovery. -it was difficult to ensure that we don't neglect parsing the lexed methods. -it was difficult to setup the original objc container context for parsing the lexed methods after completing ParseObjCAtImplementationDeclaration and returning to top level context. Enhance parsing of @implementations by centralizing it in Parser::ParseObjCAtImplementationDeclaration(). ParseObjCAtImplementationDeclaration now returns only after an @implementation is fully parsed; all the data and logic for late parsing of methods is now in one place. This allows us to provide code-completion for late parsed methods with mis-matched braces. rdar://10775381 llvm-svn: 149987
20 lines
318 B
Objective-C
20 lines
318 B
Objective-C
@interface I
|
|
-(void)foo;
|
|
@end
|
|
|
|
struct S {
|
|
int x,y;
|
|
};
|
|
|
|
@implementation I
|
|
-(void) foo {
|
|
struct S s;
|
|
if (1) {
|
|
s.
|
|
}
|
|
@end
|
|
|
|
// RUN: c-index-test -code-completion-at=%s:13:7 -fobjc-nonfragile-abi %s | FileCheck %s
|
|
// CHECK: FieldDecl:{ResultType int}{TypedText x}
|
|
// CHECK: FieldDecl:{ResultType int}{TypedText y}
|