tokens_powershell.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. [[
  2. "start",
  3. ["comment","# This is a simple comment"]
  4. ],[
  5. "start",
  6. ["keyword","function"],
  7. ["text"," "],
  8. ["identifier","Hello"],
  9. ["lparen","("],
  10. ["variable.instance","$name"],
  11. ["rparen",")"],
  12. ["text"," "],
  13. ["lparen","{"]
  14. ],[
  15. "start",
  16. ["text"," "],
  17. ["identifier","Write-host"],
  18. ["text"," "],
  19. ["string","\"Hello $name\""]
  20. ],[
  21. "start",
  22. ["rparen","}"]
  23. ],[
  24. "start"
  25. ],[
  26. "start",
  27. ["keyword","function"],
  28. ["text"," "],
  29. ["identifier","add"],
  30. ["lparen","("],
  31. ["variable.instance","$left"],
  32. ["text",", "],
  33. ["variable.instance","$right"],
  34. ["keyword.operator","="],
  35. ["constant.numeric","4"],
  36. ["rparen",")"],
  37. ["text"," "],
  38. ["lparen","{"]
  39. ],[
  40. "start",
  41. ["text"," "],
  42. ["keyword","if"],
  43. ["text"," "],
  44. ["lparen","("],
  45. ["variable.instance","$right"],
  46. ["text"," "],
  47. ["keyword.operator","-ne"],
  48. ["text"," "],
  49. ["constant.numeric","4"],
  50. ["rparen",")"],
  51. ["text"," "],
  52. ["lparen","{"]
  53. ],[
  54. "start",
  55. ["text"," "],
  56. ["keyword","return"],
  57. ["text"," "],
  58. ["variable.instance","$left"]
  59. ],[
  60. "start",
  61. ["text"," "],
  62. ["rparen","}"],
  63. ["text"," "],
  64. ["keyword","elseif"],
  65. ["text"," "],
  66. ["lparen","("],
  67. ["variable.instance","$left"],
  68. ["text"," "],
  69. ["keyword.operator","-eq"],
  70. ["text"," "],
  71. ["constant.language","$null"],
  72. ["text"," "],
  73. ["keyword.operator","-and"],
  74. ["text"," "],
  75. ["variable.instance","$right"],
  76. ["text"," "],
  77. ["keyword.operator","-eq"],
  78. ["text"," "],
  79. ["constant.numeric","2"],
  80. ["rparen",")"],
  81. ["text"," "],
  82. ["lparen","{"]
  83. ],[
  84. "start",
  85. ["text"," "],
  86. ["keyword","return"],
  87. ["text"," "],
  88. ["constant.numeric","3"]
  89. ],[
  90. "start",
  91. ["text"," "],
  92. ["rparen","}"],
  93. ["text"," "],
  94. ["keyword","else"],
  95. ["text"," "],
  96. ["lparen","{"]
  97. ],[
  98. "start",
  99. ["text"," "],
  100. ["keyword","return"],
  101. ["text"," "],
  102. ["constant.numeric","2"]
  103. ],[
  104. "start",
  105. ["text"," "],
  106. ["rparen","}"]
  107. ],[
  108. "start",
  109. ["rparen","}"]
  110. ],[
  111. "start"
  112. ],[
  113. "start",
  114. ["variable.instance","$number"],
  115. ["text"," "],
  116. ["keyword.operator","="],
  117. ["text"," "],
  118. ["constant.numeric","1"],
  119. ["text"," "],
  120. ["keyword.operator","+"],
  121. ["text"," "],
  122. ["constant.numeric","2"],
  123. ["text",";"]
  124. ],[
  125. "start",
  126. ["variable.instance","$number"],
  127. ["text"," "],
  128. ["keyword.operator","+="],
  129. ["text"," "],
  130. ["constant.numeric","3"]
  131. ],[
  132. "start"
  133. ],[
  134. "start",
  135. ["support.function","Write-Host"],
  136. ["text"," "],
  137. ["identifier","Hello"],
  138. ["text"," "],
  139. ["keyword.operator","-"],
  140. ["identifier","name"],
  141. ["text"," "],
  142. ["string","\"World\""]
  143. ],[
  144. "start"
  145. ],[
  146. "start",
  147. ["variable.instance","$an_array"],
  148. ["text"," "],
  149. ["keyword.operator","="],
  150. ["text"," @"],
  151. ["lparen","("],
  152. ["constant.numeric","1"],
  153. ["text",", "],
  154. ["constant.numeric","2"],
  155. ["text",", "],
  156. ["constant.numeric","3"],
  157. ["rparen",")"]
  158. ],[
  159. "start",
  160. ["variable.instance","$a_hash"],
  161. ["text"," "],
  162. ["keyword.operator","="],
  163. ["text"," @"],
  164. ["lparen","{"],
  165. ["string","\"something\""],
  166. ["text"," "],
  167. ["keyword.operator","="],
  168. ["text"," "],
  169. ["string","\"something else\""],
  170. ["rparen","}"]
  171. ],[
  172. "start"
  173. ],[
  174. "start",
  175. ["keyword.operator","&"],
  176. ["text"," "],
  177. ["identifier","notepad"],
  178. ["text"," .\\"],
  179. ["identifier","readme"],
  180. ["text","."],
  181. ["identifier","md"]
  182. ],[
  183. "start"
  184. ]]