Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 07 Mar 2016 13:40:28 UTC Commit: 69d7a1aa673be1710fc9b728d23425e4b29b3b79 https://github.com/geany/geany/commit/69d7a1aa673be1710fc9b728d23425e4b29b3b...
Log Message: ----------- Merge pull request #941 from b4n/objc/uctags-update
Import Objective-C parser changes from universal-ctags
Modified Paths: -------------- tagmanager/ctags/objc.c tests/ctags/objectivec_property.mm.tags
Modified: tagmanager/ctags/objc.c 10 lines changed, 8 insertions(+), 2 deletions(-) =================================================================== @@ -51,7 +51,7 @@ typedef enum { static kindOption ObjcKinds[] = { {TRUE, 'i', "interface", "class interface"}, {TRUE, 'I', "implementation", "class implementation"}, - {TRUE, 'p', "protocol", "Protocol"}, + {TRUE, 'P', "protocol", "Protocol"}, {TRUE, 'm', "method", "Object's method"}, {TRUE, 'c', "class", "Class' method"}, {TRUE, 'v', "var", "Global variable"}, @@ -482,6 +482,10 @@ static void popEnclosingContext (void) static void addTag (vString * const ident, int kind) { tagEntryInfo toCreate; + + if (! ObjcKinds[kind].enabled) + return; + prepareTag (&toCreate, ident, kind); makeTagEntry (&toCreate); } @@ -565,7 +569,7 @@ static void parseFields (vString * const ident, objcToken what) } }
-objcKind methodKind; +static objcKind methodKind;
static vString *fullMethodName; @@ -702,6 +706,7 @@ static void parseProperty (vString * const ident, objcToken what) case Tok_semi: addTag (tempName, K_PROPERTY); vStringClear (tempName); + toDoNext = &parseMethods; break;
default: @@ -1117,6 +1122,7 @@ static void findObjcTags (void) (*toDoNext) (st.name, tok); tok = lex (&st); } + vStringDelete(st.name);
vStringDelete (name); vStringDelete (parentName);
Modified: tests/ctags/objectivec_property.mm.tags 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -1,4 +1,5 @@ # format=tagmanager Person�32�0 +initWithAge:�128�Person�0 m_age�8�Person�0 m_name�8�Person�0
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).