KoffeinFlummi / armake2

Successor to armake written in Rust
GNU General Public License v2.0
49 stars 17 forks source link

Macro trace #47

Open BrettMayson opened 5 years ago

BrettMayson commented 5 years ago

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