Keyword.cs 538 B

1234567891011121314151617181920212223
  1. using System;
  2. namespace NTERA.Engine.Compiler
  3. {
  4. public class Keyword
  5. {
  6. public string Name { get; }
  7. public bool ImplicitString { get; }
  8. public bool ImplicitFormatted { get; }
  9. public Keyword(string name, bool implicitString = false, bool implicitFormatted = false)
  10. {
  11. if (implicitFormatted && !implicitString)
  12. throw new ArgumentException("Keyword cannot support formatting if it does not use implicit strings");
  13. Name = name;
  14. ImplicitString = implicitString;
  15. ImplicitFormatted = implicitFormatted;
  16. }
  17. }
  18. }