Kaydet (Commit) e2112fac authored tarafından Enrico Tröger's avatar Enrico Tröger

Use Ruby parser from CTags SVN and add/fix symbol list sections.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2078 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst d7ceffc1
......@@ -12,6 +12,8 @@
Add line and column number in charset conversion error dialog when
saving a file and improve display of the failed character.
* src/build.c: Fix broken Run command on Java files on Windows.
* src/symbols.c, tagmanager/ruby.c:
Use Ruby parser from CTags SVN and add/fix symbol list sections.
2007-11-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -199,6 +199,7 @@ const gchar *symbols_get_context_separator(gint ft_id)
{
case GEANY_FILETYPES_C: // for C++ .h headers or C structs
case GEANY_FILETYPES_CPP:
//~ case GEANY_FILETYPES_RUBY: // not sure what to use atm
{
static gchar cc[] = "::";
......@@ -597,12 +598,10 @@ static void init_tag_list(gint idx)
case GEANY_FILETYPES_RUBY:
{
tag_list_add_groups(tag_store,
&(tv_iters.tag_namespace), _("Modules"), NULL,
&(tv_iters.tag_class), _("Classes"), "classviewer-class",
&(tv_iters.tag_member), _("Singletons"), NULL,
&(tv_iters.tag_macro), _("Mixins"), NULL,
&(tv_iters.tag_member), _("Singletons"), "classviewer-struct",
&(tv_iters.tag_function), _("Methods"), "classviewer-method",
&(tv_iters.tag_struct), _("Members"), "classviewer-member",
&(tv_iters.tag_variable), _("Variables"), "classviewer-var",
NULL);
//&(tv_iters.tag_namespace), _("Begin"),
//&(tv_iters.tag_other), _("Other"), NULL);
......
/*
* $Id$
* $Id: ruby.c 571 2007-06-24 23:32:14Z elliotth $
*
* Copyright (c) 2000-2001, Thaddeus Covert <sahuagin@mediaone.net>
* Copyright (c) 2002 Matthias Veit <matthias_veit@yahoo.de>
......@@ -37,8 +37,8 @@ typedef enum {
static kindOption RubyKinds [] = {
{ TRUE, 'c', "class", "classes" },
{ TRUE, 'f', "method", "methods" },
{ TRUE, 'm', "module", "modules" },
{ TRUE, 'F', "singleton method", "singleton methods" }
{ TRUE, 'm', "namespace", "modules" },
{ TRUE, 'F', "member", "singleton methods" }
};
static stringList* nesting = 0;
......@@ -346,7 +346,7 @@ static void findRubyTags (void)
while (*cp != '\0')
{
/* FIXME: we don't cope with here documents, or string literals,
/* FIXME: we don't cope with here documents,
* or regular expression literals, or ... you get the idea.
* Hopefully, the restriction above that insists on seeing
* definitions at the starts of lines should keep us out of
......@@ -372,7 +372,16 @@ static void findRubyTags (void)
{
/* Leave the most recent scope. */
vStringDelete (stringListLast (nesting));
stringListRemoveLast (nesting);
stringListRemoveLast (nesting);
}
else if (*cp == '"')
{
/* Skip string literals.
* FIXME: should cope with escapes and interpolation.
*/
do {
++cp;
} while (*cp != 0 && *cp != '"');
}
else if (*cp != '\0')
{
......@@ -387,7 +396,7 @@ static void findRubyTags (void)
extern parserDefinition* RubyParser (void)
{
static const char *const extensions [] = { "rb", "ruby", "rhtml", NULL };
static const char *const extensions [] = { "rb", "ruby", NULL };
parserDefinition* def = parserNew ("Ruby");
def->kinds = RubyKinds;
def->kindCount = KIND_COUNT (RubyKinds);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment