/parsing/d/tokens.d

http://github.com/wilkie/djehuty · D · 208 lines · 165 code · 40 blank · 3 comment · 0 complexity · 43ea36cc3b78935d60cde9170286d2e6 MD5 · raw file

  1. module parsing.d.tokens;
  2. enum DToken {
  3. Invalid,
  4. // Literals
  5. StringLiteral, // "..." `...` r"..." x"..."
  6. CharacterLiteral, // '.'
  7. Identifier, // [a-zA-Z_][a-zA-Z0-9_]*
  8. IntegerLiteral, // [0-9][0-9_]*, 0x[0-9a-fA-F][0-9a-fA-F_]*, etc
  9. FloatingPointLiteral, // [0-9][0-9_]*\.[0-9][0-9_]*, 0x[0-9a-fA-F][0-9a-fA-F_]*p[0-9a-fA-F]+, etc
  10. // Symbols
  11. LeftParen, // (
  12. RightParen, // )
  13. LeftBracket, // [
  14. RightBracket, // ]
  15. LeftCurly, // {
  16. RightCurly, // }
  17. Bang, // !
  18. Question, // ?
  19. Colon, // :
  20. Semicolon, // ;
  21. Assign, // =
  22. Equals, // ==
  23. NotEquals, // !=
  24. LessThan, // <
  25. NotLessThan, // !<
  26. GreaterThan, // >
  27. NotGreaterThan, // !>
  28. LessThanEqual, // <=
  29. NotLessThanEqual, // !<=
  30. GreaterThanEqual, // >=
  31. NotGreaterThanEqual, // !>=
  32. LessThanGreaterThan, // <>
  33. NotLessThanGreaterThan, // !<>
  34. LessThanGreaterThanEqual, // <>=
  35. NotLessThanGreaterThanEqual,// !<>=
  36. ShiftLeft, // <<
  37. ShiftLeftAssign, // <<=
  38. ShiftRight, // >>
  39. ShiftRightAssign, // >>=
  40. ShiftRightSigned, // >>>
  41. ShiftRightSignedAssign, // >>>=
  42. Add, // +
  43. AddAssign, // +=
  44. Cat, // ~
  45. CatAssign, // ~=
  46. Sub, // -
  47. SubAssign, // -=
  48. Div, // /
  49. DivAssign, // /=
  50. Mul, // *
  51. MulAssign, // *=
  52. Xor, // ^
  53. XorAssign, // ^=
  54. Mod, // %
  55. ModAssign, // %=
  56. And, // &
  57. LogicalAnd, // &&
  58. AndAssign, // &=
  59. Or, // |
  60. LogicalOr, // ||
  61. OrAssign, // |=
  62. Increment, // ++
  63. Decrement, // --
  64. Dot, // .
  65. Slice, // ..
  66. Variadic, // ...
  67. Comma, // ,
  68. Dollar, // $
  69. // Keywords
  70. Abstract, // abstract
  71. Alias, // alias
  72. Align, // align
  73. Asm, // asm
  74. Assert, // assert
  75. Auto, // auto
  76. Body, // body
  77. Bool, // bool
  78. Break, // break
  79. Byte, // byte
  80. Case, // case
  81. Cast, // cast
  82. Catch, // catch
  83. Cdouble, // cdouble
  84. Cent, // cent
  85. Cfloat, // cfloat
  86. Char, // char
  87. Class, // class
  88. Const, // const
  89. Continue, // continue
  90. Creal, // creal
  91. Dchar, // dchar
  92. Debug, // debug
  93. Default, // default
  94. Delegate, // delegate
  95. Delete, // delete
  96. Deprecated, // deprecated
  97. Do, // do
  98. Double, // double
  99. Else, // else
  100. Enum, // enum
  101. Export, // export
  102. Extern, // extern
  103. False, // false
  104. Final, // final
  105. Finally, // finally
  106. Float, // float
  107. For, // for
  108. Foreach, // foreach
  109. Foreach_reverse, // foreach_reverse
  110. Function, // function
  111. Goto, // goto
  112. Idouble, // idouble
  113. If, // if
  114. Ifloat, // ifloat
  115. Import, // import
  116. In, // in
  117. Inout, // inout
  118. Int, // int
  119. Interface, // interface
  120. Invariant, // invariant
  121. Ireal, // ireal
  122. Is, // is
  123. Lazy, // lazy
  124. Long, // long
  125. Macro, // macro
  126. Mixin, // mixin
  127. Module, // module
  128. New, // new
  129. Null, // null
  130. Out, // out
  131. Override, // override
  132. Package, // package
  133. Pragma, // pragma
  134. Private, // private
  135. Protected, // protected
  136. Public, // public
  137. Real, // real
  138. Ref, // ref
  139. Return, // return
  140. Scope, // scope
  141. Short, // short
  142. Static, // static
  143. Struct, // struct
  144. Super, // super
  145. Switch, // switch
  146. Synchronized, // synchronized
  147. Template, // template
  148. This, // this
  149. Throw, // throw
  150. True, // true
  151. Try, // try
  152. Typedef, // typedef
  153. Typeid, // typeid
  154. Typeof, // typeof
  155. Ubyte, // ubyte
  156. Ucent, // ucent
  157. Uint, // uint
  158. Ulong, // ulong
  159. Union, // union
  160. Unittest, // unittest
  161. Ushort, // ushort
  162. Version, // version
  163. Void, // void
  164. Volatile, // volatile
  165. Wchar, // wchar
  166. While, // while
  167. With // with
  168. }