Update VHDL parser to display blocks in the symbols list

This commit is contained in:
Miguel Sánchez de León Peque 2012-09-02 19:12:42 +02:00 committed by Colomban Wendling
parent 66b93d2d8d
commit e469aa27e0
2 changed files with 6 additions and 3 deletions

View File

@ -855,7 +855,7 @@ static void add_top_level_items(GeanyDocument *doc)
&(tv_iters.tag_type), _("Types"), "classviewer-other",
&(tv_iters.tag_function), _("Functions / Procedures"), "classviewer-method",
&(tv_iters.tag_variable), _("Variables / Signals"), "classviewer-var",
&(tv_iters.tag_member), _("Processes / Components"), "classviewer-member",
&(tv_iters.tag_member), _("Processes / Blocks / Components"), "classviewer-member",
&(tv_iters.tag_other), _("Other"), "classviewer-other",
NULL);
break;

View File

@ -44,6 +44,7 @@ typedef enum {
K_ENTITY,
K_ARCHITECTURE,
K_PORT,
K_BLOCK,
K_ALIAS
} vhdlKind;
@ -77,6 +78,7 @@ static kindOption VhdlKinds [] = {
{ TRUE, 'n', "class", "entity" },
{ TRUE, 'o', "struct", "architecture" },
{ TRUE, 'u', "port", "ports" },
{ TRUE, 'b', "member", "blocks" },
{ TRUE, 'v', "typedef", "alias" }
};
@ -96,6 +98,7 @@ static keywordAssoc VhdlKeywordTable [] = {
{ "inout", K_PORT },
{ "in", K_PORT },
{ "out", K_PORT },
{ "block", K_BLOCK },
{ "alias", K_ALIAS }
};
@ -210,7 +213,7 @@ static void findTag (vString *const name)
vStringCopyToLower (Keyword, name);
lookupKeyword (vStringValue (Keyword), Lang_vhdl);
kind = (vhdlKind)lookupKeyword (vStringValue (Keyword), Lang_vhdl);
if (kind == K_PROCESS || kind == K_PORT)
if (kind == K_PROCESS || kind == K_BLOCK || kind == K_PORT)
{
makeSimpleTag (Lastname, VhdlKinds, kind);
}
@ -233,7 +236,7 @@ static void findTag (vString *const name)
c = vGetc ();
}
}
else if (kind == K_PROCESS) {
else if (kind == K_PROCESS || kind == K_BLOCK) {
vStringCopyS(TagName,"unnamed");
makeSimpleTag (TagName, VhdlKinds, kind);
} else {