+};
+/* not in universal-ctags */ +static TMParserMapEntry powershell_map[] = {
- {'f', tm_tag_function_t},
- {'v', tm_tag_variable_t},
+};
+typedef struct +{
- TMParserMapEntry *entries;
- guint size;
+} TMParserMap;
+#define MAP_ENTRY(map) {map, (sizeof(map)/sizeof(TMParserMapEntry))}
After posting the patch I realized it would be probably nicer instead of doing
``` MAP_ENTRY(c_map), /* C++ - same as C */ ```
to define
``` static TMParserMapEntry cpp_map[] = c_map; ```
and then just use MAP_ENTRY(cpp_map) in the parser_map definition. Could do the macro stuff you suggest too, just to me it usually takes more time to decode what macros with ## do than not using such features ;-).
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/957/files/aea7d7845917843dd6b02e5a8dc903...