[Github-comments] [geany/geany] Add ADA ctags parser (PR #3166)

elextr notifications at github.com
Tue Apr 19 01:08:02 UTC 2022


@elextr commented on this pull request.

I have run out of time to look at the mapping of the more esoteric Ada tag types, need to RTFC to see what they actually mean.

> @@ -942,6 +942,43 @@ static TMParserMapGroup group_GDSCRIPT[] = {
 	{_("Other"), TM_ICON_OTHER, tm_tag_other_t},
 };
 
+static TMParserMapEntry map_ADA[] = {
+	{'P', tm_tag_package_t},     // packspec
+	{'p', tm_tag_package_t},     // package
+	{'T', tm_tag_typedef_t},     // typespec
+	{'t', tm_tag_typedef_t},     // type
+	{'U', tm_tag_undef_t},       // subspec

Both `U` and `u` are just another way of defining a type, I would have made them `typedef`

> @@ -942,6 +942,43 @@ static TMParserMapGroup group_GDSCRIPT[] = {
 	{_("Other"), TM_ICON_OTHER, tm_tag_other_t},
 };
 
+static TMParserMapEntry map_ADA[] = {
+	{'P', tm_tag_package_t},     // packspec
+	{'p', tm_tag_package_t},     // package
+	{'T', tm_tag_typedef_t},     // typespec
+	{'t', tm_tag_typedef_t},     // type
+	{'U', tm_tag_undef_t},       // subspec
+	{'u', tm_tag_undef_t},       // subtype
+	{'c', tm_tag_member_t},      // component
+	{'l', tm_tag_enumerator_t},  // literal
+	{'V', tm_tag_variable_t},    // varspec
+	{'v', tm_tag_variable_t},    // variable
+	{'f', tm_tag_undef_t},       // formal

Its time tagmanager got to know more kinds, the `z` kind (template parameter) in the new cxx parser is also mapped to undefined.  Would be good if parameter names and generic/template parameters were available to autocomplete, although that then needs scope to avoid overloading the autocompletes.  But the use of folds as an initial scope as Geany does for the status bar scope would be a good start.

> @@ -942,6 +942,43 @@ static TMParserMapGroup group_GDSCRIPT[] = {
 	{_("Other"), TM_ICON_OTHER, tm_tag_other_t},
 };
 
+static TMParserMapEntry map_ADA[] = {
+	{'P', tm_tag_package_t},     // packspec
+	{'p', tm_tag_package_t},     // package
+	{'T', tm_tag_typedef_t},     // typespec
+	{'t', tm_tag_typedef_t},     // type
+	{'U', tm_tag_undef_t},       // subspec
+	{'u', tm_tag_undef_t},       // subtype
+	{'c', tm_tag_member_t},      // component
+	{'l', tm_tag_enumerator_t},  // literal
+	{'V', tm_tag_variable_t},    // varspec
+	{'v', tm_tag_variable_t},    // variable
+	{'f', tm_tag_undef_t},       // formal
+	{'n', tm_tag_macro_t},       // constant
+	{'x', tm_tag_undef_t},       // exception
+	{'R', tm_tag_function_t},    // subprogspec

I would have mapped this to `tm_tag_prototype_t`, thats effectively what it is.

> +	{'P', tm_tag_package_t},     // packspec
+	{'p', tm_tag_package_t},     // package
+	{'T', tm_tag_typedef_t},     // typespec
+	{'t', tm_tag_typedef_t},     // type
+	{'U', tm_tag_undef_t},       // subspec
+	{'u', tm_tag_undef_t},       // subtype
+	{'c', tm_tag_member_t},      // component
+	{'l', tm_tag_enumerator_t},  // literal
+	{'V', tm_tag_variable_t},    // varspec
+	{'v', tm_tag_variable_t},    // variable
+	{'f', tm_tag_undef_t},       // formal
+	{'n', tm_tag_macro_t},       // constant
+	{'x', tm_tag_undef_t},       // exception
+	{'R', tm_tag_function_t},    // subprogspec
+	{'r', tm_tag_function_t},    // subprogram
+	{'K', tm_tag_method_t},      // taskspec

If a task is called a "method" (which is fine its a function running in a new thread) then a taskspec is probably a prototype maybe (unsure sounding tone of voice).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3166#pullrequestreview-944936030
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3166/review/944936030 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220418/4e477e05/attachment.htm>


More information about the Github-comments mailing list