Attributes.cs 511 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace NTERA.Engine
  3. {
  4. [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
  5. public class LexerCharacterAttribute : Attribute
  6. {
  7. public char Character { get; }
  8. public LexerCharacterAttribute(char character)
  9. {
  10. Character = character;
  11. }
  12. }
  13. [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
  14. public class LexerKeywordAttribute : Attribute
  15. {
  16. public string Keyword { get; }
  17. public LexerKeywordAttribute(string keyword)
  18. {
  19. Keyword = keyword;
  20. }
  21. }
  22. }