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

Improve parsing of Tcl files (parsing new Tcl8.6 style classes, methods and namespaces).

Patch by Witek Mozga, thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3900 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst f5295573
2009-06-28 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* tagmanager/tcl.c, src/symbol.c:
Improve parsing of Tcl files (parsing new Tcl8.6 style classes,
methods and namespaces).
Patch by Witek Mozga, thanks.
2009-06-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* data/ui_toolbar.xml, doc/geany.txt, doc/geany.html, src/ui_utils.c,
......
......@@ -717,6 +717,15 @@ static void add_top_level_items(GeanyDocument *doc)
break;
}
case GEANY_FILETYPES_TCL:
{
tag_list_add_groups(tag_store,
&(tv_iters.tag_namespace), _("Namespaces"), "classviewer-namespace",
&(tv_iters.tag_class), _("Classes"), "classviewer-class",
&(tv_iters.tag_member), _("Methods"), "classviewer-method",
&(tv_iters.tag_function), _("Procedures"), "classviewer-method",
NULL);
break;
}
case GEANY_FILETYPES_PYTHON:
{
tag_list_add_groups(tag_store,
......
......@@ -24,13 +24,14 @@
* DATA DEFINITIONS
*/
typedef enum {
K_CLASS, K_METHOD, K_PROCEDURE
K_CLASS, K_METHOD, K_PROCEDURE, K_MODULE
} tclKind;
static kindOption TclKinds [] = {
{ TRUE, 'c', "class", "classes" },
{ TRUE, 'm', "member", "methods" },
{ TRUE, 'p', "function", "procedures" }
{ TRUE, 'f', "member", "methods" },
{ TRUE, 'p', "function", "procedures" },
{ TRUE, 'm', "namespace", "modules" }
};
/*
......@@ -107,6 +108,29 @@ static void findTclTags (void)
cp = makeTclTag (cp, name, K_METHOD);
}
}
else if (match (line, "method"))
{
cp = makeTclTag (cp, name, K_METHOD);
}
else if (match (line, "oo::class") ) {
if (match (cp, "create"))
{
cp += 6;
while (isspace ((int) *cp))
++cp;
cp = makeTclTag (cp, name, K_CLASS);
}
}
else if (match (line, "namespace") ) {
if (match (cp, "eval"))
{
cp += 4;
while (isspace ((int) *cp))
++cp;
cp = makeTclTag (cp, name, K_MODULE);
}
}
}
vStringDelete (name);
}
......
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