[Github-comments] [geany/geany] C parser breaks with multi-line comment in macro (#2349)

Nick Treleaven notifications at xxxxx
Wed Oct 9 16:50:29 UTC 2019


The multi-line comment within a macro means that `int y` (and all code following it) doesn't get parsed by ctags:
```c
int x;

	#define CHANGE_TREE(new_child) \
		G_STMT_START { \
			/* only change the tag tree if it's actually not the same (to avoid flickering) and if
			 * it's the one of the current document (to avoid problems when e.g. reloading
			 * configuration files */ \
			if (child != new_child && doc == document_get_current()) \
			{ \
				if (child) \
					gtk_container_remove(GTK_CONTAINER(tag_window), child); \
				gtk_container_add(GTK_CONTAINER(tag_window), new_child); \
			} \
		} G_STMT_END

int y;
```
Removing the comment restores parsing. The macro is actually from Geany's sidebar.c, but #2345 gets rid of it.

-- 
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/issues/2349
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20191009/c9bfa8b4/attachment-0001.html>


More information about the Github-comments mailing list