Branch: refs/heads/master Author: Ram Singla ram.singla@gmail.com Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 14 Mar 2016 14:18:14 UTC Commit: 2269c42dde2ea76228ee150cf0cc9796340877ac https://github.com/geany/geany/commit/2269c42dde2ea76228ee150cf0cc9796340877...
Log Message: ----------- RSpec Code added. Courtesy: mortice
Modified Paths: -------------- tagmanager/ctags/ruby.c
Modified: tagmanager/ctags/ruby.c 28 lines changed, 25 insertions(+), 3 deletions(-) =================================================================== @@ -26,7 +26,7 @@ * DATA DECLARATIONS */ typedef enum { - K_UNDEFINED = -1, K_CLASS, K_METHOD, K_MODULE, K_SINGLETON + K_UNDEFINED = -1, K_CLASS, K_METHOD, K_MODULE, K_SINGLETON, K_DESCRIBE, K_CONTEXT } rubyKind;
/* @@ -36,7 +36,9 @@ static kindOption RubyKinds [] = { { TRUE, 'c', "class", "classes" }, { TRUE, 'f', "method", "methods" }, { TRUE, 'm', "namespace", "modules" }, - { TRUE, 'F', "member", "singleton methods" } + { TRUE, 'F', "member", "singleton methods" }, + { TRUE, 'd', "describe", "describes" }, + { TRUE, 'C', "context", "contexts" } };
static stringList* nesting = 0; @@ -178,7 +180,19 @@ static rubyKind parseIdentifier ( * point or equals sign. These are all part of the name. * A method name may also contain a period if it's a singleton method. */ - const char* also_ok = (kind == K_METHOD) ? "_.?!=" : "_"; + const char* also_ok; + if (kind == K_METHOD) + { + also_ok = "_.?!="; + } + else if (kind == K_DESCRIBE || kind == K_CONTEXT) + { + also_ok = " ,".#_?!='/-"; + } + else + { + also_ok = "_"; + }
skipWhitespace (cp);
@@ -349,6 +363,14 @@ static void findRubyTags (void) { readAndEmitTag (&cp, K_METHOD); } + else if (canMatch (&cp, "describe")) + { + readAndEmitTag (&cp, K_DESCRIBE); + } + else if (canMatch (&cp, "context")) + { + readAndEmitTag (&cp, K_CONTEXT); + }
while (*cp != '\0') {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).