For "macro" I mean, the directive #define (of C), or the $IFDEF (of Pascal). I don't know if they have another name. I see it's called "fDirecAttri" in the C++ highlighter.
I would not use MACRO for #define, because there also are others (#include). In C they are called preprocessor directives. In Pascal there is no preprocessor, so they are just directives.
I realize that many highlighters redefine the properties:
property CommentAttribute:
property IdentifierAttribute:
...
and add some more, especially "NumberAttribute".
I think they should, use the propertys defined on "TSynCustomHighlighter", instead of re-declare their own (that is what I do), and grow innecesary. But for do that, we need more constants, like SYN_ATTR_NUMBER (and his property of course). FAIK, it will be more efficient.
Ok, so you do not just want to add the constants, but also add the properties.
As for growing:
adding
property StringAttri: TSynHighlighterAttributes read fStringAttri;
produces less code and data, than having to add code to "GetDefaultAttribute"
Yet adding a property "DirectiveAttribute" to the base class (even if not published, and not visible in ObjectInspector) makes this property present and accessible in all classes, even if they do not use it. It will also show in code-completion, which is not desirable.
Besides, that this is not about saving a few bytes. This must be about design. If there was a good reason to be able to iterate all highlighter classes, and ask each of them for a certain attribute, then this makes sense. But for that you do NOT need the property. You only need the constant and access to "GetDefaultAttribute" (ok, it is protected so that would be an issue).
Actually for that there is
property AttrCount: integer read GetAttribCount;
property Attribute[idx: integer]: TSynHighlighterAttributes read GetAttribute;
and you can check Attr.Name = SYNS_AttrNumber / not as nice as having a number.....
------------
Anyway the conclusion is, we can talk about ways to iterate attributes, or ask for specific types by the use of ONE single function like "GetDefaultAttribute"
But I do not think, that it is a good idea to add further attibute properties to the base class (as far as I go, I would rather remove them, but don't worry, I wont, as it would break compatibility)