armake2 icon indicating copy to clipboard operation
armake2 copied to clipboard

Macro trace

Open BrettMayson opened this issue 5 years ago • 0 comments

Let's say you have something like greeting.hpp

#define HELLO(name) Hello name

shortcuts.hpp

#define HI_BRETT_KOFFEIN \
HELLO(Brett) \
HELLO(Koffein)

#define HI_JONPAS HELLO(jonpas)

config.hpp

class greetings {
  text[] = {HI_BRETT_KOFFEIN, HI_JONPAS};
}

That would give a String value "Hello Brett" is not quoted properly warning and point to line 2 of config.hpp. It would be nice if there could be a tree showing the macros. Ideally something like this

config.hpp:2
	HI_BRETT_KOFFEIN shortcuts.hpp:1
		HELLO(Brett) shortcuts.hpp:2
			HELLO greeting.hpp:1
		HELLO(Koffein) shortcuts.hpp:3
			HELLO greeting.hpp:1
	HI_JONPAS shortcuts.hpp:5
		HELLO(jonpas) shortcuts.hpp:5
			HELLO greeting.hpp:1

BrettMayson avatar Jun 25 '19 13:06 BrettMayson