keid-lang / keid

Central repository for the Keid programming language
0 stars 1 forks source link

Implement attribute types #48

Open lucasbaizer2 opened 1 year ago

lucasbaizer2 commented 1 year ago

Attribute (or annotation) types (e.g. @Override in Java or [System.Serializable] in C#). This is a fundamentally important part of reflection, which there will be a focus on in further issues.

Attributes need to have:

  1. The ability to take constant parameters, such as string and numerical literals, constant variables, function pointers, etc.
  2. The ability to determine the usage of an attribute using something akin to @RetentionPolicy in Java or [AttributeUsage] in C#.
  3. The ability to be accessible at compile-time, i.e. encoded in the kpkg format.
  4. The ability to be accessible at runtime using the reflection API.