Determines whether macro is of the form: #define FOO FOO (Possibly with trailing tokens)
Macros of this form will not be translated.
fn isSelfDefinedMacro(t: *Translator, name: []const u8, macro: aro.Preprocessor.Macro) bool
fn isSelfDefinedMacro(t: *Translator, name: []const u8, macro: aro.Preprocessor.Macro) bool {
if (macro.is_func) return false;
if (macro.tokens.len < 1) return false;
const first_tok = macro.tokens[0];
const source = t.comp.getSource(macro.loc.id);
const slice = source.buf[first_tok.start..first_tok.end];
return std.mem.eql(u8, name, slice);
}