1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- namespace NTERA.Interpreter
- {
- [AttributeUsage(AttributeTargets.Field)]
- public class LexerCharacterAttribute : Attribute
- {
- public char Character { get; }
- public LexerCharacterAttribute(char character)
- {
- Character = character;
- }
- }
- [AttributeUsage(AttributeTargets.Field)]
- public class LexerKeywordAttribute : Attribute
- {
- public string Keyword { get; }
- public bool IsLineKeyword { get; }
- public LexerKeywordAttribute(string keyword, bool isLineKeyword = false)
- {
- Keyword = keyword;
- IsLineKeyword = isLineKeyword;
- }
- }
- [AttributeUsage(AttributeTargets.Method)]
- public class KeywordMethodAttribute : Attribute
- {
- public Token Token { get; }
- public KeywordMethodAttribute(Token token)
- {
- Token = token;
- }
- }
- [AttributeUsage(AttributeTargets.Method)]
- public class BuiltInFunctionAttribute : Attribute
- {
- public string Name { get; }
- public BuiltInFunctionAttribute(string name)
- {
- Name = name;
- }
- }
- }
|