tokens_ruby.json 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. [[
  2. "start",
  3. ["text"," "],
  4. ["comment","#test: symbol tokenizer"]
  5. ],[
  6. "start",
  7. ["text"," "],
  8. ["paren.lparen","["],
  9. ["constant.other.symbol.ruby",":@thing"],
  10. ["text",", "],
  11. ["constant.other.symbol.ruby",":$thing"],
  12. ["text",", "],
  13. ["constant.other.symbol.ruby",":_thing"],
  14. ["text",", "],
  15. ["constant.other.symbol.ruby",":thing"],
  16. ["text",", "],
  17. ["constant.other.symbol.ruby",":Thing"],
  18. ["text",", "],
  19. ["constant.other.symbol.ruby",":thing1"],
  20. ["text",", "],
  21. ["constant.other.symbol.ruby",":thing_a"],
  22. ["text",","]
  23. ],[
  24. "start",
  25. ["text"," "],
  26. ["constant.other.symbol.ruby",":THING"],
  27. ["text",", "],
  28. ["constant.other.symbol.ruby",":thing!"],
  29. ["text",", "],
  30. ["constant.other.symbol.ruby",":thing="],
  31. ["text",", "],
  32. ["constant.other.symbol.ruby",":thing?"],
  33. ["text",", "],
  34. ["constant.other.symbol.ruby",":t?"],
  35. ["text",","]
  36. ],[
  37. "start",
  38. ["text"," :, :@, :"],
  39. ["keyword.operator","$"],
  40. ["text",", :"],
  41. ["constant.numeric","1"],
  42. ["text",", :1"],
  43. ["identifier","thing"],
  44. ["text",", "],
  45. ["constant.other.symbol.ruby",":th?"],
  46. ["identifier","ing"],
  47. ["text",", "],
  48. ["constant.other.symbol.ruby",":thi="],
  49. ["identifier","ng"],
  50. ["text",", :1"],
  51. ["identifier","thing"],
  52. ["text",","]
  53. ],[
  54. "start",
  55. ["text"," "],
  56. ["constant.other.symbol.ruby",":th!"],
  57. ["identifier","ing"],
  58. ["text",", "],
  59. ["constant.other.symbol.ruby",":thing"],
  60. ["comment","#"]
  61. ],[
  62. "start",
  63. ["text"," "],
  64. ["paren.rparen","]"]
  65. ],[
  66. "start"
  67. ],[
  68. "start",
  69. ["text"," "],
  70. ["comment","#test: namespaces aren't symbols\" : function() {"]
  71. ],[
  72. "start",
  73. ["text"," "],
  74. ["support.class","Namespaced"],
  75. ["text","::"],
  76. ["support.class","Class"]
  77. ],[
  78. "start",
  79. ["text"," "],
  80. ["comment","#test: hex tokenizer "]
  81. ],[
  82. "start",
  83. ["text"," "],
  84. ["constant.numeric","0x9a"],
  85. ["text",", "],
  86. ["constant.numeric","0XA1"],
  87. ["text",", "],
  88. ["constant.numeric","0x9_a"],
  89. ["text",", 0"],
  90. ["identifier","x"],
  91. ["text",", 0"],
  92. ["identifier","x_9a"],
  93. ["text",", 0"],
  94. ["identifier","x9a_"],
  95. ["text",","]
  96. ],[
  97. "start",
  98. ["text"," "],
  99. ["comment","#test: float tokenizer"]
  100. ],[
  101. "start",
  102. ["text"," "],
  103. ["paren.lparen","["],
  104. ["constant.numeric","1"],
  105. ["text",", "],
  106. ["constant.numeric","+1"],
  107. ["text",", "],
  108. ["constant.numeric","-1"],
  109. ["text",", "],
  110. ["constant.numeric","12_345"],
  111. ["text",", "],
  112. ["constant.numeric","0.000_1"],
  113. ["text",","]
  114. ],[
  115. "start",
  116. ["text"," "],
  117. ["identifier","_"],
  118. ["text",", "],
  119. ["constant.numeric","3_1"],
  120. ["text",", "],
  121. ["constant.numeric","1_2"],
  122. ["text",", 1"],
  123. ["identifier","_"],
  124. ["text","."],
  125. ["constant.numeric","0"],
  126. ["text",", "],
  127. ["constant.numeric","0"],
  128. ["text","."],
  129. ["identifier","_1"],
  130. ["paren.rparen","]"],
  131. ["text",";"]
  132. ],[
  133. "start",
  134. ["text"," "]
  135. ],[
  136. "start",
  137. ["paren.lparen","{"],
  138. ["constant.other.symbol.ruby",":id"],
  139. ["text"," "],
  140. ["punctuation.separator.key-value","=>"],
  141. ["text"," "],
  142. ["constant.numeric","34"],
  143. ["text",", "],
  144. ["constant.other.symbol.ruby",":key"],
  145. ["text"," "],
  146. ["punctuation.separator.key-value","=>"],
  147. ["text"," "],
  148. ["string","\"value\""],
  149. ["paren.rparen","}"]
  150. ],[
  151. "start"
  152. ],[
  153. "comment",
  154. ["comment","=begin"]
  155. ],[
  156. "start",
  157. ["comment","=end"]
  158. ],[
  159. "start"
  160. ],[
  161. "comment",
  162. ["comment","=begin x"]
  163. ],[
  164. "comment",
  165. ["comment","=end-"]
  166. ],[
  167. "start",
  168. ["comment","=end x"]
  169. ],[
  170. "start"
  171. ],[
  172. ["heredoc","FOO","heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
  173. ["text"," "],
  174. ["identifier","herDocs"],
  175. ["text"," "],
  176. ["keyword.operator","="],
  177. ["text"," "],
  178. ["paren.lparen","["],
  179. ["constant","<<"],
  180. ["string","'"],
  181. ["support.class","FOO"],
  182. ["string","'"],
  183. ["text",", "],
  184. ["constant","<<"],
  185. ["string",""],
  186. ["support.class","BAR"],
  187. ["string",""],
  188. ["text",", "],
  189. ["constant","<<-"],
  190. ["string",""],
  191. ["support.class","BAZ"],
  192. ["string",""],
  193. ["text",", "],
  194. ["constant","<<-"],
  195. ["string","`"],
  196. ["support.class","EXEC"],
  197. ["string","`"],
  198. ["paren.rparen","]"],
  199. ["text"," "],
  200. ["comment","#comment"]
  201. ],[
  202. ["heredoc","FOO","heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
  203. ["string"," FOO #{literal}"]
  204. ],[
  205. ["heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
  206. ["support.class","FOO"]
  207. ],[
  208. ["heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
  209. ["string"," BAR #{fact(10)}"]
  210. ],[
  211. ["indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
  212. ["support.class","BAR"]
  213. ],[
  214. ["indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
  215. ["string"," BAZ indented"]
  216. ],[
  217. ["indentedHeredoc","EXEC"],
  218. ["string"," "],
  219. ["support.class","BAZ"]
  220. ],[
  221. ["indentedHeredoc","EXEC"],
  222. ["string"," echo hi"]
  223. ],[
  224. "start",
  225. ["string"," "],
  226. ["support.class","EXEC"]
  227. ],[
  228. "start",
  229. ["support.function","puts"],
  230. ["text"," "],
  231. ["identifier","herDocs"]
  232. ]]