@harmoniclabs/monaco-editor 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (766) hide show
  1. package/.azure-pipelines/publish-nightly.yml +90 -0
  2. package/.azure-pipelines/publish-stable.yml +89 -0
  3. package/.devcontainer/devcontainer.json +8 -0
  4. package/.gitattributes +1 -0
  5. package/.github/ISSUE_TEMPLATE/1_bug_report.yaml +57 -0
  6. package/.github/ISSUE_TEMPLATE/2_feature_request.yaml +38 -0
  7. package/.github/ISSUE_TEMPLATE/3_other.md +4 -0
  8. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  9. package/.github/publish-failure-issue-template.md +7 -0
  10. package/.github/workflows/ci.yml +76 -0
  11. package/.github/workflows/website.yml +66 -0
  12. package/.husky/pre-commit +4 -0
  13. package/.mocharc.json +4 -0
  14. package/.nvmrc +1 -0
  15. package/.prettierignore +17 -0
  16. package/.prettierrc +8 -0
  17. package/.vscode/launch.json +68 -0
  18. package/.vscode/settings.json +16 -0
  19. package/.vscode/tasks.json +30 -0
  20. package/CHANGELOG.md +1655 -0
  21. package/CONTRIBUTING.md +125 -0
  22. package/LICENSE.txt +21 -0
  23. package/MAINTAINING.md +55 -0
  24. package/README.md +122 -0
  25. package/SECURITY.md +41 -0
  26. package/ThirdPartyNotices.txt +392 -0
  27. package/build/build-languages.ts +212 -0
  28. package/build/build-monaco-editor.ts +463 -0
  29. package/build/check-samples.ts +53 -0
  30. package/build/fillers/vscode-nls.ts +46 -0
  31. package/build/fs.ts +80 -0
  32. package/build/importTypescript.ts +192 -0
  33. package/build/npm/installAll.ts +44 -0
  34. package/build/npm/removeAll.ts +20 -0
  35. package/build/postinstall.ts +23 -0
  36. package/build/releaseMetadata.ts +280 -0
  37. package/build/simpleserver.ts +69 -0
  38. package/build/tsconfig.json +8 -0
  39. package/build/utils.ts +291 -0
  40. package/docs/code-structure.dio.svg +275 -0
  41. package/docs/debugging-core.gif +0 -0
  42. package/docs/debugging-languages.gif +0 -0
  43. package/docs/integrate-amd.md +28 -0
  44. package/docs/integrate-esm.md +229 -0
  45. package/docs/launch config.png +0 -0
  46. package/docs/out-folders.dio.svg +347 -0
  47. package/editor.code-workspace +13 -0
  48. package/gulpfile.js +9 -0
  49. package/package.json +80 -0
  50. package/samples/README.md +36 -0
  51. package/samples/browser-amd-diff-editor/index.html +62 -0
  52. package/samples/browser-amd-diff-editor/modified.txt +74 -0
  53. package/samples/browser-amd-diff-editor/original.txt +61 -0
  54. package/samples/browser-amd-editor/index.html +24 -0
  55. package/samples/browser-amd-iframe/index.html +70 -0
  56. package/samples/browser-amd-iframe/inner.html +34 -0
  57. package/samples/browser-amd-localized/index.html +30 -0
  58. package/samples/browser-amd-monarch/index.html +105 -0
  59. package/samples/browser-amd-requirejs/index.html +26 -0
  60. package/samples/browser-amd-shadow-dom/index.html +50 -0
  61. package/samples/browser-amd-shared-model/index.html +29 -0
  62. package/samples/browser-amd-trusted-types/index.html +42 -0
  63. package/samples/browser-esm-esbuild/build.js +96 -0
  64. package/samples/browser-esm-esbuild/index.html +18 -0
  65. package/samples/browser-esm-esbuild/index.js +24 -0
  66. package/samples/browser-esm-esbuild/package.json +6 -0
  67. package/samples/browser-esm-parcel/index.html +19 -0
  68. package/samples/browser-esm-parcel/package-lock.json +3953 -0
  69. package/samples/browser-esm-parcel/package.json +10 -0
  70. package/samples/browser-esm-parcel/src/index.html +11 -0
  71. package/samples/browser-esm-parcel/src/index.js +29 -0
  72. package/samples/browser-esm-vite-react/index.html +12 -0
  73. package/samples/browser-esm-vite-react/package-lock.json +2341 -0
  74. package/samples/browser-esm-vite-react/package.json +20 -0
  75. package/samples/browser-esm-vite-react/src/components/Editor.module.css +4 -0
  76. package/samples/browser-esm-vite-react/src/components/Editor.tsx +25 -0
  77. package/samples/browser-esm-vite-react/src/main.tsx +11 -0
  78. package/samples/browser-esm-vite-react/src/userWorker.ts +27 -0
  79. package/samples/browser-esm-vite-react/src/vite-env.d.ts +1 -0
  80. package/samples/browser-esm-vite-react/tsconfig.json +11 -0
  81. package/samples/browser-esm-vite-react/vite.config.ts +7 -0
  82. package/samples/browser-esm-webpack/index.html +20 -0
  83. package/samples/browser-esm-webpack/index.js +24 -0
  84. package/samples/browser-esm-webpack/package.json +6 -0
  85. package/samples/browser-esm-webpack/webpack.config.js +30 -0
  86. package/samples/browser-esm-webpack-monaco-plugin/index.html +20 -0
  87. package/samples/browser-esm-webpack-monaco-plugin/index.js +16 -0
  88. package/samples/browser-esm-webpack-monaco-plugin/package.json +6 -0
  89. package/samples/browser-esm-webpack-monaco-plugin/webpack.config.js +28 -0
  90. package/samples/browser-esm-webpack-small/generate-imports.js +140 -0
  91. package/samples/browser-esm-webpack-small/index.html +26 -0
  92. package/samples/browser-esm-webpack-small/index.js +168 -0
  93. package/samples/browser-esm-webpack-small/package.json +7 -0
  94. package/samples/browser-esm-webpack-small/webpack.config.js +35 -0
  95. package/samples/browser-esm-webpack-typescript/package.json +7 -0
  96. package/samples/browser-esm-webpack-typescript/src/index.css +5 -0
  97. package/samples/browser-esm-webpack-typescript/src/index.ts +26 -0
  98. package/samples/browser-esm-webpack-typescript/tsconfig.json +16 -0
  99. package/samples/browser-esm-webpack-typescript/webpack.config.js +44 -0
  100. package/samples/browser-esm-webpack-typescript-react/package-lock.json +6183 -0
  101. package/samples/browser-esm-webpack-typescript-react/package.json +21 -0
  102. package/samples/browser-esm-webpack-typescript-react/src/components/Editor.tsx +38 -0
  103. package/samples/browser-esm-webpack-typescript-react/src/index.css +5 -0
  104. package/samples/browser-esm-webpack-typescript-react/src/index.html +10 -0
  105. package/samples/browser-esm-webpack-typescript-react/src/index.tsx +12 -0
  106. package/samples/browser-esm-webpack-typescript-react/tsconfig.json +18 -0
  107. package/samples/browser-esm-webpack-typescript-react/webpack.config.js +59 -0
  108. package/samples/browser-script-editor/index.html +28 -0
  109. package/samples/electron-amd/electron-index.html +37 -0
  110. package/samples/electron-amd/index.html +18 -0
  111. package/samples/electron-amd/main.js +32 -0
  112. package/samples/electron-amd/package.json +7 -0
  113. package/samples/electron-amd-nodeIntegration/electron-index.html +46 -0
  114. package/samples/electron-amd-nodeIntegration/index.html +18 -0
  115. package/samples/electron-amd-nodeIntegration/main.js +37 -0
  116. package/samples/electron-amd-nodeIntegration/package.json +7 -0
  117. package/samples/electron-esm-webpack/index.js +24 -0
  118. package/samples/electron-esm-webpack/main.js +32 -0
  119. package/samples/electron-esm-webpack/package.json +8 -0
  120. package/samples/electron-esm-webpack/webpack.config.js +29 -0
  121. package/samples/nwjs-amd/index.html +48 -0
  122. package/samples/nwjs-amd-v2/index.html +57 -0
  123. package/samples/package-lock.json +7808 -0
  124. package/samples/package.json +32 -0
  125. package/scripts/ci/env.ts +15 -0
  126. package/scripts/ci/monaco-editor-core-prepare.ts +81 -0
  127. package/scripts/ci/monaco-editor-core.sh +34 -0
  128. package/scripts/ci/monaco-editor-prepare.ts +75 -0
  129. package/scripts/ci/monaco-editor.sh +29 -0
  130. package/scripts/lib/index.ts +95 -0
  131. package/src/basic-languages/_.contribution.ts +80 -0
  132. package/src/basic-languages/abap/abap.contribution.ts +24 -0
  133. package/src/basic-languages/abap/abap.test.ts +360 -0
  134. package/src/basic-languages/abap/abap.ts +1390 -0
  135. package/src/basic-languages/apex/apex.contribution.ts +25 -0
  136. package/src/basic-languages/apex/apex.test.ts +700 -0
  137. package/src/basic-languages/apex/apex.ts +355 -0
  138. package/src/basic-languages/azcli/azcli.contribution.ts +24 -0
  139. package/src/basic-languages/azcli/azcli.test.ts +172 -0
  140. package/src/basic-languages/azcli/azcli.ts +77 -0
  141. package/src/basic-languages/bat/bat.contribution.ts +24 -0
  142. package/src/basic-languages/bat/bat.test.ts +397 -0
  143. package/src/basic-languages/bat/bat.ts +121 -0
  144. package/src/basic-languages/bicep/bicep.contribution.ts +24 -0
  145. package/src/basic-languages/bicep/bicep.test.ts +1063 -0
  146. package/src/basic-languages/bicep/bicep.ts +129 -0
  147. package/src/basic-languages/cameligo/cameligo.contribution.ts +24 -0
  148. package/src/basic-languages/cameligo/cameligo.test.ts +144 -0
  149. package/src/basic-languages/cameligo/cameligo.ts +193 -0
  150. package/src/basic-languages/clojure/clojure.contribution.ts +24 -0
  151. package/src/basic-languages/clojure/clojure.test.ts +943 -0
  152. package/src/basic-languages/clojure/clojure.ts +792 -0
  153. package/src/basic-languages/coffee/coffee.contribution.ts +25 -0
  154. package/src/basic-languages/coffee/coffee.test.ts +2363 -0
  155. package/src/basic-languages/coffee/coffee.ts +258 -0
  156. package/src/basic-languages/cpp/cpp.contribution.ts +38 -0
  157. package/src/basic-languages/cpp/cpp.test.ts +979 -0
  158. package/src/basic-languages/cpp/cpp.ts +416 -0
  159. package/src/basic-languages/csharp/csharp.contribution.ts +24 -0
  160. package/src/basic-languages/csharp/csharp.test.ts +976 -0
  161. package/src/basic-languages/csharp/csharp.ts +352 -0
  162. package/src/basic-languages/csp/csp.contribution.ts +24 -0
  163. package/src/basic-languages/csp/csp.test.ts +8 -0
  164. package/src/basic-languages/csp/csp.ts +58 -0
  165. package/src/basic-languages/css/css.contribution.ts +25 -0
  166. package/src/basic-languages/css/css.test.ts +591 -0
  167. package/src/basic-languages/css/css.ts +215 -0
  168. package/src/basic-languages/cypher/cypher.contribution.ts +24 -0
  169. package/src/basic-languages/cypher/cypher.test.ts +327 -0
  170. package/src/basic-languages/cypher/cypher.ts +274 -0
  171. package/src/basic-languages/dart/dart.contribution.ts +25 -0
  172. package/src/basic-languages/dart/dart.test.ts +558 -0
  173. package/src/basic-languages/dart/dart.ts +305 -0
  174. package/src/basic-languages/dockerfile/dockerfile.contribution.ts +25 -0
  175. package/src/basic-languages/dockerfile/dockerfile.test.ts +238 -0
  176. package/src/basic-languages/dockerfile/dockerfile.ts +145 -0
  177. package/src/basic-languages/ecl/ecl.contribution.ts +24 -0
  178. package/src/basic-languages/ecl/ecl.test.ts +8 -0
  179. package/src/basic-languages/ecl/ecl.ts +481 -0
  180. package/src/basic-languages/elixir/elixir.contribution.ts +24 -0
  181. package/src/basic-languages/elixir/elixir.test.ts +447 -0
  182. package/src/basic-languages/elixir/elixir.ts +656 -0
  183. package/src/basic-languages/flow9/flow9.contribution.ts +24 -0
  184. package/src/basic-languages/flow9/flow9.test.ts +148 -0
  185. package/src/basic-languages/flow9/flow9.ts +160 -0
  186. package/src/basic-languages/freemarker2/freemarker2-angle-bracket.test.ts +3099 -0
  187. package/src/basic-languages/freemarker2/freemarker2-angle-dollar.test.ts +3099 -0
  188. package/src/basic-languages/freemarker2/freemarker2-auto-bracket.test.ts +5358 -0
  189. package/src/basic-languages/freemarker2/freemarker2-auto-dollar.test.ts +5361 -0
  190. package/src/basic-languages/freemarker2/freemarker2-bracket-bracket.test.ts +3086 -0
  191. package/src/basic-languages/freemarker2/freemarker2-bracket-dollar.test.ts +3086 -0
  192. package/src/basic-languages/freemarker2/freemarker2.contribution.ts +111 -0
  193. package/src/basic-languages/freemarker2/freemarker2.ts +1230 -0
  194. package/src/basic-languages/fsharp/fsharp.contribution.ts +24 -0
  195. package/src/basic-languages/fsharp/fsharp.test.ts +491 -0
  196. package/src/basic-languages/fsharp/fsharp.ts +237 -0
  197. package/src/basic-languages/go/go.contribution.ts +24 -0
  198. package/src/basic-languages/go/go.test.ts +1492 -0
  199. package/src/basic-languages/go/go.ts +238 -0
  200. package/src/basic-languages/graphql/graphql.contribution.ts +25 -0
  201. package/src/basic-languages/graphql/graphql.test.ts +138 -0
  202. package/src/basic-languages/graphql/graphql.ts +174 -0
  203. package/src/basic-languages/handlebars/handlebars.contribution.ts +25 -0
  204. package/src/basic-languages/handlebars/handlebars.test.ts +354 -0
  205. package/src/basic-languages/handlebars/handlebars.ts +432 -0
  206. package/src/basic-languages/hcl/hcl.contribution.ts +24 -0
  207. package/src/basic-languages/hcl/hcl.test.ts +1228 -0
  208. package/src/basic-languages/hcl/hcl.ts +189 -0
  209. package/src/basic-languages/html/html.contribution.ts +25 -0
  210. package/src/basic-languages/html/html.test.ts +743 -0
  211. package/src/basic-languages/html/html.ts +355 -0
  212. package/src/basic-languages/ini/ini.contribution.ts +25 -0
  213. package/src/basic-languages/ini/ini.ts +82 -0
  214. package/src/basic-languages/java/java.contribution.ts +25 -0
  215. package/src/basic-languages/java/java.test.ts +878 -0
  216. package/src/basic-languages/java/java.ts +252 -0
  217. package/src/basic-languages/javascript/javascript.contribution.ts +27 -0
  218. package/src/basic-languages/javascript/javascript.test.ts +924 -0
  219. package/src/basic-languages/javascript/javascript.ts +77 -0
  220. package/src/basic-languages/julia/julia.contribution.ts +24 -0
  221. package/src/basic-languages/julia/julia.test.ts +38 -0
  222. package/src/basic-languages/julia/julia.ts +550 -0
  223. package/src/basic-languages/kotlin/kotlin.contribution.ts +25 -0
  224. package/src/basic-languages/kotlin/kotlin.test.ts +753 -0
  225. package/src/basic-languages/kotlin/kotlin.ts +273 -0
  226. package/src/basic-languages/less/less.contribution.ts +25 -0
  227. package/src/basic-languages/less/less.test.ts +1560 -0
  228. package/src/basic-languages/less/less.ts +198 -0
  229. package/src/basic-languages/lexon/lexon.contribution.ts +24 -0
  230. package/src/basic-languages/lexon/lexon.test.ts +145 -0
  231. package/src/basic-languages/lexon/lexon.ts +179 -0
  232. package/src/basic-languages/liquid/liquid.contribution.ts +25 -0
  233. package/src/basic-languages/liquid/liquid.test.ts +209 -0
  234. package/src/basic-languages/liquid/liquid.ts +251 -0
  235. package/src/basic-languages/lua/lua.contribution.ts +24 -0
  236. package/src/basic-languages/lua/lua.test.ts +86 -0
  237. package/src/basic-languages/lua/lua.ts +178 -0
  238. package/src/basic-languages/m3/m3.contribution.ts +24 -0
  239. package/src/basic-languages/m3/m3.test.ts +119 -0
  240. package/src/basic-languages/m3/m3.ts +226 -0
  241. package/src/basic-languages/markdown/markdown.contribution.ts +24 -0
  242. package/src/basic-languages/markdown/markdown.test.ts +95 -0
  243. package/src/basic-languages/markdown/markdown.ts +256 -0
  244. package/src/basic-languages/mdx/mdx.contribution.ts +24 -0
  245. package/src/basic-languages/mdx/mdx.test.ts +171 -0
  246. package/src/basic-languages/mdx/mdx.ts +163 -0
  247. package/src/basic-languages/mips/mips.contribution.ts +25 -0
  248. package/src/basic-languages/mips/mips.test.ts +239 -0
  249. package/src/basic-languages/mips/mips.ts +223 -0
  250. package/src/basic-languages/monaco.contribution.ts +87 -0
  251. package/src/basic-languages/msdax/msdax.contribution.ts +24 -0
  252. package/src/basic-languages/msdax/msdax.test.ts +444 -0
  253. package/src/basic-languages/msdax/msdax.ts +382 -0
  254. package/src/basic-languages/mysql/keywords.js +32 -0
  255. package/src/basic-languages/mysql/keywords.mysql.txt +750 -0
  256. package/src/basic-languages/mysql/mysql.contribution.ts +24 -0
  257. package/src/basic-languages/mysql/mysql.test.ts +561 -0
  258. package/src/basic-languages/mysql/mysql.ts +885 -0
  259. package/src/basic-languages/objective-c/objective-c.contribution.ts +24 -0
  260. package/src/basic-languages/objective-c/objective-c.test.ts +368 -0
  261. package/src/basic-languages/objective-c/objective-c.ts +219 -0
  262. package/src/basic-languages/pascal/pascal.contribution.ts +25 -0
  263. package/src/basic-languages/pascal/pascal.test.ts +151 -0
  264. package/src/basic-languages/pascal/pascal.ts +270 -0
  265. package/src/basic-languages/pascaligo/pascaligo.contribution.ts +24 -0
  266. package/src/basic-languages/pascaligo/pascaligo.test.ts +143 -0
  267. package/src/basic-languages/pascaligo/pascaligo.ts +183 -0
  268. package/src/basic-languages/pebble/pebble.contribution.ts +24 -0
  269. package/src/basic-languages/pebble/pebble.test.ts +178 -0
  270. package/src/basic-languages/pebble/pebble.ts +457 -0
  271. package/src/basic-languages/perl/perl.contribution.ts +24 -0
  272. package/src/basic-languages/perl/perl.test.ts +475 -0
  273. package/src/basic-languages/perl/perl.ts +664 -0
  274. package/src/basic-languages/pgsql/keywords.js +30 -0
  275. package/src/basic-languages/pgsql/keywords.postgresql.txt +827 -0
  276. package/src/basic-languages/pgsql/pgsql.contribution.ts +24 -0
  277. package/src/basic-languages/pgsql/pgsql.test.ts +595 -0
  278. package/src/basic-languages/pgsql/pgsql.ts +858 -0
  279. package/src/basic-languages/php/php.contribution.ts +25 -0
  280. package/src/basic-languages/php/php.test.ts +2409 -0
  281. package/src/basic-languages/php/php.ts +636 -0
  282. package/src/basic-languages/pla/pla.contribution.ts +23 -0
  283. package/src/basic-languages/pla/pla.test.ts +598 -0
  284. package/src/basic-languages/pla/pla.ts +157 -0
  285. package/src/basic-languages/postiats/postiats.contribution.ts +24 -0
  286. package/src/basic-languages/postiats/postiats.test.ts +1050 -0
  287. package/src/basic-languages/postiats/postiats.ts +748 -0
  288. package/src/basic-languages/powerquery/powerquery.contribution.ts +24 -0
  289. package/src/basic-languages/powerquery/powerquery.test.ts +416 -0
  290. package/src/basic-languages/powerquery/powerquery.ts +917 -0
  291. package/src/basic-languages/powershell/powershell.contribution.ts +24 -0
  292. package/src/basic-languages/powershell/powershell.test.ts +884 -0
  293. package/src/basic-languages/powershell/powershell.ts +263 -0
  294. package/src/basic-languages/protobuf/protobuf.contribution.ts +24 -0
  295. package/src/basic-languages/protobuf/protobuf.test.ts +2073 -0
  296. package/src/basic-languages/protobuf/protobuf.ts +463 -0
  297. package/src/basic-languages/pug/pug.contribution.ts +24 -0
  298. package/src/basic-languages/pug/pug.test.ts +473 -0
  299. package/src/basic-languages/pug/pug.ts +434 -0
  300. package/src/basic-languages/python/python.contribution.ts +25 -0
  301. package/src/basic-languages/python/python.test.ts +257 -0
  302. package/src/basic-languages/python/python.ts +296 -0
  303. package/src/basic-languages/qsharp/qsharp.contribution.ts +24 -0
  304. package/src/basic-languages/qsharp/qsharp.test.ts +186 -0
  305. package/src/basic-languages/qsharp/qsharp.ts +325 -0
  306. package/src/basic-languages/r/r.contribution.ts +24 -0
  307. package/src/basic-languages/r/r.test.ts +600 -0
  308. package/src/basic-languages/r/r.ts +263 -0
  309. package/src/basic-languages/razor/razor.contribution.ts +25 -0
  310. package/src/basic-languages/razor/razor.test.ts +175 -0
  311. package/src/basic-languages/razor/razor.ts +571 -0
  312. package/src/basic-languages/redis/redis.contribution.ts +24 -0
  313. package/src/basic-languages/redis/redis.test.ts +306 -0
  314. package/src/basic-languages/redis/redis.ts +309 -0
  315. package/src/basic-languages/redshift/redshift.contribution.ts +24 -0
  316. package/src/basic-languages/redshift/redshift.test.ts +595 -0
  317. package/src/basic-languages/redshift/redshift.ts +815 -0
  318. package/src/basic-languages/restructuredtext/restructuredtext.contribution.ts +24 -0
  319. package/src/basic-languages/restructuredtext/restructuredtext.test.ts +454 -0
  320. package/src/basic-languages/restructuredtext/restructuredtext.ts +198 -0
  321. package/src/basic-languages/ruby/ruby.contribution.ts +25 -0
  322. package/src/basic-languages/ruby/ruby.test.ts +158 -0
  323. package/src/basic-languages/ruby/ruby.ts +590 -0
  324. package/src/basic-languages/rust/rust.contribution.ts +24 -0
  325. package/src/basic-languages/rust/rust.test.ts +208 -0
  326. package/src/basic-languages/rust/rust.ts +361 -0
  327. package/src/basic-languages/sb/sb.contribution.ts +24 -0
  328. package/src/basic-languages/sb/sb.test.ts +320 -0
  329. package/src/basic-languages/sb/sb.ts +134 -0
  330. package/src/basic-languages/scala/scala.contribution.ts +25 -0
  331. package/src/basic-languages/scala/scala.test.ts +727 -0
  332. package/src/basic-languages/scala/scala.ts +413 -0
  333. package/src/basic-languages/scheme/scheme.contribution.ts +24 -0
  334. package/src/basic-languages/scheme/scheme.test.ts +89 -0
  335. package/src/basic-languages/scheme/scheme.ts +128 -0
  336. package/src/basic-languages/scss/scss.contribution.ts +25 -0
  337. package/src/basic-languages/scss/scss.test.ts +2422 -0
  338. package/src/basic-languages/scss/scss.ts +284 -0
  339. package/src/basic-languages/shell/shell.contribution.ts +24 -0
  340. package/src/basic-languages/shell/shell.test.ts +345 -0
  341. package/src/basic-languages/shell/shell.ts +246 -0
  342. package/src/basic-languages/solidity/solidity.contribution.ts +24 -0
  343. package/src/basic-languages/solidity/solidity.test.ts +272 -0
  344. package/src/basic-languages/solidity/solidity.ts +1388 -0
  345. package/src/basic-languages/sophia/sophia.contribution.ts +24 -0
  346. package/src/basic-languages/sophia/sophia.test.ts +302 -0
  347. package/src/basic-languages/sophia/sophia.ts +220 -0
  348. package/src/basic-languages/sparql/sparql.contribution.ts +24 -0
  349. package/src/basic-languages/sparql/sparql.test.ts +187 -0
  350. package/src/basic-languages/sparql/sparql.ts +219 -0
  351. package/src/basic-languages/sql/keywords.js +612 -0
  352. package/src/basic-languages/sql/sql.contribution.ts +24 -0
  353. package/src/basic-languages/sql/sql.test.ts +692 -0
  354. package/src/basic-languages/sql/sql.ts +860 -0
  355. package/src/basic-languages/st/st.contribution.ts +24 -0
  356. package/src/basic-languages/st/st.test.ts +139 -0
  357. package/src/basic-languages/st/st.ts +441 -0
  358. package/src/basic-languages/swift/swift.contribution.ts +25 -0
  359. package/src/basic-languages/swift/swift.test.ts +254 -0
  360. package/src/basic-languages/swift/swift.ts +335 -0
  361. package/src/basic-languages/systemverilog/systemverilog.contribution.ts +39 -0
  362. package/src/basic-languages/systemverilog/systemverilog.test.ts +1267 -0
  363. package/src/basic-languages/systemverilog/systemverilog.ts +606 -0
  364. package/src/basic-languages/tcl/tcl.contribution.ts +24 -0
  365. package/src/basic-languages/tcl/tcl.test.ts +107 -0
  366. package/src/basic-languages/tcl/tcl.ts +259 -0
  367. package/src/basic-languages/test/testRunner.ts +63 -0
  368. package/src/basic-languages/twig/twig.contribution.ts +25 -0
  369. package/src/basic-languages/twig/twig.test.ts +1047 -0
  370. package/src/basic-languages/twig/twig.ts +417 -0
  371. package/src/basic-languages/typescript/typescript.contribution.ts +25 -0
  372. package/src/basic-languages/typescript/typescript.test.ts +973 -0
  373. package/src/basic-languages/typescript/typescript.ts +364 -0
  374. package/src/basic-languages/typespec/typespec.contribution.ts +24 -0
  375. package/src/basic-languages/typespec/typespec.test.ts +500 -0
  376. package/src/basic-languages/typespec/typespec.ts +130 -0
  377. package/src/basic-languages/vb/vb.contribution.ts +24 -0
  378. package/src/basic-languages/vb/vb.test.ts +598 -0
  379. package/src/basic-languages/vb/vb.ts +394 -0
  380. package/src/basic-languages/wgsl/wgsl.contribution.ts +24 -0
  381. package/src/basic-languages/wgsl/wgsl.test.ts +3915 -0
  382. package/src/basic-languages/wgsl/wgsl.ts +485 -0
  383. package/src/basic-languages/xml/xml.contribution.ts +44 -0
  384. package/src/basic-languages/xml/xml.test.ts +706 -0
  385. package/src/basic-languages/xml/xml.ts +106 -0
  386. package/src/basic-languages/yaml/yaml.contribution.ts +25 -0
  387. package/src/basic-languages/yaml/yaml.test.ts +670 -0
  388. package/src/basic-languages/yaml/yaml.ts +236 -0
  389. package/src/fillers/editor.api.d.ts +4 -0
  390. package/src/fillers/monaco-editor-core-amd.ts +11 -0
  391. package/src/fillers/monaco-editor-core.ts +6 -0
  392. package/src/language/common/lspLanguageFeatures.ts +1027 -0
  393. package/src/language/css/css.worker.ts +14 -0
  394. package/src/language/css/cssMode.ts +145 -0
  395. package/src/language/css/cssWorker.ts +239 -0
  396. package/src/language/css/monaco.contribution.ts +362 -0
  397. package/src/language/css/workerManager.ts +90 -0
  398. package/src/language/html/html.worker.ts +14 -0
  399. package/src/language/html/htmlMode.ts +171 -0
  400. package/src/language/html/htmlWorker.ts +164 -0
  401. package/src/language/html/monaco.contribution.ts +329 -0
  402. package/src/language/html/workerManager.ts +90 -0
  403. package/src/language/json/json.worker.ts +14 -0
  404. package/src/language/json/jsonMode.ts +185 -0
  405. package/src/language/json/jsonWorker.ts +235 -0
  406. package/src/language/json/monaco.contribution.ts +372 -0
  407. package/src/language/json/tokenization.ts +273 -0
  408. package/src/language/json/workerManager.ts +91 -0
  409. package/src/language/typescript/languageFeatures.ts +1269 -0
  410. package/src/language/typescript/lib/editor.worker.d.ts +8 -0
  411. package/src/language/typescript/lib/lib.index.ts +97 -0
  412. package/src/language/typescript/lib/lib.ts +97 -0
  413. package/src/language/typescript/lib/typescriptServices.d.ts +11717 -0
  414. package/src/language/typescript/lib/typescriptServices.js +190876 -0
  415. package/src/language/typescript/lib/typescriptServicesMetadata.ts +5 -0
  416. package/src/language/typescript/monaco.contribution.ts +815 -0
  417. package/src/language/typescript/ts.worker.ts +19 -0
  418. package/src/language/typescript/tsMode.ts +176 -0
  419. package/src/language/typescript/tsWorker.ts +525 -0
  420. package/src/language/typescript/workerManager.ts +101 -0
  421. package/src/nls-fix.js +39 -0
  422. package/src/tsconfig.json +14 -0
  423. package/test/manual/cross-origin.html +26 -0
  424. package/test/manual/dev-setup.js +218 -0
  425. package/test/manual/diff.html +20 -0
  426. package/test/manual/diff.js +451 -0
  427. package/test/manual/iframe-inner.html +29 -0
  428. package/test/manual/iframe.html +23 -0
  429. package/test/manual/index.css +14 -0
  430. package/test/manual/index.html +44 -0
  431. package/test/manual/index.js +421 -0
  432. package/test/manual/mouse-fixed.html +31 -0
  433. package/test/manual/mouse-scrollable-body.html +286 -0
  434. package/test/manual/mouse-scrollable-element.html +204 -0
  435. package/test/manual/samples/run-editor-failing-js.txt +44 -0
  436. package/test/manual/samples/run-editor-intellisense-js.txt +33 -0
  437. package/test/manual/samples/run-editor-jquery-min-js.txt +30 -0
  438. package/test/manual/samples/run-editor-korean.txt +10 -0
  439. package/test/manual/samples/run-editor-sample-big-css.txt +1 -0
  440. package/test/manual/samples/run-editor-sample-bom-cs.txt +493 -0
  441. package/test/manual/samples/run-editor-sample-cr-ps1.txt +12 -0
  442. package/test/manual/samples/run-editor-sample-dynamic.txt +50 -0
  443. package/test/manual/samples/run-editor-sample-f12-css.txt +31764 -0
  444. package/test/manual/samples/run-editor-sample-html.txt +23 -0
  445. package/test/manual/samples/run-editor-sample-js.txt +222 -0
  446. package/test/manual/samples/run-editor-sample-msn-js.txt +1 -0
  447. package/test/manual/samples.js +287 -0
  448. package/test/manual/shadow-dom.html +56 -0
  449. package/test/manual/transform.html +29 -0
  450. package/test/manual/typescript/custom-worker.html +210 -0
  451. package/test/manual/typescript/custom-worker.js +59 -0
  452. package/test/manual/typescript/index.html +179 -0
  453. package/test/smoke/amd/index.html +21 -0
  454. package/test/smoke/common.js +11 -0
  455. package/test/smoke/esbuild/index.html +11 -0
  456. package/test/smoke/esbuild/index.js +26 -0
  457. package/test/smoke/package-esbuild.ts +60 -0
  458. package/test/smoke/package-vite.ts +19 -0
  459. package/test/smoke/package-webpack.ts +56 -0
  460. package/test/smoke/parcel/index.html +11 -0
  461. package/test/smoke/parcel/index.js +41 -0
  462. package/test/smoke/parcel/package.json +6 -0
  463. package/test/smoke/runner.js +94 -0
  464. package/test/smoke/smoke.test.js +215 -0
  465. package/test/smoke/vite/index.html +10 -0
  466. package/test/smoke/vite/index.js +31 -0
  467. package/test/smoke/webpack/index.html +10 -0
  468. package/test/smoke/webpack/index.js +4 -0
  469. package/test/unit/all.js +70 -0
  470. package/test/unit/setup.js +34 -0
  471. package/webpack-plugin/LICENSE +21 -0
  472. package/webpack-plugin/README.md +116 -0
  473. package/webpack-plugin/package-lock.json +3132 -0
  474. package/webpack-plugin/package.json +45 -0
  475. package/webpack-plugin/tsconfig.json +11 -0
  476. package/website/.prettierrc.json +6 -0
  477. package/website/index/samples/sample.mdx.txt +92 -0
  478. package/website/package.json +60 -0
  479. package/website/scripts/check-playground-samples-js.ts +58 -0
  480. package/website/src/monaco-loader.ts +111 -0
  481. package/website/src/runner/debug.ts +75 -0
  482. package/website/src/runner/index.ts +104 -0
  483. package/website/src/runner/style.scss +35 -0
  484. package/website/src/shared.ts +37 -0
  485. package/website/src/tsconfig.json +19 -0
  486. package/website/src/types.d.ts +13 -0
  487. package/website/src/website/bootstrap.scss +6 -0
  488. package/website/src/website/code-oss.svg +1 -0
  489. package/website/src/website/components/Loader.tsx +40 -0
  490. package/website/src/website/components/Nav.tsx +75 -0
  491. package/website/src/website/components/Page.tsx +11 -0
  492. package/website/src/website/components/Radio.tsx +23 -0
  493. package/website/src/website/components/Select.tsx +75 -0
  494. package/website/src/website/components/TextBox.tsx +21 -0
  495. package/website/src/website/components/bootstrap.tsx +32 -0
  496. package/website/src/website/components/monaco/MonacoEditor.tsx +275 -0
  497. package/website/src/website/components/monaco/MonacoLoader.tsx +39 -0
  498. package/website/src/website/data/diff-sample/modified.txt +212 -0
  499. package/website/src/website/data/diff-sample/original.txt +215 -0
  500. package/website/src/website/data/home-samples/sample.abap.txt +29 -0
  501. package/website/src/website/data/home-samples/sample.aes.txt +38 -0
  502. package/website/src/website/data/home-samples/sample.apex.txt +7 -0
  503. package/website/src/website/data/home-samples/sample.azcli.txt +5 -0
  504. package/website/src/website/data/home-samples/sample.bat.txt +13 -0
  505. package/website/src/website/data/home-samples/sample.bicep.txt +29 -0
  506. package/website/src/website/data/home-samples/sample.c.txt +3463 -0
  507. package/website/src/website/data/home-samples/sample.cameligo.txt +17 -0
  508. package/website/src/website/data/home-samples/sample.clojure.txt +54 -0
  509. package/website/src/website/data/home-samples/sample.coffeescript.txt +28 -0
  510. package/website/src/website/data/home-samples/sample.cpp.txt +246 -0
  511. package/website/src/website/data/home-samples/sample.csharp.txt +38 -0
  512. package/website/src/website/data/home-samples/sample.csp.txt +1 -0
  513. package/website/src/website/data/home-samples/sample.css.txt +828 -0
  514. package/website/src/website/data/home-samples/sample.cypher.txt +3 -0
  515. package/website/src/website/data/home-samples/sample.dart.txt +45 -0
  516. package/website/src/website/data/home-samples/sample.dockerfile.txt +32 -0
  517. package/website/src/website/data/home-samples/sample.ecl.txt +7 -0
  518. package/website/src/website/data/home-samples/sample.elixir.txt +80 -0
  519. package/website/src/website/data/home-samples/sample.flow9.txt +14 -0
  520. package/website/src/website/data/home-samples/sample.freemarker2.tag-angle.interpolation-bracket.txt +61 -0
  521. package/website/src/website/data/home-samples/sample.freemarker2.tag-angle.interpolation-dollar.txt +61 -0
  522. package/website/src/website/data/home-samples/sample.freemarker2.tag-auto.interpolation-bracket.txt +65 -0
  523. package/website/src/website/data/home-samples/sample.freemarker2.tag-auto.interpolation-dollar.txt +65 -0
  524. package/website/src/website/data/home-samples/sample.freemarker2.tag-bracket.interpolation-bracket.txt +61 -0
  525. package/website/src/website/data/home-samples/sample.freemarker2.tag-bracket.interpolation-dollar.txt +61 -0
  526. package/website/src/website/data/home-samples/sample.freemarker2.txt +61 -0
  527. package/website/src/website/data/home-samples/sample.fsharp.txt +8 -0
  528. package/website/src/website/data/home-samples/sample.go.txt +111 -0
  529. package/website/src/website/data/home-samples/sample.graphql.txt +263 -0
  530. package/website/src/website/data/home-samples/sample.handlebars.txt +31 -0
  531. package/website/src/website/data/home-samples/sample.hcl.txt +48 -0
  532. package/website/src/website/data/home-samples/sample.html.txt +100 -0
  533. package/website/src/website/data/home-samples/sample.ini.txt +15 -0
  534. package/website/src/website/data/home-samples/sample.java.txt +54 -0
  535. package/website/src/website/data/home-samples/sample.javascript.txt +214 -0
  536. package/website/src/website/data/home-samples/sample.json.txt +68 -0
  537. package/website/src/website/data/home-samples/sample.julia.txt +23 -0
  538. package/website/src/website/data/home-samples/sample.kotlin.txt +28 -0
  539. package/website/src/website/data/home-samples/sample.less.txt +46 -0
  540. package/website/src/website/data/home-samples/sample.lex.txt +21 -0
  541. package/website/src/website/data/home-samples/sample.lexon.txt +17 -0
  542. package/website/src/website/data/home-samples/sample.liquid.txt +16 -0
  543. package/website/src/website/data/home-samples/sample.lua.txt +12 -0
  544. package/website/src/website/data/home-samples/sample.m3.txt +5 -0
  545. package/website/src/website/data/home-samples/sample.markdown.txt +104 -0
  546. package/website/src/website/data/home-samples/sample.mdx.txt +91 -0
  547. package/website/src/website/data/home-samples/sample.mips.txt +13 -0
  548. package/website/src/website/data/home-samples/sample.msdax.txt +1 -0
  549. package/website/src/website/data/home-samples/sample.mysql.txt +8 -0
  550. package/website/src/website/data/home-samples/sample.objective-c.txt +52 -0
  551. package/website/src/website/data/home-samples/sample.pascal.txt +28 -0
  552. package/website/src/website/data/home-samples/sample.pascaligo.txt +20 -0
  553. package/website/src/website/data/home-samples/sample.pebble.txt +54 -0
  554. package/website/src/website/data/home-samples/sample.perl.txt +18 -0
  555. package/website/src/website/data/home-samples/sample.pgsql.txt +8 -0
  556. package/website/src/website/data/home-samples/sample.php.txt +82 -0
  557. package/website/src/website/data/home-samples/sample.pla.txt +4 -0
  558. package/website/src/website/data/home-samples/sample.plaintext.txt +9 -0
  559. package/website/src/website/data/home-samples/sample.postiats.txt +64 -0
  560. package/website/src/website/data/home-samples/sample.powerquery.txt +12 -0
  561. package/website/src/website/data/home-samples/sample.powershell.txt +30 -0
  562. package/website/src/website/data/home-samples/sample.proto.txt +11 -0
  563. package/website/src/website/data/home-samples/sample.pug.txt +18 -0
  564. package/website/src/website/data/home-samples/sample.python.txt +13 -0
  565. package/website/src/website/data/home-samples/sample.qsharp.txt +45 -0
  566. package/website/src/website/data/home-samples/sample.r.txt +41 -0
  567. package/website/src/website/data/home-samples/sample.razor.txt +46 -0
  568. package/website/src/website/data/home-samples/sample.redis.txt +4 -0
  569. package/website/src/website/data/home-samples/sample.redshift.txt +9 -0
  570. package/website/src/website/data/home-samples/sample.restructuredtext.txt +26 -0
  571. package/website/src/website/data/home-samples/sample.ruby.txt +21 -0
  572. package/website/src/website/data/home-samples/sample.rust.txt +29 -0
  573. package/website/src/website/data/home-samples/sample.sb.txt +10 -0
  574. package/website/src/website/data/home-samples/sample.scala.txt +53 -0
  575. package/website/src/website/data/home-samples/sample.scheme.txt +105 -0
  576. package/website/src/website/data/home-samples/sample.scss.txt +37 -0
  577. package/website/src/website/data/home-samples/sample.shell.txt +42 -0
  578. package/website/src/website/data/home-samples/sample.sol.txt +139 -0
  579. package/website/src/website/data/home-samples/sample.sparql.txt +7 -0
  580. package/website/src/website/data/home-samples/sample.sql.txt +52 -0
  581. package/website/src/website/data/home-samples/sample.st.txt +34 -0
  582. package/website/src/website/data/home-samples/sample.swift.txt +50 -0
  583. package/website/src/website/data/home-samples/sample.systemverilog.txt +28 -0
  584. package/website/src/website/data/home-samples/sample.tcl.txt +18 -0
  585. package/website/src/website/data/home-samples/sample.twig.txt +12 -0
  586. package/website/src/website/data/home-samples/sample.typescript.txt +124 -0
  587. package/website/src/website/data/home-samples/sample.typespec.txt +71 -0
  588. package/website/src/website/data/home-samples/sample.vb.txt +59 -0
  589. package/website/src/website/data/home-samples/sample.verilog.txt +35 -0
  590. package/website/src/website/data/home-samples/sample.wgsl.txt +48 -0
  591. package/website/src/website/data/home-samples/sample.xml.txt +14 -0
  592. package/website/src/website/data/home-samples/sample.yaml.txt +14 -0
  593. package/website/src/website/data/playground-samples/all.js +196 -0
  594. package/website/src/website/data/playground-samples/creating-the-diffeditor/chapter.json +3 -0
  595. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.css +0 -0
  596. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.html +1 -0
  597. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.js +20 -0
  598. package/website/src/website/data/playground-samples/creating-the-diffeditor/hello-diff-world/sample.json +3 -0
  599. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.css +0 -0
  600. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.html +1 -0
  601. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.js +23 -0
  602. package/website/src/website/data/playground-samples/creating-the-diffeditor/inline-diff-example/sample.json +3 -0
  603. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.css +0 -0
  604. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.html +1 -0
  605. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.js +20 -0
  606. package/website/src/website/data/playground-samples/creating-the-diffeditor/multi-line-example/sample.json +3 -0
  607. package/website/src/website/data/playground-samples/creating-the-editor/chapter.json +4 -0
  608. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.css +0 -0
  609. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.html +1 -0
  610. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.js +19 -0
  611. package/website/src/website/data/playground-samples/creating-the-editor/editor-basic-options/sample.json +3 -0
  612. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.css +0 -0
  613. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.html +1 -0
  614. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.js +13 -0
  615. package/website/src/website/data/playground-samples/creating-the-editor/hard-wrapping/sample.json +3 -0
  616. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.css +0 -0
  617. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.html +1 -0
  618. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.js +10 -0
  619. package/website/src/website/data/playground-samples/creating-the-editor/hello-world/sample.json +4 -0
  620. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.css +0 -0
  621. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.html +35 -0
  622. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.js +4 -0
  623. package/website/src/website/data/playground-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.json +3 -0
  624. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.css +0 -0
  625. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.html +8 -0
  626. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js +35 -0
  627. package/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.json +4 -0
  628. package/website/src/website/data/playground-samples/customizing-the-appearence/chapter.json +3 -0
  629. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.css +0 -0
  630. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.html +1 -0
  631. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.js +150 -0
  632. package/website/src/website/data/playground-samples/customizing-the-appearence/exposed-colors/sample.json +3 -0
  633. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.css +13 -0
  634. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.html +1 -0
  635. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.js +32 -0
  636. package/website/src/website/data/playground-samples/customizing-the-appearence/scrollbars/sample.json +3 -0
  637. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.css +0 -0
  638. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.html +1 -0
  639. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.js +40 -0
  640. package/website/src/website/data/playground-samples/customizing-the-appearence/tokens-and-colors/sample.json +3 -0
  641. package/website/src/website/data/playground-samples/extending-language-services/chapter.json +3 -0
  642. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.css +0 -0
  643. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.html +1 -0
  644. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.js +39 -0
  645. package/website/src/website/data/playground-samples/extending-language-services/codelens-provider-example/sample.json +3 -0
  646. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.css +0 -0
  647. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.html +1 -0
  648. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.js +71 -0
  649. package/website/src/website/data/playground-samples/extending-language-services/color-provider-example/sample.json +3 -0
  650. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.css +0 -0
  651. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.html +1 -0
  652. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.js +69 -0
  653. package/website/src/website/data/playground-samples/extending-language-services/completion-provider-example/sample.json +3 -0
  654. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.css +0 -0
  655. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.html +1 -0
  656. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.js +46 -0
  657. package/website/src/website/data/playground-samples/extending-language-services/configure-javascript-defaults/sample.json +3 -0
  658. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.css +0 -0
  659. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.html +1 -0
  660. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.js +42 -0
  661. package/website/src/website/data/playground-samples/extending-language-services/configure-json-defaults/sample.json +3 -0
  662. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.css +0 -0
  663. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.html +1 -0
  664. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.js +137 -0
  665. package/website/src/website/data/playground-samples/extending-language-services/custom-languages/sample.json +3 -0
  666. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.css +0 -0
  667. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.html +1 -0
  668. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.js +74 -0
  669. package/website/src/website/data/playground-samples/extending-language-services/folding-provider-example/sample.json +3 -0
  670. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.css +0 -0
  671. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.html +1 -0
  672. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.js +62 -0
  673. package/website/src/website/data/playground-samples/extending-language-services/hover-provider-example/sample.json +3 -0
  674. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.css +0 -0
  675. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.html +1 -0
  676. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.js +47 -0
  677. package/website/src/website/data/playground-samples/extending-language-services/inlay-hints-provider-example/sample.json +3 -0
  678. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.css +0 -0
  679. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.html +1 -0
  680. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.js +50 -0
  681. package/website/src/website/data/playground-samples/extending-language-services/model-markers-example/sample.json +3 -0
  682. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.css +0 -0
  683. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.html +1 -0
  684. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.js +168 -0
  685. package/website/src/website/data/playground-samples/extending-language-services/semantic-tokens-provider-example/sample.json +3 -0
  686. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.css +0 -0
  687. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.html +1 -0
  688. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.js +480 -0
  689. package/website/src/website/data/playground-samples/extending-language-services/symbols-provider-example/sample.json +3 -0
  690. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.css +0 -0
  691. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.html +1 -0
  692. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.js +43 -0
  693. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.json +3 -0
  694. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.css +0 -0
  695. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.html +1 -0
  696. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.js +49 -0
  697. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-keybinding-to-an-existing-command/sample.json +3 -0
  698. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.css +0 -0
  699. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.html +1 -0
  700. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.js +52 -0
  701. package/website/src/website/data/playground-samples/interacting-with-the-editor/adding-an-action-to-an-editor-instance/sample.json +3 -0
  702. package/website/src/website/data/playground-samples/interacting-with-the-editor/chapter.json +3 -0
  703. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.css +0 -0
  704. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.html +1 -0
  705. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.js +37 -0
  706. package/website/src/website/data/playground-samples/interacting-with-the-editor/customizing-the-line-numbers/sample.json +3 -0
  707. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.css +13 -0
  708. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.html +1 -0
  709. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.js +30 -0
  710. package/website/src/website/data/playground-samples/interacting-with-the-editor/line-and-inline-decorations/sample.json +3 -0
  711. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.css +0 -0
  712. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.html +1 -0
  713. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.js +11 -0
  714. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-key-events/sample.json +3 -0
  715. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.css +6 -0
  716. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.html +5 -0
  717. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.js +114 -0
  718. package/website/src/website/data/playground-samples/interacting-with-the-editor/listening-to-mouse-events/sample.json +3 -0
  719. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.css +7 -0
  720. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.html +1 -0
  721. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.js +30 -0
  722. package/website/src/website/data/playground-samples/interacting-with-the-editor/rendering-glyphs-in-the-margin/sample.json +3 -0
  723. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.css +0 -0
  724. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.html +1 -0
  725. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.js +41 -0
  726. package/website/src/website/data/playground-samples/interacting-with-the-editor/revealing-a-position/sample.json +3 -0
  727. package/website/src/website/index.tsx +10 -0
  728. package/website/src/website/monaco-loader-chunk.ts +15 -0
  729. package/website/src/website/monacoEditorVersion.ts +8 -0
  730. package/website/src/website/pages/App.tsx +21 -0
  731. package/website/src/website/pages/DocsPage.tsx +103 -0
  732. package/website/src/website/pages/MonarchPage.tsx +16 -0
  733. package/website/src/website/pages/home/Home.tsx +249 -0
  734. package/website/src/website/pages/playground/BisectModel.ts +161 -0
  735. package/website/src/website/pages/playground/LocationModel.ts +216 -0
  736. package/website/src/website/pages/playground/PlaygroundModel.ts +355 -0
  737. package/website/src/website/pages/playground/PlaygroundPage.tsx +31 -0
  738. package/website/src/website/pages/playground/PlaygroundPageContent.tsx +587 -0
  739. package/website/src/website/pages/playground/Preview.tsx +129 -0
  740. package/website/src/website/pages/playground/SettingsDialog.tsx +412 -0
  741. package/website/src/website/pages/playground/SettingsModel.ts +198 -0
  742. package/website/src/website/pages/playground/Source.ts +107 -0
  743. package/website/src/website/pages/playground/getNpmVersionsSync.ts +450 -0
  744. package/website/src/website/pages/playground/playgroundExamples.tsx +88 -0
  745. package/website/src/website/pages/playground/utils.ts +28 -0
  746. package/website/src/website/pages/routes.ts +28 -0
  747. package/website/src/website/style.scss +96 -0
  748. package/website/src/website/utils/Debouncer.ts +28 -0
  749. package/website/src/website/utils/ObservableHistory.ts +89 -0
  750. package/website/src/website/utils/ObservablePromise.ts +49 -0
  751. package/website/src/website/utils/hotComponent.tsx +49 -0
  752. package/website/src/website/utils/lzmaCompressor.ts +39 -0
  753. package/website/src/website/utils/ref.ts +39 -0
  754. package/website/src/website/utils/types.d.ts +28 -0
  755. package/website/src/website/utils/utils.ts +58 -0
  756. package/website/static/monarch/monarch-34px.png +0 -0
  757. package/website/static/monarch/monarch.css +297 -0
  758. package/website/static/monarch/monarch.js +178 -0
  759. package/website/static/monarch-static.html +5345 -0
  760. package/website/tsconfig.json +16 -0
  761. package/website/tslint.json +6 -0
  762. package/website/typedoc/tsconfig.json +8 -0
  763. package/website/typedoc/typedoc.json +11 -0
  764. package/website/vscode-web-editors.tgz +0 -0
  765. package/website/webpack.config.ts +151 -0
  766. package/website/yarn.lock +3612 -0
@@ -0,0 +1,2422 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ import { testTokenization as actualTestTokenization, ITestItem } from '../test/testRunner';
7
+
8
+ function testTokenization(_language: string | string[], tests: ITestItem[][]): void {
9
+ tests = tests.map((t) => {
10
+ return t.map((t) => {
11
+ return {
12
+ line: t.line.replace(/\n/g, ' '),
13
+ tokens: t.tokens
14
+ };
15
+ });
16
+ });
17
+ actualTestTokenization(_language, tests);
18
+ }
19
+
20
+ testTokenization('scss', [
21
+ // Nested Rules
22
+ [
23
+ {
24
+ line:
25
+ '#main {\n' +
26
+ ' width: 97%;\n' +
27
+ ' p, div {\n' +
28
+ ' font-size: 2em;\n' +
29
+ ' a { font-weight: bold; }\n' +
30
+ ' }\n' +
31
+ ' pre { font-size: 3em; }\n' +
32
+ '}',
33
+ tokens: [
34
+ { startIndex: 0, type: 'tag.scss' } /* '#main' */,
35
+ { startIndex: 5, type: '' },
36
+ { startIndex: 6, type: 'delimiter.curly.scss' } /* '{' */,
37
+ { startIndex: 7, type: '' },
38
+ { startIndex: 10, type: 'attribute.name.scss' } /* 'width:' */,
39
+ { startIndex: 16, type: '' },
40
+ { startIndex: 17, type: 'number.scss' } /* '97%' */,
41
+ { startIndex: 20, type: 'delimiter.scss' } /* ';' */,
42
+ { startIndex: 21, type: '' },
43
+ { startIndex: 24, type: 'tag.scss' } /* 'p' */,
44
+ { startIndex: 25, type: 'delimiter.scss' } /* ',' */,
45
+ { startIndex: 26, type: '' },
46
+ { startIndex: 27, type: 'tag.scss' } /* 'div' */,
47
+ { startIndex: 30, type: '' },
48
+ { startIndex: 31, type: 'delimiter.curly.scss' } /* '{' */,
49
+ { startIndex: 32, type: '' },
50
+ {
51
+ startIndex: 37,
52
+ type: 'attribute.name.scss'
53
+ } /* 'font-size:' */,
54
+ { startIndex: 47, type: '' },
55
+ { startIndex: 48, type: 'number.scss' } /* '2em' */,
56
+ { startIndex: 51, type: 'delimiter.scss' } /* ';' */,
57
+ { startIndex: 52, type: '' },
58
+ { startIndex: 57, type: 'tag.scss' } /* 'a' */,
59
+ { startIndex: 58, type: '' },
60
+ { startIndex: 59, type: 'delimiter.curly.scss' } /* '{' */,
61
+ { startIndex: 60, type: '' },
62
+ {
63
+ startIndex: 61,
64
+ type: 'attribute.name.scss'
65
+ } /* 'font-weight:' */,
66
+ { startIndex: 73, type: '' },
67
+ { startIndex: 74, type: 'attribute.value.scss' } /* 'bold' */,
68
+ { startIndex: 78, type: 'delimiter.scss' } /* ';' */,
69
+ { startIndex: 79, type: '' },
70
+ { startIndex: 80, type: 'delimiter.curly.scss' } /* '}' */,
71
+ { startIndex: 81, type: '' },
72
+ { startIndex: 84, type: 'delimiter.curly.scss' } /* '}' */,
73
+ { startIndex: 85, type: '' },
74
+ { startIndex: 88, type: 'tag.scss' } /* 'pre' */,
75
+ { startIndex: 91, type: '' },
76
+ { startIndex: 92, type: 'delimiter.curly.scss' } /* '{' */,
77
+ { startIndex: 93, type: '' },
78
+ {
79
+ startIndex: 94,
80
+ type: 'attribute.name.scss'
81
+ } /* 'font-size:' */,
82
+ { startIndex: 104, type: '' },
83
+ { startIndex: 105, type: 'number.scss' } /* '3em' */,
84
+ { startIndex: 108, type: 'delimiter.scss' } /* ';' */,
85
+ { startIndex: 109, type: '' },
86
+ { startIndex: 110, type: 'delimiter.curly.scss' } /* '}' */,
87
+ { startIndex: 111, type: '' },
88
+ { startIndex: 112, type: 'delimiter.curly.scss' } /* '}' */
89
+ ]
90
+ }
91
+ ],
92
+
93
+ // Parent selector
94
+ [
95
+ {
96
+ line:
97
+ '#main {\n' +
98
+ ' color: black;\n' +
99
+ ' a {\n' +
100
+ ' font-weight: bold;\n' +
101
+ ' &:hover { color: red; }\n' +
102
+ ' }\n' +
103
+ '}',
104
+ tokens: [
105
+ { startIndex: 0, type: 'tag.scss' } /* '#main' */,
106
+ { startIndex: 5, type: '' },
107
+ { startIndex: 6, type: 'delimiter.curly.scss' } /* '{' */,
108
+ { startIndex: 7, type: '' },
109
+ { startIndex: 10, type: 'attribute.name.scss' } /* 'color:' */,
110
+ { startIndex: 16, type: '' },
111
+ { startIndex: 17, type: 'attribute.value.scss' } /* 'black' */,
112
+ { startIndex: 22, type: 'delimiter.scss' } /* ';' */,
113
+ { startIndex: 23, type: '' },
114
+ { startIndex: 26, type: 'tag.scss' } /* 'a' */,
115
+ { startIndex: 27, type: '' },
116
+ { startIndex: 28, type: 'delimiter.curly.scss' } /* '{' */,
117
+ { startIndex: 29, type: '' },
118
+ {
119
+ startIndex: 34,
120
+ type: 'attribute.name.scss'
121
+ } /* 'font-weight:' */,
122
+ { startIndex: 46, type: '' },
123
+ { startIndex: 47, type: 'attribute.value.scss' } /* 'bold' */,
124
+ { startIndex: 51, type: 'delimiter.scss' } /* ';' */,
125
+ { startIndex: 52, type: '' },
126
+ { startIndex: 57, type: 'tag.scss' } /* '&:hover' */,
127
+ { startIndex: 64, type: '' },
128
+ { startIndex: 65, type: 'delimiter.curly.scss' } /* '{' */,
129
+ { startIndex: 66, type: '' },
130
+ { startIndex: 67, type: 'attribute.name.scss' } /* 'color:' */,
131
+ { startIndex: 73, type: '' },
132
+ { startIndex: 74, type: 'attribute.value.scss' } /* 'red' */,
133
+ { startIndex: 77, type: 'delimiter.scss' } /* ';' */,
134
+ { startIndex: 78, type: '' },
135
+ { startIndex: 79, type: 'delimiter.curly.scss' } /* '}' */,
136
+ { startIndex: 80, type: '' },
137
+ { startIndex: 83, type: 'delimiter.curly.scss' } /* '}' */,
138
+ { startIndex: 84, type: '' },
139
+ { startIndex: 85, type: 'delimiter.curly.scss' } /* '}' */
140
+ ]
141
+ }
142
+ ],
143
+
144
+ // Nested Properties
145
+ [
146
+ {
147
+ line:
148
+ '.funky {\n' +
149
+ ' font: 2px/3px {\n' +
150
+ ' family: fantasy;\n' +
151
+ ' size: 30em;\n' +
152
+ ' weight: bold;\n' +
153
+ ' }\n' +
154
+ ' color: black;\n' +
155
+ '}',
156
+ tokens: [
157
+ { startIndex: 0, type: 'tag.scss' } /* '.funky' */,
158
+ { startIndex: 6, type: '' },
159
+ { startIndex: 7, type: 'delimiter.curly.scss' } /* '{' */,
160
+ { startIndex: 8, type: '' },
161
+ { startIndex: 11, type: 'attribute.name.scss' } /* 'font:' */,
162
+ { startIndex: 16, type: '' },
163
+ { startIndex: 17, type: 'number.scss' } /* '2px' */,
164
+ { startIndex: 20, type: 'operator.scss' } /* '/' */,
165
+ { startIndex: 21, type: 'number.scss' } /* '3px' */,
166
+ { startIndex: 24, type: '' },
167
+ { startIndex: 25, type: 'delimiter.curly.scss' } /* '{' */,
168
+ { startIndex: 26, type: '' },
169
+ { startIndex: 31, type: 'attribute.name.scss' } /* 'family:' */,
170
+ { startIndex: 38, type: '' },
171
+ {
172
+ startIndex: 39,
173
+ type: 'attribute.value.scss'
174
+ } /* 'fantasy' */,
175
+ { startIndex: 46, type: 'delimiter.scss' } /* ';' */,
176
+ { startIndex: 47, type: '' },
177
+ { startIndex: 52, type: 'attribute.name.scss' } /* 'size:' */,
178
+ { startIndex: 57, type: '' },
179
+ { startIndex: 58, type: 'number.scss' } /* '30em' */,
180
+ { startIndex: 62, type: 'delimiter.scss' } /* ';' */,
181
+ { startIndex: 63, type: '' },
182
+ { startIndex: 68, type: 'attribute.name.scss' } /* 'weight:' */,
183
+ { startIndex: 75, type: '' },
184
+ { startIndex: 76, type: 'attribute.value.scss' } /* 'bold' */,
185
+ { startIndex: 80, type: 'delimiter.scss' } /* ';' */,
186
+ { startIndex: 81, type: '' },
187
+ { startIndex: 84, type: 'delimiter.curly.scss' } /* '}' */,
188
+ { startIndex: 85, type: '' },
189
+ { startIndex: 88, type: 'attribute.name.scss' } /* 'color:' */,
190
+ { startIndex: 94, type: '' },
191
+ { startIndex: 95, type: 'attribute.value.scss' } /* 'black' */,
192
+ { startIndex: 100, type: 'delimiter.scss' } /* ';' */,
193
+ { startIndex: 101, type: '' },
194
+ { startIndex: 102, type: 'delimiter.curly.scss' } /* '}' */
195
+ ]
196
+ }
197
+ ],
198
+
199
+ // Nesting name conflicts
200
+ [
201
+ {
202
+ line:
203
+ 'tr.default {\n' +
204
+ ' foo: { /* properti*/\n' +
205
+ ' foo : 1;\n' +
206
+ ' }\n' +
207
+ ' foo: 1px; /* ru*/\n' +
208
+ ' foo.bar { /* select*/\n' +
209
+ ' foo : 1;\n' +
210
+ ' }\n' +
211
+ ' foo:bar { /* select*/\n' +
212
+ ' foo : 1;\n' +
213
+ ' }\n' +
214
+ ' foo: 1px; /* ru*/\n' +
215
+ '}',
216
+ tokens: [
217
+ { startIndex: 0, type: 'tag.scss' } /* 'tr.default' */,
218
+ { startIndex: 10, type: '' },
219
+ { startIndex: 11, type: 'delimiter.curly.scss' } /* '{' */,
220
+ { startIndex: 12, type: '' },
221
+ { startIndex: 15, type: 'attribute.name.scss' } /* 'foo:' */,
222
+ { startIndex: 19, type: '' },
223
+ { startIndex: 20, type: 'delimiter.curly.scss' } /* '{' */,
224
+ { startIndex: 21, type: '' },
225
+ { startIndex: 22, type: 'comment.scss' } /* '// properties' */,
226
+ { startIndex: 35, type: '' },
227
+ { startIndex: 40, type: 'attribute.name.scss' } /* 'foo :' */,
228
+ { startIndex: 45, type: '' },
229
+ { startIndex: 46, type: 'number.scss' } /* '1' */,
230
+ { startIndex: 47, type: 'delimiter.scss' } /* ';' */,
231
+ { startIndex: 48, type: '' },
232
+ { startIndex: 51, type: 'delimiter.curly.scss' } /* '}' */,
233
+ { startIndex: 52, type: '' },
234
+ { startIndex: 55, type: 'attribute.name.scss' } /* 'foo:' */,
235
+ { startIndex: 59, type: '' },
236
+ { startIndex: 60, type: 'number.scss' } /* '1px' */,
237
+ { startIndex: 63, type: 'delimiter.scss' } /* ';' */,
238
+ { startIndex: 64, type: '' },
239
+ { startIndex: 65, type: 'comment.scss' } /* '// rule' */,
240
+ { startIndex: 72, type: '' },
241
+ { startIndex: 75, type: 'tag.scss' } /* 'foo.bar' */,
242
+ { startIndex: 82, type: '' },
243
+ { startIndex: 83, type: 'delimiter.curly.scss' } /* '{' */,
244
+ { startIndex: 84, type: '' },
245
+ { startIndex: 85, type: 'comment.scss' } /* '// selector' */,
246
+ { startIndex: 96, type: '' },
247
+ { startIndex: 101, type: 'attribute.name.scss' } /* 'foo :' */,
248
+ { startIndex: 106, type: '' },
249
+ { startIndex: 107, type: 'number.scss' } /* '1' */,
250
+ { startIndex: 108, type: 'delimiter.scss' } /* ';' */,
251
+ { startIndex: 109, type: '' },
252
+ { startIndex: 112, type: 'delimiter.curly.scss' } /* '}' */,
253
+ { startIndex: 113, type: '' },
254
+ { startIndex: 116, type: 'tag.scss' } /* 'foo:bar' */,
255
+ { startIndex: 123, type: '' },
256
+ { startIndex: 124, type: 'delimiter.curly.scss' } /* '{' */,
257
+ { startIndex: 125, type: '' },
258
+ { startIndex: 126, type: 'comment.scss' } /* '// selector' */,
259
+ { startIndex: 137, type: '' },
260
+ { startIndex: 142, type: 'attribute.name.scss' } /* 'foo :' */,
261
+ { startIndex: 147, type: '' },
262
+ { startIndex: 148, type: 'number.scss' } /* '1' */,
263
+ { startIndex: 149, type: 'delimiter.scss' } /* ';' */,
264
+ { startIndex: 150, type: '' },
265
+ { startIndex: 153, type: 'delimiter.curly.scss' } /* '}' */,
266
+ { startIndex: 154, type: '' },
267
+ { startIndex: 157, type: 'attribute.name.scss' } /* 'foo:' */,
268
+ { startIndex: 161, type: '' },
269
+ { startIndex: 162, type: 'number.scss' } /* '1px' */,
270
+ { startIndex: 165, type: 'delimiter.scss' } /* ';' */,
271
+ { startIndex: 166, type: '' },
272
+ { startIndex: 167, type: 'comment.scss' } /* '// rule' */,
273
+ { startIndex: 174, type: '' },
274
+ { startIndex: 175, type: 'delimiter.curly.scss' } /* '}' */
275
+ ]
276
+ }
277
+ ],
278
+
279
+ // Missing semicolons
280
+ [
281
+ {
282
+ line:
283
+ 'tr.default {\n' +
284
+ ' foo.bar {\n' +
285
+ ' $foo: 1px\n' +
286
+ ' }\n' +
287
+ ' foo: {\n' +
288
+ ' foo : white\n' +
289
+ ' }\n' +
290
+ ' foo.bar1 {\n' +
291
+ ' @extend tr.default\n' +
292
+ ' }\n' +
293
+ ' foo.bar2 {\n' +
294
+ ' @import "compass"\n' +
295
+ ' }\n' +
296
+ ' bar: black\n' +
297
+ '}',
298
+ tokens: [
299
+ { startIndex: 0, type: 'tag.scss' } /* 'tr.default' */,
300
+ { startIndex: 10, type: '' },
301
+ { startIndex: 11, type: 'delimiter.curly.scss' } /* '{' */,
302
+ { startIndex: 12, type: '' },
303
+ { startIndex: 15, type: 'tag.scss' } /* 'foo.bar' */,
304
+ { startIndex: 22, type: '' },
305
+ { startIndex: 23, type: 'delimiter.curly.scss' } /* '{' */,
306
+ { startIndex: 24, type: '' },
307
+ { startIndex: 29, type: 'variable.decl.scss' } /* '$foo:' */,
308
+ { startIndex: 34, type: '' },
309
+ { startIndex: 35, type: 'number.scss' } /* '1px' */,
310
+ { startIndex: 38, type: '' },
311
+ { startIndex: 41, type: 'delimiter.curly.scss' } /* '}' */,
312
+ { startIndex: 42, type: '' },
313
+ { startIndex: 45, type: 'attribute.name.scss' } /* 'foo:' */,
314
+ { startIndex: 49, type: '' },
315
+ { startIndex: 50, type: 'delimiter.curly.scss' } /* '{' */,
316
+ { startIndex: 51, type: '' },
317
+ { startIndex: 56, type: 'attribute.name.scss' } /* 'foo :' */,
318
+ { startIndex: 61, type: '' },
319
+ { startIndex: 62, type: 'attribute.value.scss' } /* 'white' */,
320
+ { startIndex: 67, type: '' },
321
+ { startIndex: 70, type: 'delimiter.curly.scss' } /* '}' */,
322
+ { startIndex: 71, type: '' },
323
+ { startIndex: 74, type: 'tag.scss' } /* 'foo.bar1' */,
324
+ { startIndex: 82, type: '' },
325
+ { startIndex: 83, type: 'delimiter.curly.scss' } /* '{' */,
326
+ { startIndex: 84, type: '' },
327
+ { startIndex: 89, type: 'keyword.scss' } /* '@extend' */,
328
+ { startIndex: 96, type: '' },
329
+ { startIndex: 97, type: 'tag.scss' } /* 'tr.default' */,
330
+ { startIndex: 107, type: '' },
331
+ { startIndex: 110, type: 'delimiter.curly.scss' } /* '}' */,
332
+ { startIndex: 111, type: '' },
333
+ { startIndex: 114, type: 'tag.scss' } /* 'foo.bar2' */,
334
+ { startIndex: 122, type: '' },
335
+ { startIndex: 123, type: 'delimiter.curly.scss' } /* '{' */,
336
+ { startIndex: 124, type: '' },
337
+ { startIndex: 129, type: 'keyword.scss' } /* '@import' */,
338
+ { startIndex: 136, type: '' },
339
+ { startIndex: 137, type: 'string.delimiter.scss' } /* '"' */,
340
+ { startIndex: 138, type: 'string.scss' } /* 'compass' */,
341
+ { startIndex: 145, type: 'string.delimiter.scss' } /* '"' */,
342
+ { startIndex: 146, type: '' },
343
+ { startIndex: 149, type: 'delimiter.curly.scss' } /* '}' */,
344
+ { startIndex: 150, type: '' },
345
+ { startIndex: 153, type: 'attribute.name.scss' } /* 'bar:' */,
346
+ { startIndex: 157, type: '' },
347
+ { startIndex: 158, type: 'attribute.value.scss' } /* 'black' */,
348
+ { startIndex: 163, type: '' },
349
+ { startIndex: 164, type: 'delimiter.curly.scss' } /* '}' */
350
+ ]
351
+ }
352
+ ],
353
+
354
+ // Rules without whitespaces
355
+ [
356
+ {
357
+ line: 'legend {foo{a:s}margin-top:0;margin-bottom:#123;margin-top:s(1)}',
358
+ tokens: [
359
+ { startIndex: 0, type: 'tag.scss' } /* 'legend' */,
360
+ { startIndex: 6, type: '' },
361
+ { startIndex: 7, type: 'delimiter.curly.scss' } /* '{' */,
362
+ { startIndex: 8, type: 'tag.scss' } /* 'foo' */,
363
+ { startIndex: 11, type: 'delimiter.curly.scss' } /* '{' */,
364
+ { startIndex: 12, type: 'attribute.name.scss' } /* 'a:' */,
365
+ { startIndex: 14, type: 'attribute.value.scss' } /* 's' */,
366
+ { startIndex: 15, type: 'delimiter.curly.scss' } /* '}' */,
367
+ {
368
+ startIndex: 16,
369
+ type: 'attribute.name.scss'
370
+ } /* 'margin-top:' */,
371
+ { startIndex: 27, type: 'number.scss' } /* '0' */,
372
+ { startIndex: 28, type: 'delimiter.scss' } /* ';' */,
373
+ {
374
+ startIndex: 29,
375
+ type: 'attribute.name.scss'
376
+ } /* 'margin-bottom:' */,
377
+ { startIndex: 43, type: 'number.hex.scss' } /* '#123' */,
378
+ { startIndex: 47, type: 'delimiter.scss' } /* ';' */,
379
+ {
380
+ startIndex: 48,
381
+ type: 'attribute.name.scss'
382
+ } /* 'margin-top:' */,
383
+ { startIndex: 59, type: 'meta.scss' } /* 's(' */,
384
+ { startIndex: 61, type: 'number.scss' } /* '1' */,
385
+ { startIndex: 62, type: 'meta.scss' } /* ')' */,
386
+ { startIndex: 63, type: 'delimiter.curly.scss' } /* '}' */
387
+ ]
388
+ }
389
+ ],
390
+
391
+ // Extended commentswhitespaces
392
+ [
393
+ {
394
+ line:
395
+ '/* extended comment syntax */\n' +
396
+ '/* This comment is\n' +
397
+ ' * several lines long.\n' +
398
+ ' * since it uses the CSS comment syntax,\n' +
399
+ ' * it will appear in the CSS output. */\n' +
400
+ 'body { color: black; }\n' +
401
+ '\n' +
402
+ '/* These comments are only one line long eac*/\n' +
403
+ "/* They won't appear in the CSS outpu*/\n" +
404
+ '/* since they use the single-line comment synta*/\n' +
405
+ 'a { color: green; }',
406
+ tokens: [
407
+ {
408
+ startIndex: 0,
409
+ type: 'comment.scss'
410
+ } /* '/* extended comment syntax * /' */,
411
+ { startIndex: 29, type: '' },
412
+ {
413
+ startIndex: 30,
414
+ type: 'comment.scss'
415
+ } /* '/* This comment is' */,
416
+ { startIndex: 152, type: '' },
417
+ { startIndex: 153, type: 'tag.scss' } /* 'body' */,
418
+ { startIndex: 157, type: '' },
419
+ { startIndex: 158, type: 'delimiter.curly.scss' } /* '{' */,
420
+ { startIndex: 159, type: '' },
421
+ { startIndex: 160, type: 'attribute.name.scss' } /* 'color:' */,
422
+ { startIndex: 166, type: '' },
423
+ { startIndex: 167, type: 'attribute.value.scss' } /* 'black' */,
424
+ { startIndex: 172, type: 'delimiter.scss' } /* ';' */,
425
+ { startIndex: 173, type: '' },
426
+ { startIndex: 174, type: 'delimiter.curly.scss' } /* '}' */,
427
+ { startIndex: 175, type: '' },
428
+ {
429
+ startIndex: 177,
430
+ type: 'comment.scss'
431
+ } /* '// These comments are only one line long each.' */,
432
+ { startIndex: 223, type: '' },
433
+ {
434
+ startIndex: 224,
435
+ type: 'comment.scss'
436
+ } /* '// They won't appear in the CSS output,' */,
437
+ { startIndex: 263, type: '' },
438
+ {
439
+ startIndex: 264,
440
+ type: 'comment.scss'
441
+ } /* '// since they use the single-line comment syntax.' */,
442
+ { startIndex: 313, type: '' },
443
+ { startIndex: 314, type: 'tag.scss' } /* 'a' */,
444
+ { startIndex: 315, type: '' },
445
+ { startIndex: 316, type: 'delimiter.curly.scss' } /* '{' */,
446
+ { startIndex: 317, type: '' },
447
+ { startIndex: 318, type: 'attribute.name.scss' } /* 'color:' */,
448
+ { startIndex: 324, type: '' },
449
+ { startIndex: 325, type: 'attribute.value.scss' } /* 'green' */,
450
+ { startIndex: 330, type: 'delimiter.scss' } /* ';' */,
451
+ { startIndex: 331, type: '' },
452
+ { startIndex: 332, type: 'delimiter.curly.scss' } /* '}' */
453
+ ]
454
+ }
455
+ ],
456
+
457
+ // Variable declarations and referenceswhitespaces
458
+ [
459
+ {
460
+ line:
461
+ '$width: 5em;\n' +
462
+ '$width: "Second width?" !default;\n' +
463
+ '#main {\n' +
464
+ ' $localvar: 6em;\n' +
465
+ ' width: $width;\n' +
466
+ '\n' +
467
+ ' $font-size: 12px;\n' +
468
+ ' $line-height: 30px;\n' +
469
+ ' font: #{$font-size}/#{$line-height};\n' +
470
+ '}\n' +
471
+ '$name: foo;\n' +
472
+ '$attr: border;\n' +
473
+ 'p.#{$name} {\n' +
474
+ ' #{$attr}-color: blue;\n' +
475
+ '}',
476
+ tokens: [
477
+ { startIndex: 0, type: 'variable.decl.scss' } /* '$width:' */,
478
+ { startIndex: 7, type: '' },
479
+ { startIndex: 8, type: 'number.scss' } /* '5em' */,
480
+ { startIndex: 11, type: 'delimiter.scss' } /* ';' */,
481
+ { startIndex: 12, type: '' },
482
+ { startIndex: 13, type: 'variable.decl.scss' } /* '$width:' */,
483
+ { startIndex: 20, type: '' },
484
+ { startIndex: 21, type: 'string.delimiter.scss' } /* '"' */,
485
+ { startIndex: 22, type: 'string.scss' } /* 'Second width?' */,
486
+ { startIndex: 35, type: 'string.delimiter.scss' } /* '"' */,
487
+ { startIndex: 36, type: '' },
488
+ { startIndex: 37, type: 'literal.scss' } /* '!default' */,
489
+ { startIndex: 45, type: 'delimiter.scss' } /* ';' */,
490
+ { startIndex: 46, type: '' },
491
+ { startIndex: 47, type: 'tag.scss' } /* '#main' */,
492
+ { startIndex: 52, type: '' },
493
+ { startIndex: 53, type: 'delimiter.curly.scss' } /* '{' */,
494
+ { startIndex: 54, type: '' },
495
+ {
496
+ startIndex: 57,
497
+ type: 'variable.decl.scss'
498
+ } /* '$localvar:' */,
499
+ { startIndex: 67, type: '' },
500
+ { startIndex: 68, type: 'number.scss' } /* '6em' */,
501
+ { startIndex: 71, type: 'delimiter.scss' } /* ';' */,
502
+ { startIndex: 72, type: '' },
503
+ { startIndex: 75, type: 'attribute.name.scss' } /* 'width:' */,
504
+ { startIndex: 81, type: '' },
505
+ { startIndex: 82, type: 'variable.ref.scss' } /* '$width' */,
506
+ { startIndex: 88, type: 'delimiter.scss' } /* ';' */,
507
+ { startIndex: 89, type: '' },
508
+ {
509
+ startIndex: 93,
510
+ type: 'variable.decl.scss'
511
+ } /* '$font-size:' */,
512
+ { startIndex: 104, type: '' },
513
+ { startIndex: 105, type: 'number.scss' } /* '12px' */,
514
+ { startIndex: 109, type: 'delimiter.scss' } /* ';' */,
515
+ { startIndex: 110, type: '' },
516
+ {
517
+ startIndex: 113,
518
+ type: 'variable.decl.scss'
519
+ } /* '$line-height:' */,
520
+ { startIndex: 126, type: '' },
521
+ { startIndex: 127, type: 'number.scss' } /* '30px' */,
522
+ { startIndex: 131, type: 'delimiter.scss' } /* ';' */,
523
+ { startIndex: 132, type: '' },
524
+ { startIndex: 135, type: 'attribute.name.scss' } /* 'font:' */,
525
+ { startIndex: 140, type: '' },
526
+ { startIndex: 141, type: 'meta.scss' } /* '#{' */,
527
+ {
528
+ startIndex: 143,
529
+ type: 'variable.ref.scss'
530
+ } /* '$font-size' */,
531
+ { startIndex: 153, type: 'meta.scss' } /* '}' */,
532
+ { startIndex: 154, type: 'operator.scss' } /* '/' */,
533
+ { startIndex: 155, type: 'meta.scss' } /* '#{' */,
534
+ {
535
+ startIndex: 157,
536
+ type: 'variable.ref.scss'
537
+ } /* '$line-height' */,
538
+ { startIndex: 169, type: 'meta.scss' } /* '}' */,
539
+ { startIndex: 170, type: 'delimiter.scss' } /* ';' */,
540
+ { startIndex: 171, type: '' },
541
+ { startIndex: 172, type: 'delimiter.curly.scss' } /* '}' */,
542
+ { startIndex: 173, type: '' },
543
+ { startIndex: 174, type: 'variable.decl.scss' } /* '$name:' */,
544
+ { startIndex: 180, type: '' },
545
+ { startIndex: 181, type: 'attribute.value.scss' } /* 'foo' */,
546
+ { startIndex: 184, type: 'delimiter.scss' } /* ';' */,
547
+ { startIndex: 185, type: '' },
548
+ { startIndex: 186, type: 'variable.decl.scss' } /* '$attr:' */,
549
+ { startIndex: 192, type: '' },
550
+ {
551
+ startIndex: 193,
552
+ type: 'attribute.value.scss'
553
+ } /* 'border' */,
554
+ { startIndex: 199, type: 'delimiter.scss' } /* ';' */,
555
+ { startIndex: 200, type: '' },
556
+ { startIndex: 201, type: 'tag.scss' } /* 'p.' */,
557
+ { startIndex: 203, type: 'meta.scss' } /* '#{' */,
558
+ { startIndex: 205, type: 'variable.ref.scss' } /* '$name' */,
559
+ { startIndex: 210, type: 'meta.scss' } /* '}' */,
560
+ { startIndex: 211, type: '' },
561
+ { startIndex: 212, type: 'delimiter.curly.scss' } /* '{' */,
562
+ { startIndex: 213, type: '' },
563
+ { startIndex: 216, type: 'meta.scss' } /* '#{' */,
564
+ { startIndex: 218, type: 'variable.ref.scss' } /* '$attr' */,
565
+ { startIndex: 223, type: 'meta.scss' } /* '}' */,
566
+ {
567
+ startIndex: 224,
568
+ type: 'attribute.name.scss'
569
+ } /* '-color:' */,
570
+ { startIndex: 231, type: '' },
571
+ { startIndex: 232, type: 'attribute.value.scss' } /* 'blue' */,
572
+ { startIndex: 236, type: 'delimiter.scss' } /* ';' */,
573
+ { startIndex: 237, type: '' },
574
+ { startIndex: 238, type: 'delimiter.curly.scss' } /* '}' */
575
+ ]
576
+ }
577
+ ],
578
+
579
+ // Variable declaration with whitespaces
580
+ [
581
+ {
582
+ line:
583
+ '/* Set the color of your colum*/\n' +
584
+ '$grid-background-column-color : rgba(100, 100, 225, 0.25) !default;',
585
+ tokens: [
586
+ {
587
+ startIndex: 0,
588
+ type: 'comment.scss'
589
+ } /* '// Set the color of your columns' */,
590
+ { startIndex: 32, type: '' },
591
+ {
592
+ startIndex: 33,
593
+ type: 'variable.decl.scss'
594
+ } /* '$grid-background-column-color :' */,
595
+ { startIndex: 68, type: '' },
596
+ { startIndex: 69, type: 'meta.scss' } /* 'rgba(' */,
597
+ { startIndex: 74, type: 'number.scss' } /* '100' */,
598
+ { startIndex: 77, type: 'delimiter.scss' } /* ',' */,
599
+ { startIndex: 78, type: '' },
600
+ { startIndex: 79, type: 'number.scss' } /* '100' */,
601
+ { startIndex: 82, type: 'delimiter.scss' } /* ',' */,
602
+ { startIndex: 83, type: '' },
603
+ { startIndex: 84, type: 'number.scss' } /* '225' */,
604
+ { startIndex: 87, type: 'delimiter.scss' } /* ',' */,
605
+ { startIndex: 88, type: '' },
606
+ { startIndex: 89, type: 'number.scss' } /* '0.25' */,
607
+ { startIndex: 93, type: 'meta.scss' } /* ')' */,
608
+ { startIndex: 94, type: '' },
609
+ { startIndex: 97, type: 'literal.scss' } /* '!default' */,
610
+ { startIndex: 105, type: 'delimiter.scss' } /* ';' */
611
+ ]
612
+ }
613
+ ],
614
+
615
+ // Operationswhitespaces
616
+ [
617
+ {
618
+ line:
619
+ 'p {\n' +
620
+ ' width: (1em + 2em) * 3;\n' +
621
+ ' color: #010203 + #040506;\n' +
622
+ ' font-family: sans- + "serif";\n' +
623
+ ' margin: 3px + 4px auto;\n' +
624
+ ' content: "I ate #{5 + 10} pies!";\n' +
625
+ ' color: hsl(0, 100%, 50%);\n' +
626
+ ' color: hsl($hue: 0, $saturation: 100%, $lightness: 50%);\n' +
627
+ '}',
628
+ tokens: [
629
+ { startIndex: 0, type: 'tag.scss' } /* 'p' */,
630
+ { startIndex: 1, type: '' },
631
+ { startIndex: 2, type: 'delimiter.curly.scss' } /* '{' */,
632
+ { startIndex: 3, type: '' },
633
+ { startIndex: 6, type: 'attribute.name.scss' } /* 'width:' */,
634
+ { startIndex: 12, type: '' },
635
+ {
636
+ startIndex: 13,
637
+ type: 'delimiter.parenthesis.scss'
638
+ } /* '(' */,
639
+ { startIndex: 14, type: 'number.scss' } /* '1em' */,
640
+ { startIndex: 17, type: '' },
641
+ { startIndex: 18, type: 'operator.scss' } /* '+' */,
642
+ { startIndex: 19, type: '' },
643
+ { startIndex: 20, type: 'number.scss' } /* '2em' */,
644
+ {
645
+ startIndex: 23,
646
+ type: 'delimiter.parenthesis.scss'
647
+ } /* ')' */,
648
+ { startIndex: 24, type: '' },
649
+ { startIndex: 25, type: 'operator.scss' } /* '*' */,
650
+ { startIndex: 26, type: '' },
651
+ { startIndex: 27, type: 'number.scss' } /* '3' */,
652
+ { startIndex: 28, type: 'delimiter.scss' } /* ';' */,
653
+ { startIndex: 29, type: '' },
654
+ { startIndex: 32, type: 'attribute.name.scss' } /* 'color:' */,
655
+ { startIndex: 38, type: '' },
656
+ { startIndex: 39, type: 'number.hex.scss' } /* '#010203' */,
657
+ { startIndex: 46, type: '' },
658
+ { startIndex: 47, type: 'operator.scss' } /* '+' */,
659
+ { startIndex: 48, type: '' },
660
+ { startIndex: 49, type: 'number.hex.scss' } /* '#040506' */,
661
+ { startIndex: 56, type: 'delimiter.scss' } /* ';' */,
662
+ { startIndex: 57, type: '' },
663
+ {
664
+ startIndex: 60,
665
+ type: 'attribute.name.scss'
666
+ } /* 'font-family:' */,
667
+ { startIndex: 72, type: '' },
668
+ { startIndex: 73, type: 'attribute.value.scss' } /* 'sans-' */,
669
+ { startIndex: 78, type: '' },
670
+ { startIndex: 79, type: 'operator.scss' } /* '+' */,
671
+ { startIndex: 80, type: '' },
672
+ { startIndex: 81, type: 'string.delimiter.scss' } /* '"' */,
673
+ { startIndex: 82, type: 'string.scss' } /* 'serif' */,
674
+ { startIndex: 87, type: 'string.delimiter.scss' } /* '"' */,
675
+ { startIndex: 88, type: 'delimiter.scss' } /* ';' */,
676
+ { startIndex: 89, type: '' },
677
+ { startIndex: 92, type: 'attribute.name.scss' } /* 'margin:' */,
678
+ { startIndex: 99, type: '' },
679
+ { startIndex: 100, type: 'number.scss' } /* '3px' */,
680
+ { startIndex: 103, type: '' },
681
+ { startIndex: 104, type: 'operator.scss' } /* '+' */,
682
+ { startIndex: 105, type: '' },
683
+ { startIndex: 106, type: 'number.scss' } /* '4px' */,
684
+ { startIndex: 109, type: '' },
685
+ { startIndex: 110, type: 'attribute.value.scss' } /* 'auto' */,
686
+ { startIndex: 114, type: 'delimiter.scss' } /* ';' */,
687
+ { startIndex: 115, type: '' },
688
+ {
689
+ startIndex: 118,
690
+ type: 'attribute.name.scss'
691
+ } /* 'content:' */,
692
+ { startIndex: 126, type: '' },
693
+ { startIndex: 127, type: 'string.delimiter.scss' } /* '"' */,
694
+ {
695
+ startIndex: 128,
696
+ type: 'string.scss'
697
+ } /* 'I ate #{5 + 10} pies!' */,
698
+ { startIndex: 149, type: 'string.delimiter.scss' } /* '"' */,
699
+ { startIndex: 150, type: 'delimiter.scss' } /* ';' */,
700
+ { startIndex: 151, type: '' },
701
+ { startIndex: 154, type: 'attribute.name.scss' } /* 'color:' */,
702
+ { startIndex: 160, type: '' },
703
+ { startIndex: 161, type: 'meta.scss' } /* 'hsl(' */,
704
+ { startIndex: 165, type: 'number.scss' } /* '0' */,
705
+ { startIndex: 166, type: 'delimiter.scss' } /* ',' */,
706
+ { startIndex: 167, type: '' },
707
+ { startIndex: 168, type: 'number.scss' } /* '100%' */,
708
+ { startIndex: 172, type: 'delimiter.scss' } /* ',' */,
709
+ { startIndex: 173, type: '' },
710
+ { startIndex: 174, type: 'number.scss' } /* '50%' */,
711
+ { startIndex: 177, type: 'meta.scss' } /* ')' */,
712
+ { startIndex: 178, type: 'delimiter.scss' } /* ';' */,
713
+ { startIndex: 179, type: '' },
714
+ { startIndex: 182, type: 'attribute.name.scss' } /* 'color:' */,
715
+ { startIndex: 188, type: '' },
716
+ { startIndex: 189, type: 'meta.scss' } /* 'hsl(' */,
717
+ { startIndex: 193, type: 'attribute.name.scss' } /* '$hue:' */,
718
+ { startIndex: 198, type: '' },
719
+ { startIndex: 199, type: 'number.scss' } /* '0' */,
720
+ { startIndex: 200, type: 'delimiter.scss' } /* ',' */,
721
+ { startIndex: 201, type: '' },
722
+ {
723
+ startIndex: 202,
724
+ type: 'attribute.name.scss'
725
+ } /* '$saturation:' */,
726
+ { startIndex: 214, type: '' },
727
+ { startIndex: 215, type: 'number.scss' } /* '100%' */,
728
+ { startIndex: 219, type: 'delimiter.scss' } /* ',' */,
729
+ { startIndex: 220, type: '' },
730
+ {
731
+ startIndex: 221,
732
+ type: 'attribute.name.scss'
733
+ } /* '$lightness:' */,
734
+ { startIndex: 232, type: '' },
735
+ { startIndex: 233, type: 'number.scss' } /* '50%' */,
736
+ { startIndex: 236, type: 'meta.scss' } /* ')' */,
737
+ { startIndex: 237, type: 'delimiter.scss' } /* ';' */,
738
+ { startIndex: 238, type: '' },
739
+ { startIndex: 239, type: 'delimiter.curly.scss' } /* '}' */
740
+ ]
741
+ }
742
+ ],
743
+
744
+ // Functionwhitespaces
745
+ [
746
+ {
747
+ line:
748
+ '$grid-width: 40px;\n' +
749
+ '$gutter-width: 10px;\n' +
750
+ '@function grid-width($n) {\n' +
751
+ ' @return $n * $grid-width + ($n - 1) * $gutter-width;\n' +
752
+ '}\n' +
753
+ '#sidebar { width: grid-width(5); }',
754
+ tokens: [
755
+ {
756
+ startIndex: 0,
757
+ type: 'variable.decl.scss'
758
+ } /* '$grid-width:' */,
759
+ { startIndex: 12, type: '' },
760
+ { startIndex: 13, type: 'number.scss' } /* '40px' */,
761
+ { startIndex: 17, type: 'delimiter.scss' } /* ';' */,
762
+ { startIndex: 18, type: '' },
763
+ {
764
+ startIndex: 19,
765
+ type: 'variable.decl.scss'
766
+ } /* '$gutter-width:' */,
767
+ { startIndex: 33, type: '' },
768
+ { startIndex: 34, type: 'number.scss' } /* '10px' */,
769
+ { startIndex: 38, type: 'delimiter.scss' } /* ';' */,
770
+ { startIndex: 39, type: '' },
771
+ { startIndex: 40, type: 'keyword.scss' } /* '@function' */,
772
+ { startIndex: 49, type: '' },
773
+ { startIndex: 50, type: 'meta.scss' } /* 'grid-width(' */,
774
+ { startIndex: 61, type: 'variable.ref.scss' } /* '$n' */,
775
+ { startIndex: 63, type: 'meta.scss' } /* ')' */,
776
+ { startIndex: 64, type: '' },
777
+ { startIndex: 65, type: 'delimiter.curly.scss' } /* '{' */,
778
+ { startIndex: 66, type: '' },
779
+ { startIndex: 69, type: 'keyword.scss' } /* '@return' */,
780
+ { startIndex: 76, type: '' },
781
+ { startIndex: 77, type: 'variable.ref.scss' } /* '$n' */,
782
+ { startIndex: 79, type: '' },
783
+ { startIndex: 80, type: 'operator.scss' } /* '*' */,
784
+ { startIndex: 81, type: '' },
785
+ {
786
+ startIndex: 82,
787
+ type: 'variable.ref.scss'
788
+ } /* '$grid-width' */,
789
+ { startIndex: 93, type: '' },
790
+ { startIndex: 94, type: 'operator.scss' } /* '+' */,
791
+ { startIndex: 95, type: '' },
792
+ {
793
+ startIndex: 96,
794
+ type: 'delimiter.parenthesis.scss'
795
+ } /* '(' */,
796
+ { startIndex: 97, type: 'variable.ref.scss' } /* '$n' */,
797
+ { startIndex: 99, type: '' },
798
+ { startIndex: 100, type: 'operator.scss' } /* '-' */,
799
+ { startIndex: 101, type: '' },
800
+ { startIndex: 102, type: 'number.scss' } /* '1' */,
801
+ {
802
+ startIndex: 103,
803
+ type: 'delimiter.parenthesis.scss'
804
+ } /* ')' */,
805
+ { startIndex: 104, type: '' },
806
+ { startIndex: 105, type: 'operator.scss' } /* '*' */,
807
+ { startIndex: 106, type: '' },
808
+ {
809
+ startIndex: 107,
810
+ type: 'variable.ref.scss'
811
+ } /* '$gutter-width' */,
812
+ { startIndex: 120, type: 'delimiter.scss' } /* ';' */,
813
+ { startIndex: 121, type: '' },
814
+ { startIndex: 122, type: 'delimiter.curly.scss' } /* '}' */,
815
+ { startIndex: 123, type: '' },
816
+ { startIndex: 124, type: 'tag.scss' } /* '#sidebar' */,
817
+ { startIndex: 132, type: '' },
818
+ { startIndex: 133, type: 'delimiter.curly.scss' } /* '{' */,
819
+ { startIndex: 134, type: '' },
820
+ { startIndex: 135, type: 'attribute.name.scss' } /* 'width:' */,
821
+ { startIndex: 141, type: '' },
822
+ { startIndex: 142, type: 'meta.scss' } /* 'grid-width(' */,
823
+ { startIndex: 153, type: 'number.scss' } /* '5' */,
824
+ { startIndex: 154, type: 'meta.scss' } /* ')' */,
825
+ { startIndex: 155, type: 'delimiter.scss' } /* ';' */,
826
+ { startIndex: 156, type: '' },
827
+ { startIndex: 157, type: 'delimiter.curly.scss' } /* '}' */
828
+ ]
829
+ }
830
+ ],
831
+
832
+ // Importswhitespaces
833
+ [
834
+ {
835
+ line:
836
+ '@import "foo.scss";\n' +
837
+ '$family: unquote("Droid+Sans");\n' +
838
+ '@import "rounded-corners" url("http://fonts.googleapis.com/css?family=#{$family}");\n' +
839
+ '#main {\n' +
840
+ ' @import "example";\n' +
841
+ '}',
842
+ tokens: [
843
+ { startIndex: 0, type: 'keyword.scss' } /* '@import' */,
844
+ { startIndex: 7, type: '' },
845
+ { startIndex: 8, type: 'string.delimiter.scss' } /* '"' */,
846
+ { startIndex: 9, type: 'string.scss' } /* 'foo.scss' */,
847
+ { startIndex: 17, type: 'string.delimiter.scss' } /* '"' */,
848
+ { startIndex: 18, type: 'delimiter.scss' } /* ';' */,
849
+ { startIndex: 19, type: '' },
850
+ { startIndex: 20, type: 'variable.decl.scss' } /* '$family:' */,
851
+ { startIndex: 28, type: '' },
852
+ { startIndex: 29, type: 'meta.scss' } /* 'unquote(' */,
853
+ { startIndex: 37, type: 'string.delimiter.scss' } /* '"' */,
854
+ { startIndex: 38, type: 'string.scss' } /* 'Droid+Sans' */,
855
+ { startIndex: 48, type: 'string.delimiter.scss' } /* '"' */,
856
+ { startIndex: 49, type: 'meta.scss' } /* ')' */,
857
+ { startIndex: 50, type: 'delimiter.scss' } /* ';' */,
858
+ { startIndex: 51, type: '' },
859
+ { startIndex: 52, type: 'keyword.scss' } /* '@import' */,
860
+ { startIndex: 59, type: '' },
861
+ { startIndex: 60, type: 'string.delimiter.scss' } /* '"' */,
862
+ { startIndex: 61, type: 'string.scss' } /* 'rounded-corners' */,
863
+ { startIndex: 76, type: 'string.delimiter.scss' } /* '"' */,
864
+ { startIndex: 77, type: '' },
865
+ { startIndex: 78, type: 'meta.scss' } /* 'url(' */,
866
+ { startIndex: 82, type: 'string.delimiter.scss' } /* '"' */,
867
+ {
868
+ startIndex: 83,
869
+ type: 'string.scss'
870
+ } /* 'http://fonts.googleapis.com/css?family=#{$family}' */,
871
+ { startIndex: 132, type: 'string.delimiter.scss' } /* '"' */,
872
+ { startIndex: 133, type: 'meta.scss' } /* ')' */,
873
+ { startIndex: 134, type: 'delimiter.scss' } /* ';' */,
874
+ { startIndex: 135, type: '' },
875
+ { startIndex: 136, type: 'tag.scss' } /* '#main' */,
876
+ { startIndex: 141, type: '' },
877
+ { startIndex: 142, type: 'delimiter.curly.scss' } /* '{' */,
878
+ { startIndex: 143, type: '' },
879
+ { startIndex: 146, type: 'keyword.scss' } /* '@import' */,
880
+ { startIndex: 153, type: '' },
881
+ { startIndex: 154, type: 'string.delimiter.scss' } /* '"' */,
882
+ { startIndex: 155, type: 'string.scss' } /* 'example' */,
883
+ { startIndex: 162, type: 'string.delimiter.scss' } /* '"' */,
884
+ { startIndex: 163, type: 'delimiter.scss' } /* ';' */,
885
+ { startIndex: 164, type: '' },
886
+ { startIndex: 165, type: 'delimiter.curly.scss' } /* '}' */
887
+ ]
888
+ }
889
+ ],
890
+
891
+ // Mediawhitespaces
892
+ [
893
+ {
894
+ line:
895
+ '.sidebar {\n' +
896
+ ' width: 300px;\n' +
897
+ ' @media screen and (orientation: landscape) {\n' +
898
+ ' width: 500px;\n' +
899
+ ' }\n' +
900
+ '}',
901
+ tokens: [
902
+ { startIndex: 0, type: 'tag.scss' } /* '.sidebar' */,
903
+ { startIndex: 8, type: '' },
904
+ { startIndex: 9, type: 'delimiter.curly.scss' } /* '{' */,
905
+ { startIndex: 10, type: '' },
906
+ { startIndex: 13, type: 'attribute.name.scss' } /* 'width:' */,
907
+ { startIndex: 19, type: '' },
908
+ { startIndex: 20, type: 'number.scss' } /* '300px' */,
909
+ { startIndex: 25, type: 'delimiter.scss' } /* ';' */,
910
+ { startIndex: 26, type: '' },
911
+ { startIndex: 29, type: 'keyword.flow.scss' } /* '@media' */,
912
+ { startIndex: 35, type: '' },
913
+ { startIndex: 36, type: 'attribute.value.scss' } /* 'screen' */,
914
+ { startIndex: 42, type: '' },
915
+ { startIndex: 43, type: 'operator.scss' } /* 'and' */,
916
+ { startIndex: 46, type: '' },
917
+ {
918
+ startIndex: 47,
919
+ type: 'delimiter.parenthesis.scss'
920
+ } /* '(' */,
921
+ {
922
+ startIndex: 48,
923
+ type: 'attribute.value.scss'
924
+ } /* 'orientation' */,
925
+ { startIndex: 59, type: '' },
926
+ {
927
+ startIndex: 61,
928
+ type: 'attribute.value.scss'
929
+ } /* 'landscape' */,
930
+ {
931
+ startIndex: 70,
932
+ type: 'delimiter.parenthesis.scss'
933
+ } /* ')' */,
934
+ { startIndex: 71, type: '' },
935
+ { startIndex: 72, type: 'delimiter.curly.scss' } /* '{' */,
936
+ { startIndex: 73, type: '' },
937
+ { startIndex: 78, type: 'attribute.name.scss' } /* 'width:' */,
938
+ { startIndex: 84, type: '' },
939
+ { startIndex: 85, type: 'number.scss' } /* '500px' */,
940
+ { startIndex: 90, type: 'delimiter.scss' } /* ';' */,
941
+ { startIndex: 91, type: '' },
942
+ { startIndex: 94, type: 'delimiter.curly.scss' } /* '}' */,
943
+ { startIndex: 95, type: '' },
944
+ { startIndex: 96, type: 'delimiter.curly.scss' } /* '}' */
945
+ ]
946
+ }
947
+ ],
948
+
949
+ // Extendwhitespaces
950
+ [
951
+ {
952
+ line:
953
+ '.error {\n' +
954
+ ' border: 1px #f00;\n' +
955
+ ' background-color: #fdd;\n' +
956
+ '}\n' +
957
+ '.seriousError {\n' +
958
+ ' @extend .error;\n' +
959
+ ' border-width: 3px;\n' +
960
+ '}\n' +
961
+ '#context a%extreme {\n' +
962
+ ' color: blue;\n' +
963
+ ' font-weight: bold;\n' +
964
+ ' font-size: 2em;\n' +
965
+ '}\n' +
966
+ '.notice {\n' +
967
+ ' @extend %extreme !optional;\n' +
968
+ '}',
969
+ tokens: [
970
+ { startIndex: 0, type: 'tag.scss' } /* '.error' */,
971
+ { startIndex: 6, type: '' },
972
+ { startIndex: 7, type: 'delimiter.curly.scss' } /* '{' */,
973
+ { startIndex: 8, type: '' },
974
+ { startIndex: 11, type: 'attribute.name.scss' } /* 'border:' */,
975
+ { startIndex: 18, type: '' },
976
+ { startIndex: 19, type: 'number.scss' } /* '1px' */,
977
+ { startIndex: 22, type: '' },
978
+ { startIndex: 23, type: 'number.hex.scss' } /* '#f00' */,
979
+ { startIndex: 27, type: 'delimiter.scss' } /* ';' */,
980
+ { startIndex: 28, type: '' },
981
+ {
982
+ startIndex: 31,
983
+ type: 'attribute.name.scss'
984
+ } /* 'background-color:' */,
985
+ { startIndex: 48, type: '' },
986
+ { startIndex: 49, type: 'number.hex.scss' } /* '#fdd' */,
987
+ { startIndex: 53, type: 'delimiter.scss' } /* ';' */,
988
+ { startIndex: 54, type: '' },
989
+ { startIndex: 55, type: 'delimiter.curly.scss' } /* '}' */,
990
+ { startIndex: 56, type: '' },
991
+ { startIndex: 57, type: 'tag.scss' } /* '.seriousError' */,
992
+ { startIndex: 70, type: '' },
993
+ { startIndex: 71, type: 'delimiter.curly.scss' } /* '{' */,
994
+ { startIndex: 72, type: '' },
995
+ { startIndex: 75, type: 'keyword.scss' } /* '@extend' */,
996
+ { startIndex: 82, type: '' },
997
+ { startIndex: 83, type: 'tag.scss' } /* '.error' */,
998
+ { startIndex: 89, type: 'delimiter.scss' } /* ';' */,
999
+ { startIndex: 90, type: '' },
1000
+ {
1001
+ startIndex: 93,
1002
+ type: 'attribute.name.scss'
1003
+ } /* 'border-width:' */,
1004
+ { startIndex: 106, type: '' },
1005
+ { startIndex: 107, type: 'number.scss' } /* '3px' */,
1006
+ { startIndex: 110, type: 'delimiter.scss' } /* ';' */,
1007
+ { startIndex: 111, type: '' },
1008
+ { startIndex: 112, type: 'delimiter.curly.scss' } /* '}' */,
1009
+ { startIndex: 113, type: '' },
1010
+ { startIndex: 114, type: 'tag.scss' } /* '#context' */,
1011
+ { startIndex: 122, type: '' },
1012
+ { startIndex: 123, type: 'tag.scss' } /* 'a%extreme' */,
1013
+ { startIndex: 132, type: '' },
1014
+ { startIndex: 133, type: 'delimiter.curly.scss' } /* '{' */,
1015
+ { startIndex: 134, type: '' },
1016
+ { startIndex: 137, type: 'attribute.name.scss' } /* 'color:' */,
1017
+ { startIndex: 143, type: '' },
1018
+ { startIndex: 144, type: 'attribute.value.scss' } /* 'blue' */,
1019
+ { startIndex: 148, type: 'delimiter.scss' } /* ';' */,
1020
+ { startIndex: 149, type: '' },
1021
+ {
1022
+ startIndex: 152,
1023
+ type: 'attribute.name.scss'
1024
+ } /* 'font-weight:' */,
1025
+ { startIndex: 164, type: '' },
1026
+ { startIndex: 165, type: 'attribute.value.scss' } /* 'bold' */,
1027
+ { startIndex: 169, type: 'delimiter.scss' } /* ';' */,
1028
+ { startIndex: 170, type: '' },
1029
+ {
1030
+ startIndex: 173,
1031
+ type: 'attribute.name.scss'
1032
+ } /* 'font-size:' */,
1033
+ { startIndex: 183, type: '' },
1034
+ { startIndex: 184, type: 'number.scss' } /* '2em' */,
1035
+ { startIndex: 187, type: 'delimiter.scss' } /* ';' */,
1036
+ { startIndex: 188, type: '' },
1037
+ { startIndex: 189, type: 'delimiter.curly.scss' } /* '}' */,
1038
+ { startIndex: 190, type: '' },
1039
+ { startIndex: 191, type: 'tag.scss' } /* '.notice' */,
1040
+ { startIndex: 198, type: '' },
1041
+ { startIndex: 199, type: 'delimiter.curly.scss' } /* '{' */,
1042
+ { startIndex: 200, type: '' },
1043
+ { startIndex: 203, type: 'keyword.scss' } /* '@extend' */,
1044
+ { startIndex: 210, type: '' },
1045
+ { startIndex: 211, type: 'tag.scss' } /* '%extreme' */,
1046
+ { startIndex: 219, type: '' },
1047
+ { startIndex: 220, type: 'literal.scss' } /* '!optional' */,
1048
+ { startIndex: 229, type: 'delimiter.scss' } /* ';' */,
1049
+ { startIndex: 230, type: '' },
1050
+ { startIndex: 231, type: 'delimiter.curly.scss' } /* '}' */
1051
+ ]
1052
+ }
1053
+ ],
1054
+
1055
+ // @debug and @warnwhitespaces
1056
+ [
1057
+ {
1058
+ line:
1059
+ '@debug 10em + 12em;\n' +
1060
+ '@mixin adjust-location($x, $y) {\n' +
1061
+ ' @if unitless($x) {\n' +
1062
+ ' @warn "Assuming #{$x} to be in pixels";\n' +
1063
+ ' $x: 1px * $x;\n' +
1064
+ ' }\n' +
1065
+ ' @if unitless($y) {\n' +
1066
+ ' @warn "Assuming #{$y} to be in pixels";\n' +
1067
+ ' $y: 1px * $y;\n' +
1068
+ ' }\n' +
1069
+ ' position: relative; left: $x; top: $y;\n' +
1070
+ '}',
1071
+ tokens: [
1072
+ { startIndex: 0, type: 'keyword.scss' } /* '@debug' */,
1073
+ { startIndex: 6, type: '' },
1074
+ { startIndex: 7, type: 'number.scss' } /* '10em' */,
1075
+ { startIndex: 11, type: '' },
1076
+ { startIndex: 12, type: 'operator.scss' } /* '+' */,
1077
+ { startIndex: 13, type: '' },
1078
+ { startIndex: 14, type: 'number.scss' } /* '12em' */,
1079
+ { startIndex: 18, type: 'delimiter.scss' } /* ';' */,
1080
+ { startIndex: 19, type: '' },
1081
+ { startIndex: 20, type: 'keyword.scss' } /* '@mixin' */,
1082
+ { startIndex: 26, type: '' },
1083
+ { startIndex: 27, type: 'meta.scss' } /* 'adjust-location(' */,
1084
+ { startIndex: 43, type: 'variable.ref.scss' } /* '$x' */,
1085
+ { startIndex: 45, type: 'delimiter.scss' } /* ',' */,
1086
+ { startIndex: 46, type: '' },
1087
+ { startIndex: 47, type: 'variable.ref.scss' } /* '$y' */,
1088
+ { startIndex: 49, type: 'meta.scss' } /* ')' */,
1089
+ { startIndex: 50, type: '' },
1090
+ { startIndex: 51, type: 'delimiter.curly.scss' } /* '{' */,
1091
+ { startIndex: 52, type: '' },
1092
+ { startIndex: 55, type: 'keyword.flow.scss' } /* '@if' */,
1093
+ { startIndex: 58, type: '' },
1094
+ { startIndex: 59, type: 'meta.scss' } /* 'unitless(' */,
1095
+ { startIndex: 68, type: 'variable.ref.scss' } /* '$x' */,
1096
+ { startIndex: 70, type: 'meta.scss' } /* ')' */,
1097
+ { startIndex: 71, type: '' },
1098
+ { startIndex: 72, type: 'delimiter.curly.scss' } /* '{' */,
1099
+ { startIndex: 73, type: '' },
1100
+ { startIndex: 78, type: 'keyword.scss' } /* '@warn' */,
1101
+ { startIndex: 83, type: '' },
1102
+ { startIndex: 84, type: 'string.delimiter.scss' } /* '"' */,
1103
+ {
1104
+ startIndex: 85,
1105
+ type: 'string.scss'
1106
+ } /* 'Assuming #{$x} to be in pixels' */,
1107
+ { startIndex: 115, type: 'string.delimiter.scss' } /* '"' */,
1108
+ { startIndex: 116, type: 'delimiter.scss' } /* ';' */,
1109
+ { startIndex: 117, type: '' },
1110
+ { startIndex: 122, type: 'variable.decl.scss' } /* '$x:' */,
1111
+ { startIndex: 125, type: '' },
1112
+ { startIndex: 126, type: 'number.scss' } /* '1px' */,
1113
+ { startIndex: 129, type: '' },
1114
+ { startIndex: 130, type: 'operator.scss' } /* '*' */,
1115
+ { startIndex: 131, type: '' },
1116
+ { startIndex: 132, type: 'variable.ref.scss' } /* '$x' */,
1117
+ { startIndex: 134, type: 'delimiter.scss' } /* ';' */,
1118
+ { startIndex: 135, type: '' },
1119
+ { startIndex: 138, type: 'delimiter.curly.scss' } /* '}' */,
1120
+ { startIndex: 139, type: '' },
1121
+ { startIndex: 142, type: 'keyword.flow.scss' } /* '@if' */,
1122
+ { startIndex: 145, type: '' },
1123
+ { startIndex: 146, type: 'meta.scss' } /* 'unitless(' */,
1124
+ { startIndex: 155, type: 'variable.ref.scss' } /* '$y' */,
1125
+ { startIndex: 157, type: 'meta.scss' } /* ')' */,
1126
+ { startIndex: 158, type: '' },
1127
+ { startIndex: 159, type: 'delimiter.curly.scss' } /* '{' */,
1128
+ { startIndex: 160, type: '' },
1129
+ { startIndex: 165, type: 'keyword.scss' } /* '@warn' */,
1130
+ { startIndex: 170, type: '' },
1131
+ { startIndex: 171, type: 'string.delimiter.scss' } /* '"' */,
1132
+ {
1133
+ startIndex: 172,
1134
+ type: 'string.scss'
1135
+ } /* 'Assuming #{$y} to be in pixels' */,
1136
+ { startIndex: 202, type: 'string.delimiter.scss' } /* '"' */,
1137
+ { startIndex: 203, type: 'delimiter.scss' } /* ';' */,
1138
+ { startIndex: 204, type: '' },
1139
+ { startIndex: 209, type: 'variable.decl.scss' } /* '$y:' */,
1140
+ { startIndex: 212, type: '' },
1141
+ { startIndex: 213, type: 'number.scss' } /* '1px' */,
1142
+ { startIndex: 216, type: '' },
1143
+ { startIndex: 217, type: 'operator.scss' } /* '*' */,
1144
+ { startIndex: 218, type: '' },
1145
+ { startIndex: 219, type: 'variable.ref.scss' } /* '$y' */,
1146
+ { startIndex: 221, type: 'delimiter.scss' } /* ';' */,
1147
+ { startIndex: 222, type: '' },
1148
+ { startIndex: 225, type: 'delimiter.curly.scss' } /* '}' */,
1149
+ { startIndex: 226, type: '' },
1150
+ {
1151
+ startIndex: 229,
1152
+ type: 'attribute.name.scss'
1153
+ } /* 'position:' */,
1154
+ { startIndex: 238, type: '' },
1155
+ {
1156
+ startIndex: 239,
1157
+ type: 'attribute.value.scss'
1158
+ } /* 'relative' */,
1159
+ { startIndex: 247, type: 'delimiter.scss' } /* ';' */,
1160
+ { startIndex: 248, type: '' },
1161
+ { startIndex: 249, type: 'attribute.name.scss' } /* 'left:' */,
1162
+ { startIndex: 254, type: '' },
1163
+ { startIndex: 255, type: 'variable.ref.scss' } /* '$x' */,
1164
+ { startIndex: 257, type: 'delimiter.scss' } /* ';' */,
1165
+ { startIndex: 258, type: '' },
1166
+ { startIndex: 259, type: 'attribute.name.scss' } /* 'top:' */,
1167
+ { startIndex: 263, type: '' },
1168
+ { startIndex: 264, type: 'variable.ref.scss' } /* '$y' */,
1169
+ { startIndex: 266, type: 'delimiter.scss' } /* ';' */,
1170
+ { startIndex: 267, type: '' },
1171
+ { startIndex: 268, type: 'delimiter.curly.scss' } /* '}' */
1172
+ ]
1173
+ }
1174
+ ],
1175
+
1176
+ // if statementwhitespaces
1177
+ [
1178
+ {
1179
+ line:
1180
+ 'p {\n' +
1181
+ ' @if 1 + 1 == 2 { border: 1px solid; }\n' +
1182
+ ' @if 5 < 3 { border: 2px dotted; }\n' +
1183
+ ' @if null { border: 3px double; }\n' +
1184
+ '}',
1185
+ tokens: [
1186
+ { startIndex: 0, type: 'tag.scss' } /* 'p' */,
1187
+ { startIndex: 1, type: '' },
1188
+ { startIndex: 2, type: 'delimiter.curly.scss' } /* '{' */,
1189
+ { startIndex: 3, type: '' },
1190
+ { startIndex: 6, type: 'keyword.flow.scss' } /* '@if' */,
1191
+ { startIndex: 9, type: '' },
1192
+ { startIndex: 10, type: 'number.scss' } /* '1' */,
1193
+ { startIndex: 11, type: '' },
1194
+ { startIndex: 12, type: 'operator.scss' } /* '+' */,
1195
+ { startIndex: 13, type: '' },
1196
+ { startIndex: 14, type: 'number.scss' } /* '1' */,
1197
+ { startIndex: 15, type: '' },
1198
+ { startIndex: 16, type: 'operator.scss' } /* '==' */,
1199
+ { startIndex: 18, type: '' },
1200
+ { startIndex: 19, type: 'number.scss' } /* '2' */,
1201
+ { startIndex: 20, type: '' },
1202
+ { startIndex: 21, type: 'delimiter.curly.scss' } /* '{' */,
1203
+ { startIndex: 22, type: '' },
1204
+ { startIndex: 23, type: 'attribute.name.scss' } /* 'border:' */,
1205
+ { startIndex: 30, type: '' },
1206
+ { startIndex: 31, type: 'number.scss' } /* '1px' */,
1207
+ { startIndex: 34, type: '' },
1208
+ { startIndex: 35, type: 'attribute.value.scss' } /* 'solid' */,
1209
+ { startIndex: 40, type: 'delimiter.scss' } /* ';' */,
1210
+ { startIndex: 41, type: '' },
1211
+ { startIndex: 43, type: 'delimiter.curly.scss' } /* '}' */,
1212
+ { startIndex: 44, type: '' },
1213
+ { startIndex: 47, type: 'keyword.flow.scss' } /* '@if' */,
1214
+ { startIndex: 50, type: '' },
1215
+ { startIndex: 51, type: 'number.scss' } /* '5' */,
1216
+ { startIndex: 52, type: '' },
1217
+ { startIndex: 53, type: 'operator.scss' } /* '<' */,
1218
+ { startIndex: 54, type: '' },
1219
+ { startIndex: 55, type: 'number.scss' } /* '3' */,
1220
+ { startIndex: 56, type: '' },
1221
+ { startIndex: 62, type: 'delimiter.curly.scss' } /* '{' */,
1222
+ { startIndex: 63, type: '' },
1223
+ { startIndex: 64, type: 'attribute.name.scss' } /* 'border:' */,
1224
+ { startIndex: 71, type: '' },
1225
+ { startIndex: 72, type: 'number.scss' } /* '2px' */,
1226
+ { startIndex: 75, type: '' },
1227
+ { startIndex: 76, type: 'attribute.value.scss' } /* 'dotted' */,
1228
+ { startIndex: 82, type: 'delimiter.scss' } /* ';' */,
1229
+ { startIndex: 83, type: '' },
1230
+ { startIndex: 84, type: 'delimiter.curly.scss' } /* '}' */,
1231
+ { startIndex: 85, type: '' },
1232
+ { startIndex: 88, type: 'keyword.flow.scss' } /* '@if' */,
1233
+ { startIndex: 91, type: '' },
1234
+ { startIndex: 92, type: 'attribute.value.scss' } /* 'null' */,
1235
+ { startIndex: 96, type: '' },
1236
+ { startIndex: 103, type: 'delimiter.curly.scss' } /* '{' */,
1237
+ { startIndex: 104, type: '' },
1238
+ {
1239
+ startIndex: 105,
1240
+ type: 'attribute.name.scss'
1241
+ } /* 'border:' */,
1242
+ { startIndex: 112, type: '' },
1243
+ { startIndex: 113, type: 'number.scss' } /* '3px' */,
1244
+ { startIndex: 116, type: '' },
1245
+ {
1246
+ startIndex: 117,
1247
+ type: 'attribute.value.scss'
1248
+ } /* 'double' */,
1249
+ { startIndex: 123, type: 'delimiter.scss' } /* ';' */,
1250
+ { startIndex: 124, type: '' },
1251
+ { startIndex: 125, type: 'delimiter.curly.scss' } /* '}' */,
1252
+ { startIndex: 126, type: '' },
1253
+ { startIndex: 127, type: 'delimiter.curly.scss' } /* '}' */
1254
+ ]
1255
+ }
1256
+ ],
1257
+
1258
+ // if-else statementwhitespaces
1259
+ [
1260
+ {
1261
+ line:
1262
+ '$type: monster;\n' +
1263
+ 'p {\n' +
1264
+ ' @if $type == ocean {\n' +
1265
+ ' color: blue;\n' +
1266
+ ' } @else if $type == matador {\n' +
1267
+ ' color: red;\n' +
1268
+ ' } @else {\n' +
1269
+ ' color: black;\n' +
1270
+ ' }\n' +
1271
+ '}',
1272
+ tokens: [
1273
+ { startIndex: 0, type: 'variable.decl.scss' } /* '$type:' */,
1274
+ { startIndex: 6, type: '' },
1275
+ { startIndex: 7, type: 'attribute.value.scss' } /* 'monster' */,
1276
+ { startIndex: 14, type: 'delimiter.scss' } /* ';' */,
1277
+ { startIndex: 15, type: '' },
1278
+ { startIndex: 16, type: 'tag.scss' } /* 'p' */,
1279
+ { startIndex: 17, type: '' },
1280
+ { startIndex: 18, type: 'delimiter.curly.scss' } /* '{' */,
1281
+ { startIndex: 19, type: '' },
1282
+ { startIndex: 22, type: 'keyword.flow.scss' } /* '@if' */,
1283
+ { startIndex: 25, type: '' },
1284
+ { startIndex: 26, type: 'variable.ref.scss' } /* '$type' */,
1285
+ { startIndex: 31, type: '' },
1286
+ { startIndex: 32, type: 'operator.scss' } /* '==' */,
1287
+ { startIndex: 34, type: '' },
1288
+ { startIndex: 35, type: 'attribute.value.scss' } /* 'ocean' */,
1289
+ { startIndex: 40, type: '' },
1290
+ { startIndex: 41, type: 'delimiter.curly.scss' } /* '{' */,
1291
+ { startIndex: 42, type: '' },
1292
+ { startIndex: 47, type: 'attribute.name.scss' } /* 'color:' */,
1293
+ { startIndex: 53, type: '' },
1294
+ { startIndex: 54, type: 'attribute.value.scss' } /* 'blue' */,
1295
+ { startIndex: 58, type: 'delimiter.scss' } /* ';' */,
1296
+ { startIndex: 59, type: '' },
1297
+ { startIndex: 62, type: 'delimiter.curly.scss' } /* '}' */,
1298
+ { startIndex: 63, type: '' },
1299
+ { startIndex: 64, type: 'keyword.flow.scss' } /* '@else' */,
1300
+ { startIndex: 69, type: '' },
1301
+ { startIndex: 70, type: 'keyword.flow.scss' } /* 'if' */,
1302
+ { startIndex: 72, type: '' },
1303
+ { startIndex: 73, type: 'variable.ref.scss' } /* '$type' */,
1304
+ { startIndex: 78, type: '' },
1305
+ { startIndex: 79, type: 'operator.scss' } /* '==' */,
1306
+ { startIndex: 81, type: '' },
1307
+ {
1308
+ startIndex: 82,
1309
+ type: 'attribute.value.scss'
1310
+ } /* 'matador' */,
1311
+ { startIndex: 89, type: '' },
1312
+ { startIndex: 90, type: 'delimiter.curly.scss' } /* '{' */,
1313
+ { startIndex: 91, type: '' },
1314
+ { startIndex: 96, type: 'attribute.name.scss' } /* 'color:' */,
1315
+ { startIndex: 102, type: '' },
1316
+ { startIndex: 103, type: 'attribute.value.scss' } /* 'red' */,
1317
+ { startIndex: 106, type: 'delimiter.scss' } /* ';' */,
1318
+ { startIndex: 107, type: '' },
1319
+ { startIndex: 110, type: 'delimiter.curly.scss' } /* '}' */,
1320
+ { startIndex: 111, type: '' },
1321
+ { startIndex: 112, type: 'keyword.flow.scss' } /* '@else' */,
1322
+ { startIndex: 117, type: '' },
1323
+ { startIndex: 118, type: 'delimiter.curly.scss' } /* '{' */,
1324
+ { startIndex: 119, type: '' },
1325
+ { startIndex: 124, type: 'attribute.name.scss' } /* 'color:' */,
1326
+ { startIndex: 130, type: '' },
1327
+ { startIndex: 131, type: 'attribute.value.scss' } /* 'black' */,
1328
+ { startIndex: 136, type: 'delimiter.scss' } /* ';' */,
1329
+ { startIndex: 137, type: '' },
1330
+ { startIndex: 140, type: 'delimiter.curly.scss' } /* '}' */,
1331
+ { startIndex: 141, type: '' },
1332
+ { startIndex: 142, type: 'delimiter.curly.scss' } /* '}' */
1333
+ ]
1334
+ }
1335
+ ],
1336
+
1337
+ // for statementwhitespaces
1338
+ [
1339
+ {
1340
+ line: '@for $i from 1 through 3 {\n' + ' .item-#{$i} { width: 2em * $i; }\n' + '}',
1341
+ tokens: [
1342
+ { startIndex: 0, type: 'keyword.flow.scss' } /* '@for' */,
1343
+ { startIndex: 4, type: '' },
1344
+ { startIndex: 5, type: 'variable.ref.scss' } /* '$i' */,
1345
+ { startIndex: 7, type: '' },
1346
+ { startIndex: 8, type: 'keyword.flow.scss' } /* 'from' */,
1347
+ { startIndex: 12, type: '' },
1348
+ { startIndex: 13, type: 'number.scss' } /* '1' */,
1349
+ { startIndex: 14, type: '' },
1350
+ { startIndex: 15, type: 'keyword.flow.scss' } /* 'through' */,
1351
+ { startIndex: 22, type: '' },
1352
+ { startIndex: 23, type: 'number.scss' } /* '3' */,
1353
+ { startIndex: 24, type: '' },
1354
+ { startIndex: 25, type: 'delimiter.curly.scss' } /* '{' */,
1355
+ { startIndex: 26, type: '' },
1356
+ { startIndex: 29, type: 'tag.scss' } /* '.item-' */,
1357
+ { startIndex: 35, type: 'meta.scss' } /* '#{' */,
1358
+ { startIndex: 37, type: 'variable.ref.scss' } /* '$i' */,
1359
+ { startIndex: 39, type: 'meta.scss' } /* '}' */,
1360
+ { startIndex: 40, type: '' },
1361
+ { startIndex: 41, type: 'delimiter.curly.scss' } /* '{' */,
1362
+ { startIndex: 42, type: '' },
1363
+ { startIndex: 43, type: 'attribute.name.scss' } /* 'width:' */,
1364
+ { startIndex: 49, type: '' },
1365
+ { startIndex: 50, type: 'number.scss' } /* '2em' */,
1366
+ { startIndex: 53, type: '' },
1367
+ { startIndex: 54, type: 'operator.scss' } /* '*' */,
1368
+ { startIndex: 55, type: '' },
1369
+ { startIndex: 56, type: 'variable.ref.scss' } /* '$i' */,
1370
+ { startIndex: 58, type: 'delimiter.scss' } /* ';' */,
1371
+ { startIndex: 59, type: '' },
1372
+ { startIndex: 60, type: 'delimiter.curly.scss' } /* '}' */,
1373
+ { startIndex: 61, type: '' },
1374
+ { startIndex: 62, type: 'delimiter.curly.scss' } /* '}' */
1375
+ ]
1376
+ }
1377
+ ],
1378
+
1379
+ // each statementwhitespaces
1380
+ [
1381
+ {
1382
+ line:
1383
+ '@each $animal in puma, sea-slug, egret, salamander {\n' +
1384
+ ' .#{$animal}-icon {\n' +
1385
+ " background-image: url('/images/#{$animal}.png');\n" +
1386
+ ' }\n' +
1387
+ '}',
1388
+ tokens: [
1389
+ { startIndex: 0, type: 'keyword.flow.scss' } /* '@each' */,
1390
+ { startIndex: 5, type: '' },
1391
+ { startIndex: 6, type: 'variable.ref.scss' } /* '$animal' */,
1392
+ { startIndex: 13, type: '' },
1393
+ { startIndex: 14, type: 'keyword.flow.scss' } /* 'in' */,
1394
+ { startIndex: 16, type: '' },
1395
+ { startIndex: 17, type: 'attribute.value.scss' } /* 'puma' */,
1396
+ { startIndex: 21, type: 'operator.scss' } /* ',' */,
1397
+ { startIndex: 22, type: '' },
1398
+ {
1399
+ startIndex: 23,
1400
+ type: 'attribute.value.scss'
1401
+ } /* 'sea-slug' */,
1402
+ { startIndex: 31, type: 'operator.scss' } /* ',' */,
1403
+ { startIndex: 32, type: '' },
1404
+ { startIndex: 33, type: 'attribute.value.scss' } /* 'egret' */,
1405
+ { startIndex: 38, type: 'operator.scss' } /* ',' */,
1406
+ { startIndex: 39, type: '' },
1407
+ {
1408
+ startIndex: 40,
1409
+ type: 'attribute.value.scss'
1410
+ } /* 'salamander' */,
1411
+ { startIndex: 50, type: '' },
1412
+ { startIndex: 51, type: 'delimiter.curly.scss' } /* '{' */,
1413
+ { startIndex: 52, type: '' },
1414
+ { startIndex: 55, type: 'tag.scss' } /* '.' */,
1415
+ { startIndex: 56, type: 'meta.scss' } /* '#{' */,
1416
+ { startIndex: 58, type: 'variable.ref.scss' } /* '$animal' */,
1417
+ { startIndex: 65, type: 'meta.scss' } /* '}' */,
1418
+ { startIndex: 66, type: 'tag.scss' } /* '-icon' */,
1419
+ { startIndex: 71, type: '' },
1420
+ { startIndex: 72, type: 'delimiter.curly.scss' } /* '{' */,
1421
+ { startIndex: 73, type: '' },
1422
+ {
1423
+ startIndex: 78,
1424
+ type: 'attribute.name.scss'
1425
+ } /* 'background-image:' */,
1426
+ { startIndex: 95, type: '' },
1427
+ { startIndex: 96, type: 'meta.scss' } /* 'url(' */,
1428
+ { startIndex: 100, type: 'string.delimiter.scss' } /* ''' */,
1429
+ {
1430
+ startIndex: 101,
1431
+ type: 'string.scss'
1432
+ } /* '/images/#{$animal}.png' */,
1433
+ { startIndex: 123, type: 'string.delimiter.scss' } /* ''' */,
1434
+ { startIndex: 124, type: 'meta.scss' } /* ')' */,
1435
+ { startIndex: 125, type: 'delimiter.scss' } /* ';' */,
1436
+ { startIndex: 126, type: '' },
1437
+ { startIndex: 129, type: 'delimiter.curly.scss' } /* '}' */,
1438
+ { startIndex: 130, type: '' },
1439
+ { startIndex: 131, type: 'delimiter.curly.scss' } /* '}' */
1440
+ ]
1441
+ }
1442
+ ],
1443
+
1444
+ // while statementwhitespaces
1445
+ [
1446
+ {
1447
+ line:
1448
+ '$i: 6;\n' +
1449
+ '@while $i > 0 {\n' +
1450
+ ' .item-#{$i} { width: 2em * $i; }\n' +
1451
+ ' $i: $i - 2;\n' +
1452
+ '}',
1453
+ tokens: [
1454
+ { startIndex: 0, type: 'variable.decl.scss' } /* '$i:' */,
1455
+ { startIndex: 3, type: '' },
1456
+ { startIndex: 4, type: 'number.scss' } /* '6' */,
1457
+ { startIndex: 5, type: 'delimiter.scss' } /* ';' */,
1458
+ { startIndex: 6, type: '' },
1459
+ { startIndex: 7, type: 'keyword.flow.scss' } /* '@while' */,
1460
+ { startIndex: 13, type: '' },
1461
+ { startIndex: 14, type: 'variable.ref.scss' } /* '$i' */,
1462
+ { startIndex: 16, type: '' },
1463
+ { startIndex: 17, type: 'operator.scss' } /* '>' */,
1464
+ { startIndex: 18, type: '' },
1465
+ { startIndex: 19, type: 'number.scss' } /* '0' */,
1466
+ { startIndex: 20, type: '' },
1467
+ { startIndex: 21, type: 'delimiter.curly.scss' } /* '{' */,
1468
+ { startIndex: 22, type: '' },
1469
+ { startIndex: 25, type: 'tag.scss' } /* '.item-' */,
1470
+ { startIndex: 31, type: 'meta.scss' } /* '#{' */,
1471
+ { startIndex: 33, type: 'variable.ref.scss' } /* '$i' */,
1472
+ { startIndex: 35, type: 'meta.scss' } /* '}' */,
1473
+ { startIndex: 36, type: '' },
1474
+ { startIndex: 37, type: 'delimiter.curly.scss' } /* '{' */,
1475
+ { startIndex: 38, type: '' },
1476
+ { startIndex: 39, type: 'attribute.name.scss' } /* 'width:' */,
1477
+ { startIndex: 45, type: '' },
1478
+ { startIndex: 46, type: 'number.scss' } /* '2em' */,
1479
+ { startIndex: 49, type: '' },
1480
+ { startIndex: 50, type: 'operator.scss' } /* '*' */,
1481
+ { startIndex: 51, type: '' },
1482
+ { startIndex: 52, type: 'variable.ref.scss' } /* '$i' */,
1483
+ { startIndex: 54, type: 'delimiter.scss' } /* ';' */,
1484
+ { startIndex: 55, type: '' },
1485
+ { startIndex: 56, type: 'delimiter.curly.scss' } /* '}' */,
1486
+ { startIndex: 57, type: '' },
1487
+ { startIndex: 60, type: 'variable.decl.scss' } /* '$i:' */,
1488
+ { startIndex: 63, type: '' },
1489
+ { startIndex: 64, type: 'variable.ref.scss' } /* '$i' */,
1490
+ { startIndex: 66, type: '' },
1491
+ { startIndex: 67, type: 'operator.scss' } /* '-' */,
1492
+ { startIndex: 68, type: '' },
1493
+ { startIndex: 69, type: 'number.scss' } /* '2' */,
1494
+ { startIndex: 70, type: 'delimiter.scss' } /* ';' */,
1495
+ { startIndex: 71, type: '' },
1496
+ { startIndex: 72, type: 'delimiter.curly.scss' } /* '}' */
1497
+ ]
1498
+ }
1499
+ ],
1500
+
1501
+ // Function with control statements nestedwhitespaces
1502
+ [
1503
+ {
1504
+ line:
1505
+ '@function foo($total, $a) {\n' +
1506
+ ' @for $i from 0 to $total {\n' +
1507
+ ' @if (unit($a) == "%") and ($i == ($total - 1)) {\n' +
1508
+ ' $z: 100%;\n' +
1509
+ " @return '1';\n" +
1510
+ ' }\n' +
1511
+ ' }\n' +
1512
+ ' @return $grid;\n' +
1513
+ '}',
1514
+ tokens: [
1515
+ { startIndex: 0, type: 'keyword.scss' } /* '@function' */,
1516
+ { startIndex: 9, type: '' },
1517
+ { startIndex: 10, type: 'meta.scss' } /* 'foo(' */,
1518
+ { startIndex: 14, type: 'variable.ref.scss' } /* '$total' */,
1519
+ { startIndex: 20, type: 'delimiter.scss' } /* ',' */,
1520
+ { startIndex: 21, type: '' },
1521
+ { startIndex: 22, type: 'variable.ref.scss' } /* '$a' */,
1522
+ { startIndex: 24, type: 'meta.scss' } /* ')' */,
1523
+ { startIndex: 25, type: '' },
1524
+ { startIndex: 26, type: 'delimiter.curly.scss' } /* '{' */,
1525
+ { startIndex: 27, type: '' },
1526
+ { startIndex: 30, type: 'keyword.flow.scss' } /* '@for' */,
1527
+ { startIndex: 34, type: '' },
1528
+ { startIndex: 35, type: 'variable.ref.scss' } /* '$i' */,
1529
+ { startIndex: 37, type: '' },
1530
+ { startIndex: 38, type: 'keyword.flow.scss' } /* 'from' */,
1531
+ { startIndex: 42, type: '' },
1532
+ { startIndex: 43, type: 'number.scss' } /* '0' */,
1533
+ { startIndex: 44, type: '' },
1534
+ { startIndex: 45, type: 'keyword.flow.scss' } /* 'to' */,
1535
+ { startIndex: 47, type: '' },
1536
+ { startIndex: 48, type: 'variable.ref.scss' } /* '$total' */,
1537
+ { startIndex: 54, type: '' },
1538
+ { startIndex: 55, type: 'delimiter.curly.scss' } /* '{' */,
1539
+ { startIndex: 56, type: '' },
1540
+ { startIndex: 61, type: 'keyword.flow.scss' } /* '@if' */,
1541
+ { startIndex: 64, type: '' },
1542
+ {
1543
+ startIndex: 65,
1544
+ type: 'delimiter.parenthesis.scss'
1545
+ } /* '(' */,
1546
+ { startIndex: 66, type: 'meta.scss' } /* 'unit(' */,
1547
+ { startIndex: 71, type: 'variable.ref.scss' } /* '$a' */,
1548
+ { startIndex: 73, type: 'meta.scss' } /* ')' */,
1549
+ { startIndex: 74, type: '' },
1550
+ { startIndex: 75, type: 'operator.scss' } /* '==' */,
1551
+ { startIndex: 77, type: '' },
1552
+ { startIndex: 78, type: 'string.delimiter.scss' } /* '"' */,
1553
+ { startIndex: 79, type: 'string.scss' } /* '%' */,
1554
+ { startIndex: 80, type: 'string.delimiter.scss' } /* '"' */,
1555
+ {
1556
+ startIndex: 81,
1557
+ type: 'delimiter.parenthesis.scss'
1558
+ } /* ')' */,
1559
+ { startIndex: 82, type: '' },
1560
+ { startIndex: 83, type: 'operator.scss' } /* 'and' */,
1561
+ { startIndex: 86, type: '' },
1562
+ {
1563
+ startIndex: 87,
1564
+ type: 'delimiter.parenthesis.scss'
1565
+ } /* '(' */,
1566
+ { startIndex: 88, type: 'variable.ref.scss' } /* '$i' */,
1567
+ { startIndex: 90, type: '' },
1568
+ { startIndex: 91, type: 'operator.scss' } /* '==' */,
1569
+ { startIndex: 93, type: '' },
1570
+ {
1571
+ startIndex: 94,
1572
+ type: 'delimiter.parenthesis.scss'
1573
+ } /* '(' */,
1574
+ { startIndex: 95, type: 'variable.ref.scss' } /* '$total' */,
1575
+ { startIndex: 101, type: '' },
1576
+ { startIndex: 102, type: 'operator.scss' } /* '-' */,
1577
+ { startIndex: 103, type: '' },
1578
+ { startIndex: 104, type: 'number.scss' } /* '1' */,
1579
+ {
1580
+ startIndex: 105,
1581
+ type: 'delimiter.parenthesis.scss'
1582
+ } /* ')' */,
1583
+ { startIndex: 107, type: '' },
1584
+ { startIndex: 108, type: 'delimiter.curly.scss' } /* '{' */,
1585
+ { startIndex: 109, type: '' },
1586
+ { startIndex: 116, type: 'variable.decl.scss' } /* '$z:' */,
1587
+ { startIndex: 119, type: '' },
1588
+ { startIndex: 120, type: 'number.scss' } /* '100%' */,
1589
+ { startIndex: 124, type: 'delimiter.scss' } /* ';' */,
1590
+ { startIndex: 125, type: '' },
1591
+ { startIndex: 132, type: 'keyword.scss' } /* '@return' */,
1592
+ { startIndex: 139, type: '' },
1593
+ { startIndex: 140, type: 'string.delimiter.scss' } /* ''' */,
1594
+ { startIndex: 141, type: 'string.scss' } /* '1' */,
1595
+ { startIndex: 142, type: 'string.delimiter.scss' } /* ''' */,
1596
+ { startIndex: 143, type: 'delimiter.scss' } /* ';' */,
1597
+ { startIndex: 144, type: '' },
1598
+ { startIndex: 149, type: 'delimiter.curly.scss' } /* '}' */,
1599
+ { startIndex: 150, type: '' },
1600
+ { startIndex: 153, type: 'delimiter.curly.scss' } /* '}' */,
1601
+ { startIndex: 154, type: '' },
1602
+ { startIndex: 157, type: 'keyword.scss' } /* '@return' */,
1603
+ { startIndex: 164, type: '' },
1604
+ { startIndex: 165, type: 'variable.ref.scss' } /* '$grid' */,
1605
+ { startIndex: 170, type: 'delimiter.scss' } /* ';' */,
1606
+ { startIndex: 171, type: '' },
1607
+ { startIndex: 172, type: 'delimiter.curly.scss' } /* '}' */
1608
+ ]
1609
+ }
1610
+ ],
1611
+
1612
+ // @mixin simplewhitespaces
1613
+ [
1614
+ {
1615
+ line:
1616
+ '@mixin large-text {\n' +
1617
+ ' font: {\n' +
1618
+ ' family: Arial;\n' +
1619
+ ' size: 20px;\n' +
1620
+ ' weight: bold;\n' +
1621
+ ' }\n' +
1622
+ ' color: #ff0000;\n' +
1623
+ '}\n' +
1624
+ '.page-title {\n' +
1625
+ ' @include large-text;\n' +
1626
+ ' padding: 4px;\n' +
1627
+ '}',
1628
+ tokens: [
1629
+ { startIndex: 0, type: 'keyword.scss' } /* '@mixin' */,
1630
+ { startIndex: 6, type: '' },
1631
+ { startIndex: 7, type: 'meta.scss' } /* 'large-text' */,
1632
+ { startIndex: 17, type: '' },
1633
+ { startIndex: 18, type: 'delimiter.curly.scss' } /* '{' */,
1634
+ { startIndex: 19, type: '' },
1635
+ { startIndex: 22, type: 'attribute.name.scss' } /* 'font:' */,
1636
+ { startIndex: 27, type: '' },
1637
+ { startIndex: 28, type: 'delimiter.curly.scss' } /* '{' */,
1638
+ { startIndex: 29, type: '' },
1639
+ { startIndex: 34, type: 'attribute.name.scss' } /* 'family:' */,
1640
+ { startIndex: 41, type: '' },
1641
+ { startIndex: 42, type: 'attribute.value.scss' } /* 'Arial' */,
1642
+ { startIndex: 47, type: 'delimiter.scss' } /* ';' */,
1643
+ { startIndex: 48, type: '' },
1644
+ { startIndex: 53, type: 'attribute.name.scss' } /* 'size:' */,
1645
+ { startIndex: 58, type: '' },
1646
+ { startIndex: 59, type: 'number.scss' } /* '20px' */,
1647
+ { startIndex: 63, type: 'delimiter.scss' } /* ';' */,
1648
+ { startIndex: 64, type: '' },
1649
+ { startIndex: 69, type: 'attribute.name.scss' } /* 'weight:' */,
1650
+ { startIndex: 76, type: '' },
1651
+ { startIndex: 77, type: 'attribute.value.scss' } /* 'bold' */,
1652
+ { startIndex: 81, type: 'delimiter.scss' } /* ';' */,
1653
+ { startIndex: 82, type: '' },
1654
+ { startIndex: 85, type: 'delimiter.curly.scss' } /* '}' */,
1655
+ { startIndex: 86, type: '' },
1656
+ { startIndex: 89, type: 'attribute.name.scss' } /* 'color:' */,
1657
+ { startIndex: 95, type: '' },
1658
+ { startIndex: 96, type: 'number.hex.scss' } /* '#ff0000' */,
1659
+ { startIndex: 103, type: 'delimiter.scss' } /* ';' */,
1660
+ { startIndex: 104, type: '' },
1661
+ { startIndex: 105, type: 'delimiter.curly.scss' } /* '}' */,
1662
+ { startIndex: 106, type: '' },
1663
+ { startIndex: 107, type: 'tag.scss' } /* '.page-title' */,
1664
+ { startIndex: 118, type: '' },
1665
+ { startIndex: 119, type: 'delimiter.curly.scss' } /* '{' */,
1666
+ { startIndex: 120, type: '' },
1667
+ { startIndex: 123, type: 'keyword.scss' } /* '@include' */,
1668
+ { startIndex: 131, type: '' },
1669
+ { startIndex: 132, type: 'meta.scss' } /* 'large-text' */,
1670
+ { startIndex: 142, type: 'delimiter.scss' } /* ';' */,
1671
+ { startIndex: 143, type: '' },
1672
+ {
1673
+ startIndex: 146,
1674
+ type: 'attribute.name.scss'
1675
+ } /* 'padding:' */,
1676
+ { startIndex: 154, type: '' },
1677
+ { startIndex: 155, type: 'number.scss' } /* '4px' */,
1678
+ { startIndex: 158, type: 'delimiter.scss' } /* ';' */,
1679
+ { startIndex: 159, type: '' },
1680
+ { startIndex: 160, type: 'delimiter.curly.scss' } /* '}' */
1681
+ ]
1682
+ }
1683
+ ],
1684
+
1685
+ // @mixin with parameterswhitespaces
1686
+ [
1687
+ {
1688
+ line:
1689
+ '@mixin sexy-border($color, $width: 1in) {\n' +
1690
+ ' border: {\n' +
1691
+ ' color: $color;\n' +
1692
+ ' width: $width;\n' +
1693
+ ' style: dashed;\n' +
1694
+ ' }\n' +
1695
+ '}\n' +
1696
+ 'p { @include sexy-border(blue); }',
1697
+ tokens: [
1698
+ { startIndex: 0, type: 'keyword.scss' } /* '@mixin' */,
1699
+ { startIndex: 6, type: '' },
1700
+ { startIndex: 7, type: 'meta.scss' } /* 'sexy-border(' */,
1701
+ { startIndex: 19, type: 'variable.ref.scss' } /* '$color' */,
1702
+ { startIndex: 25, type: 'delimiter.scss' } /* ',' */,
1703
+ { startIndex: 26, type: '' },
1704
+ { startIndex: 27, type: 'variable.decl.scss' } /* '$width:' */,
1705
+ { startIndex: 34, type: '' },
1706
+ { startIndex: 35, type: 'number.scss' } /* '1in' */,
1707
+ { startIndex: 38, type: 'meta.scss' } /* ')' */,
1708
+ { startIndex: 39, type: '' },
1709
+ { startIndex: 40, type: 'delimiter.curly.scss' } /* '{' */,
1710
+ { startIndex: 41, type: '' },
1711
+ { startIndex: 44, type: 'attribute.name.scss' } /* 'border:' */,
1712
+ { startIndex: 51, type: '' },
1713
+ { startIndex: 52, type: 'delimiter.curly.scss' } /* '{' */,
1714
+ { startIndex: 53, type: '' },
1715
+ { startIndex: 58, type: 'attribute.name.scss' } /* 'color:' */,
1716
+ { startIndex: 64, type: '' },
1717
+ { startIndex: 65, type: 'variable.ref.scss' } /* '$color' */,
1718
+ { startIndex: 71, type: 'delimiter.scss' } /* ';' */,
1719
+ { startIndex: 72, type: '' },
1720
+ { startIndex: 77, type: 'attribute.name.scss' } /* 'width:' */,
1721
+ { startIndex: 83, type: '' },
1722
+ { startIndex: 84, type: 'variable.ref.scss' } /* '$width' */,
1723
+ { startIndex: 90, type: 'delimiter.scss' } /* ';' */,
1724
+ { startIndex: 91, type: '' },
1725
+ { startIndex: 96, type: 'attribute.name.scss' } /* 'style:' */,
1726
+ { startIndex: 102, type: '' },
1727
+ {
1728
+ startIndex: 103,
1729
+ type: 'attribute.value.scss'
1730
+ } /* 'dashed' */,
1731
+ { startIndex: 109, type: 'delimiter.scss' } /* ';' */,
1732
+ { startIndex: 110, type: '' },
1733
+ { startIndex: 113, type: 'delimiter.curly.scss' } /* '}' */,
1734
+ { startIndex: 114, type: '' },
1735
+ { startIndex: 115, type: 'delimiter.curly.scss' } /* '}' */,
1736
+ { startIndex: 116, type: '' },
1737
+ { startIndex: 117, type: 'tag.scss' } /* 'p' */,
1738
+ { startIndex: 118, type: '' },
1739
+ { startIndex: 119, type: 'delimiter.curly.scss' } /* '{' */,
1740
+ { startIndex: 120, type: '' },
1741
+ { startIndex: 121, type: 'keyword.scss' } /* '@include' */,
1742
+ { startIndex: 129, type: '' },
1743
+ { startIndex: 130, type: 'meta.scss' } /* 'sexy-border(' */,
1744
+ { startIndex: 142, type: 'attribute.value.scss' } /* 'blue' */,
1745
+ { startIndex: 146, type: 'meta.scss' } /* ')' */,
1746
+ { startIndex: 147, type: 'delimiter.scss' } /* ';' */,
1747
+ { startIndex: 148, type: '' },
1748
+ { startIndex: 149, type: 'delimiter.curly.scss' } /* '}' */
1749
+ ]
1750
+ }
1751
+ ],
1752
+
1753
+ // @mixin with varargswhitespaces
1754
+ [
1755
+ {
1756
+ line:
1757
+ '@mixin box-shadow($shadows...) {\n' +
1758
+ ' -moz-box-shadow: $shadows;\n' +
1759
+ ' -webkit-box-shadow: $shadows;\n' +
1760
+ ' box-shadow: $shadows;\n' +
1761
+ '}\n' +
1762
+ '.shadows {\n' +
1763
+ ' @include box-shadow(0px 4px 5px #666, 2px 6px 10px #999);\n' +
1764
+ '}',
1765
+ tokens: [
1766
+ { startIndex: 0, type: 'keyword.scss' } /* '@mixin' */,
1767
+ { startIndex: 6, type: '' },
1768
+ { startIndex: 7, type: 'meta.scss' } /* 'box-shadow(' */,
1769
+ { startIndex: 18, type: 'variable.ref.scss' } /* '$shadows' */,
1770
+ { startIndex: 26, type: 'operator.scss' } /* '...' */,
1771
+ { startIndex: 29, type: 'meta.scss' } /* ')' */,
1772
+ { startIndex: 30, type: '' },
1773
+ { startIndex: 31, type: 'delimiter.curly.scss' } /* '{' */,
1774
+ { startIndex: 32, type: '' },
1775
+ {
1776
+ startIndex: 35,
1777
+ type: 'attribute.name.scss'
1778
+ } /* '-moz-box-shadow:' */,
1779
+ { startIndex: 51, type: '' },
1780
+ { startIndex: 52, type: 'variable.ref.scss' } /* '$shadows' */,
1781
+ { startIndex: 60, type: 'delimiter.scss' } /* ';' */,
1782
+ { startIndex: 61, type: '' },
1783
+ {
1784
+ startIndex: 64,
1785
+ type: 'attribute.name.scss'
1786
+ } /* '-webkit-box-shadow:' */,
1787
+ { startIndex: 83, type: '' },
1788
+ { startIndex: 84, type: 'variable.ref.scss' } /* '$shadows' */,
1789
+ { startIndex: 92, type: 'delimiter.scss' } /* ';' */,
1790
+ { startIndex: 93, type: '' },
1791
+ {
1792
+ startIndex: 96,
1793
+ type: 'attribute.name.scss'
1794
+ } /* 'box-shadow:' */,
1795
+ { startIndex: 107, type: '' },
1796
+ { startIndex: 108, type: 'variable.ref.scss' } /* '$shadows' */,
1797
+ { startIndex: 116, type: 'delimiter.scss' } /* ';' */,
1798
+ { startIndex: 117, type: '' },
1799
+ { startIndex: 118, type: 'delimiter.curly.scss' } /* '}' */,
1800
+ { startIndex: 119, type: '' },
1801
+ { startIndex: 120, type: 'tag.scss' } /* '.shadows' */,
1802
+ { startIndex: 128, type: '' },
1803
+ { startIndex: 129, type: 'delimiter.curly.scss' } /* '{' */,
1804
+ { startIndex: 130, type: '' },
1805
+ { startIndex: 133, type: 'keyword.scss' } /* '@include' */,
1806
+ { startIndex: 141, type: '' },
1807
+ { startIndex: 142, type: 'meta.scss' } /* 'box-shadow(' */,
1808
+ { startIndex: 153, type: 'number.scss' } /* '0px' */,
1809
+ { startIndex: 156, type: '' },
1810
+ { startIndex: 157, type: 'number.scss' } /* '4px' */,
1811
+ { startIndex: 160, type: '' },
1812
+ { startIndex: 161, type: 'number.scss' } /* '5px' */,
1813
+ { startIndex: 164, type: '' },
1814
+ { startIndex: 165, type: 'number.hex.scss' } /* '#666' */,
1815
+ { startIndex: 169, type: 'delimiter.scss' } /* ',' */,
1816
+ { startIndex: 170, type: '' },
1817
+ { startIndex: 171, type: 'number.scss' } /* '2px' */,
1818
+ { startIndex: 174, type: '' },
1819
+ { startIndex: 175, type: 'number.scss' } /* '6px' */,
1820
+ { startIndex: 178, type: '' },
1821
+ { startIndex: 179, type: 'number.scss' } /* '10px' */,
1822
+ { startIndex: 183, type: '' },
1823
+ { startIndex: 184, type: 'number.hex.scss' } /* '#999' */,
1824
+ { startIndex: 188, type: 'meta.scss' } /* ')' */,
1825
+ { startIndex: 189, type: 'delimiter.scss' } /* ';' */,
1826
+ { startIndex: 190, type: '' },
1827
+ { startIndex: 191, type: 'delimiter.curly.scss' } /* '}' */
1828
+ ]
1829
+ }
1830
+ ],
1831
+
1832
+ // @include with varargswhitespaces
1833
+ [
1834
+ {
1835
+ line:
1836
+ '@mixin colors($text, $background, $border) {\n' +
1837
+ ' color: $text;\n' +
1838
+ ' background-color: $background;\n' +
1839
+ ' border-color: $border;\n' +
1840
+ '}\n' +
1841
+ '$values: #ff0000, #00ff00, #0000ff;\n' +
1842
+ '.primary {\n' +
1843
+ ' @include colors($values...);\n' +
1844
+ '}',
1845
+ tokens: [
1846
+ { startIndex: 0, type: 'keyword.scss' } /* '@mixin' */,
1847
+ { startIndex: 6, type: '' },
1848
+ { startIndex: 7, type: 'meta.scss' } /* 'colors(' */,
1849
+ { startIndex: 14, type: 'variable.ref.scss' } /* '$text' */,
1850
+ { startIndex: 19, type: 'delimiter.scss' } /* ',' */,
1851
+ { startIndex: 20, type: '' },
1852
+ {
1853
+ startIndex: 21,
1854
+ type: 'variable.ref.scss'
1855
+ } /* '$background' */,
1856
+ { startIndex: 32, type: 'delimiter.scss' } /* ',' */,
1857
+ { startIndex: 33, type: '' },
1858
+ { startIndex: 34, type: 'variable.ref.scss' } /* '$border' */,
1859
+ { startIndex: 41, type: 'meta.scss' } /* ')' */,
1860
+ { startIndex: 42, type: '' },
1861
+ { startIndex: 43, type: 'delimiter.curly.scss' } /* '{' */,
1862
+ { startIndex: 44, type: '' },
1863
+ { startIndex: 47, type: 'attribute.name.scss' } /* 'color:' */,
1864
+ { startIndex: 53, type: '' },
1865
+ { startIndex: 54, type: 'variable.ref.scss' } /* '$text' */,
1866
+ { startIndex: 59, type: 'delimiter.scss' } /* ';' */,
1867
+ { startIndex: 60, type: '' },
1868
+ {
1869
+ startIndex: 63,
1870
+ type: 'attribute.name.scss'
1871
+ } /* 'background-color:' */,
1872
+ { startIndex: 80, type: '' },
1873
+ {
1874
+ startIndex: 81,
1875
+ type: 'variable.ref.scss'
1876
+ } /* '$background' */,
1877
+ { startIndex: 92, type: 'delimiter.scss' } /* ';' */,
1878
+ { startIndex: 93, type: '' },
1879
+ {
1880
+ startIndex: 96,
1881
+ type: 'attribute.name.scss'
1882
+ } /* 'border-color:' */,
1883
+ { startIndex: 109, type: '' },
1884
+ { startIndex: 110, type: 'variable.ref.scss' } /* '$border' */,
1885
+ { startIndex: 117, type: 'delimiter.scss' } /* ';' */,
1886
+ { startIndex: 118, type: '' },
1887
+ { startIndex: 119, type: 'delimiter.curly.scss' } /* '}' */,
1888
+ { startIndex: 120, type: '' },
1889
+ {
1890
+ startIndex: 121,
1891
+ type: 'variable.decl.scss'
1892
+ } /* '$values:' */,
1893
+ { startIndex: 129, type: '' },
1894
+ { startIndex: 130, type: 'number.hex.scss' } /* '#ff0000' */,
1895
+ { startIndex: 137, type: 'operator.scss' } /* ',' */,
1896
+ { startIndex: 138, type: '' },
1897
+ { startIndex: 139, type: 'number.hex.scss' } /* '#00ff00' */,
1898
+ { startIndex: 146, type: 'operator.scss' } /* ',' */,
1899
+ { startIndex: 147, type: '' },
1900
+ { startIndex: 148, type: 'number.hex.scss' } /* '#0000ff' */,
1901
+ { startIndex: 155, type: 'delimiter.scss' } /* ';' */,
1902
+ { startIndex: 156, type: '' },
1903
+ { startIndex: 157, type: 'tag.scss' } /* '.primary' */,
1904
+ { startIndex: 165, type: '' },
1905
+ { startIndex: 166, type: 'delimiter.curly.scss' } /* '{' */,
1906
+ { startIndex: 167, type: '' },
1907
+ { startIndex: 170, type: 'keyword.scss' } /* '@include' */,
1908
+ { startIndex: 178, type: '' },
1909
+ { startIndex: 179, type: 'meta.scss' } /* 'colors(' */,
1910
+ { startIndex: 186, type: 'variable.ref.scss' } /* '$values' */,
1911
+ { startIndex: 193, type: 'operator.scss' } /* '...' */,
1912
+ { startIndex: 196, type: 'meta.scss' } /* ')' */,
1913
+ { startIndex: 197, type: 'delimiter.scss' } /* ';' */,
1914
+ { startIndex: 198, type: '' },
1915
+ { startIndex: 199, type: 'delimiter.curly.scss' } /* '}' */
1916
+ ]
1917
+ }
1918
+ ],
1919
+ // @include with bodywhitespaces
1920
+ [
1921
+ {
1922
+ line:
1923
+ '@mixin apply-to-ie6-only {\n' +
1924
+ ' * html {\n' +
1925
+ ' @content;\n' +
1926
+ ' }\n' +
1927
+ '}\n' +
1928
+ '@include apply-to-ie6-only {\n' +
1929
+ ' #logo {\n' +
1930
+ ' background-image: url(/logo.gif);\n' +
1931
+ ' }\n' +
1932
+ '}',
1933
+ tokens: [
1934
+ { startIndex: 0, type: 'keyword.scss' } /* '@mixin' */,
1935
+ { startIndex: 6, type: '' },
1936
+ { startIndex: 7, type: 'meta.scss' } /* 'apply-to-ie6-only' */,
1937
+ { startIndex: 24, type: '' },
1938
+ { startIndex: 25, type: 'delimiter.curly.scss' } /* '{' */,
1939
+ { startIndex: 26, type: '' },
1940
+ { startIndex: 29, type: 'tag.scss' } /* '*' */,
1941
+ { startIndex: 30, type: '' },
1942
+ { startIndex: 31, type: 'tag.scss' } /* 'html' */,
1943
+ { startIndex: 35, type: '' },
1944
+ { startIndex: 36, type: 'delimiter.curly.scss' } /* '{' */,
1945
+ { startIndex: 37, type: '' },
1946
+ { startIndex: 42, type: 'keyword.scss' } /* '@content' */,
1947
+ { startIndex: 50, type: '' },
1948
+ { startIndex: 54, type: 'delimiter.curly.scss' } /* '}' */,
1949
+ { startIndex: 55, type: '' },
1950
+ { startIndex: 56, type: 'delimiter.curly.scss' } /* '}' */,
1951
+ { startIndex: 57, type: '' },
1952
+ { startIndex: 58, type: 'keyword.scss' } /* '@include' */,
1953
+ { startIndex: 66, type: '' },
1954
+ { startIndex: 67, type: 'meta.scss' } /* 'apply-to-ie6-only' */,
1955
+ { startIndex: 84, type: '' },
1956
+ { startIndex: 85, type: 'delimiter.curly.scss' } /* '{' */,
1957
+ { startIndex: 86, type: '' },
1958
+ { startIndex: 89, type: 'tag.scss' } /* '#logo' */,
1959
+ { startIndex: 94, type: '' },
1960
+ { startIndex: 95, type: 'delimiter.curly.scss' } /* '{' */,
1961
+ { startIndex: 96, type: '' },
1962
+ {
1963
+ startIndex: 101,
1964
+ type: 'attribute.name.scss'
1965
+ } /* 'background-image:' */,
1966
+ { startIndex: 118, type: '' },
1967
+ { startIndex: 119, type: 'meta.scss' } /* 'url(' */,
1968
+ { startIndex: 123, type: 'string.scss' } /* '/logo.gif' */,
1969
+ { startIndex: 132, type: 'meta.scss' } /* ')' */,
1970
+ { startIndex: 133, type: 'delimiter.scss' } /* ';' */,
1971
+ { startIndex: 134, type: '' },
1972
+ { startIndex: 137, type: 'delimiter.curly.scss' } /* '}' */,
1973
+ { startIndex: 138, type: '' },
1974
+ { startIndex: 139, type: 'delimiter.curly.scss' } /* '}' */
1975
+ ]
1976
+ }
1977
+ ],
1978
+
1979
+ // CSS charsetwhitespaces
1980
+ [
1981
+ {
1982
+ line: '@charset "UTF-8";',
1983
+ tokens: [
1984
+ { startIndex: 0, type: 'keyword.scss' } /* '@charset' */,
1985
+ { startIndex: 8, type: '' },
1986
+ { startIndex: 9, type: 'string.delimiter.scss' } /* '"' */,
1987
+ { startIndex: 10, type: 'string.scss' } /* 'UTF-8' */,
1988
+ { startIndex: 15, type: 'string.delimiter.scss' } /* '"' */,
1989
+ { startIndex: 16, type: 'delimiter.scss' } /* ';' */
1990
+ ]
1991
+ }
1992
+ ],
1993
+
1994
+ // CSS attributeswhitespaces
1995
+ [
1996
+ {
1997
+ line: '[rel="external"]::after {\n' + " content: 's';\n" + '}',
1998
+ tokens: [
1999
+ { startIndex: 0, type: 'delimiter.bracket.scss' } /* '[' */,
2000
+ { startIndex: 1, type: 'attribute.value.scss' } /* 'rel' */,
2001
+ { startIndex: 4, type: 'operator.scss' } /* '=' */,
2002
+ { startIndex: 5, type: 'string.delimiter.scss' } /* '"' */,
2003
+ { startIndex: 6, type: 'string.scss' } /* 'external' */,
2004
+ { startIndex: 14, type: 'string.delimiter.scss' } /* '"' */,
2005
+ { startIndex: 15, type: 'delimiter.bracket.scss' } /* ']' */,
2006
+ { startIndex: 16, type: 'tag.scss' } /* '::after' */,
2007
+ { startIndex: 23, type: '' },
2008
+ { startIndex: 24, type: 'delimiter.curly.scss' } /* '{' */,
2009
+ { startIndex: 25, type: '' },
2010
+ {
2011
+ startIndex: 30,
2012
+ type: 'attribute.name.scss'
2013
+ } /* 'content:' */,
2014
+ { startIndex: 38, type: '' },
2015
+ { startIndex: 39, type: 'string.delimiter.scss' } /* ''' */,
2016
+ { startIndex: 40, type: 'string.scss' } /* 's' */,
2017
+ { startIndex: 41, type: 'string.delimiter.scss' } /* ''' */,
2018
+ { startIndex: 42, type: 'delimiter.scss' } /* ';' */,
2019
+ { startIndex: 43, type: '' },
2020
+ { startIndex: 44, type: 'delimiter.curly.scss' } /* '}' */
2021
+ ]
2022
+ }
2023
+ ],
2024
+
2025
+ // CSS @pagewhitespaces
2026
+ [
2027
+ {
2028
+ line: '@page :left {\n' + ' margin-left: 4cm;\n' + ' margin-right: 3cm;\n' + '}',
2029
+ tokens: [
2030
+ { startIndex: 0, type: 'keyword.scss' } /* '@page' */,
2031
+ { startIndex: 5, type: '' },
2032
+ { startIndex: 6, type: 'tag.scss' } /* ':left' */,
2033
+ { startIndex: 11, type: '' },
2034
+ { startIndex: 12, type: 'delimiter.curly.scss' } /* '{' */,
2035
+ { startIndex: 13, type: '' },
2036
+ {
2037
+ startIndex: 16,
2038
+ type: 'attribute.name.scss'
2039
+ } /* 'margin-left:' */,
2040
+ { startIndex: 28, type: '' },
2041
+ { startIndex: 29, type: 'number.scss' } /* '4cm' */,
2042
+ { startIndex: 32, type: 'delimiter.scss' } /* ';' */,
2043
+ { startIndex: 33, type: '' },
2044
+ {
2045
+ startIndex: 36,
2046
+ type: 'attribute.name.scss'
2047
+ } /* 'margin-right:' */,
2048
+ { startIndex: 49, type: '' },
2049
+ { startIndex: 50, type: 'number.scss' } /* '3cm' */,
2050
+ { startIndex: 53, type: 'delimiter.scss' } /* ';' */,
2051
+ { startIndex: 54, type: '' },
2052
+ { startIndex: 55, type: 'delimiter.curly.scss' } /* '}' */
2053
+ ]
2054
+ }
2055
+ ],
2056
+
2057
+ // Extend with interpolation variablewhitespaces
2058
+ [
2059
+ {
2060
+ line:
2061
+ '@mixin error($a: false) {\n' +
2062
+ ' @extend .#{$a};\n' +
2063
+ ' @extend ##{$a};\n' +
2064
+ '}\n' +
2065
+ '#bar {a: 1px;}\n' +
2066
+ '.bar {b: 1px;}\n' +
2067
+ 'foo {\n' +
2068
+ " @include error('bar'); \n" +
2069
+ '}',
2070
+ tokens: [
2071
+ { startIndex: 0, type: 'keyword.scss' } /* '@mixin' */,
2072
+ { startIndex: 6, type: '' },
2073
+ { startIndex: 7, type: 'meta.scss' } /* 'error(' */,
2074
+ { startIndex: 13, type: 'variable.decl.scss' } /* '$a:' */,
2075
+ { startIndex: 16, type: '' },
2076
+ { startIndex: 17, type: 'attribute.value.scss' } /* 'false' */,
2077
+ { startIndex: 22, type: 'meta.scss' } /* ')' */,
2078
+ { startIndex: 23, type: '' },
2079
+ { startIndex: 24, type: 'delimiter.curly.scss' } /* '{' */,
2080
+ { startIndex: 25, type: '' },
2081
+ { startIndex: 28, type: 'keyword.scss' } /* '@extend' */,
2082
+ { startIndex: 35, type: '' },
2083
+ { startIndex: 36, type: 'tag.scss' } /* '.' */,
2084
+ { startIndex: 37, type: 'meta.scss' } /* '#{' */,
2085
+ { startIndex: 39, type: 'variable.ref.scss' } /* '$a' */,
2086
+ { startIndex: 41, type: 'meta.scss' } /* '}' */,
2087
+ { startIndex: 42, type: 'delimiter.scss' } /* ';' */,
2088
+ { startIndex: 43, type: '' },
2089
+ { startIndex: 46, type: 'keyword.scss' } /* '@extend' */,
2090
+ { startIndex: 53, type: '' },
2091
+ { startIndex: 54, type: 'tag.scss' } /* '#' */,
2092
+ { startIndex: 55, type: 'meta.scss' } /* '#{' */,
2093
+ { startIndex: 57, type: 'variable.ref.scss' } /* '$a' */,
2094
+ { startIndex: 59, type: 'meta.scss' } /* '}' */,
2095
+ { startIndex: 60, type: 'delimiter.scss' } /* ';' */,
2096
+ { startIndex: 61, type: '' },
2097
+ { startIndex: 62, type: 'delimiter.curly.scss' } /* '}' */,
2098
+ { startIndex: 63, type: '' },
2099
+ { startIndex: 64, type: 'tag.scss' } /* '#bar' */,
2100
+ { startIndex: 68, type: '' },
2101
+ { startIndex: 69, type: 'delimiter.curly.scss' } /* '{' */,
2102
+ { startIndex: 70, type: 'attribute.name.scss' } /* 'a:' */,
2103
+ { startIndex: 72, type: '' },
2104
+ { startIndex: 73, type: 'number.scss' } /* '1px' */,
2105
+ { startIndex: 76, type: 'delimiter.scss' } /* ';' */,
2106
+ { startIndex: 77, type: 'delimiter.curly.scss' } /* '}' */,
2107
+ { startIndex: 78, type: '' },
2108
+ { startIndex: 79, type: 'tag.scss' } /* '.bar' */,
2109
+ { startIndex: 83, type: '' },
2110
+ { startIndex: 84, type: 'delimiter.curly.scss' } /* '{' */,
2111
+ { startIndex: 85, type: 'attribute.name.scss' } /* 'b:' */,
2112
+ { startIndex: 87, type: '' },
2113
+ { startIndex: 88, type: 'number.scss' } /* '1px' */,
2114
+ { startIndex: 91, type: 'delimiter.scss' } /* ';' */,
2115
+ { startIndex: 92, type: 'delimiter.curly.scss' } /* '}' */,
2116
+ { startIndex: 93, type: '' },
2117
+ { startIndex: 94, type: 'tag.scss' } /* 'foo' */,
2118
+ { startIndex: 97, type: '' },
2119
+ { startIndex: 98, type: 'delimiter.curly.scss' } /* '{' */,
2120
+ { startIndex: 99, type: '' },
2121
+ { startIndex: 102, type: 'keyword.scss' } /* '@include' */,
2122
+ { startIndex: 110, type: '' },
2123
+ { startIndex: 111, type: 'meta.scss' } /* 'error(' */,
2124
+ { startIndex: 117, type: 'string.delimiter.scss' } /* ''' */,
2125
+ { startIndex: 118, type: 'string.scss' } /* 'bar' */,
2126
+ { startIndex: 121, type: 'string.delimiter.scss' } /* ''' */,
2127
+ { startIndex: 122, type: 'meta.scss' } /* ')' */,
2128
+ { startIndex: 123, type: 'delimiter.scss' } /* ';' */,
2129
+ { startIndex: 124, type: '' },
2130
+ { startIndex: 128, type: 'delimiter.curly.scss' } /* '}' */
2131
+ ]
2132
+ }
2133
+ ],
2134
+
2135
+ // @font-facewhitespaces
2136
+ [
2137
+ {
2138
+ line: "@font-face { font-family: Delicious; src: url('Delicious-Roman.otf'); } ",
2139
+ tokens: [
2140
+ { startIndex: 0, type: 'keyword.scss' } /* '@font-face' */,
2141
+ { startIndex: 10, type: '' },
2142
+ { startIndex: 11, type: 'delimiter.curly.scss' } /* '{' */,
2143
+ { startIndex: 12, type: '' },
2144
+ {
2145
+ startIndex: 13,
2146
+ type: 'attribute.name.scss'
2147
+ } /* 'font-family:' */,
2148
+ { startIndex: 25, type: '' },
2149
+ {
2150
+ startIndex: 26,
2151
+ type: 'attribute.value.scss'
2152
+ } /* 'Delicious' */,
2153
+ { startIndex: 35, type: 'delimiter.scss' } /* ';' */,
2154
+ { startIndex: 36, type: '' },
2155
+ { startIndex: 37, type: 'attribute.name.scss' } /* 'src:' */,
2156
+ { startIndex: 41, type: '' },
2157
+ { startIndex: 42, type: 'meta.scss' } /* 'url(' */,
2158
+ { startIndex: 46, type: 'string.delimiter.scss' } /* ''' */,
2159
+ {
2160
+ startIndex: 47,
2161
+ type: 'string.scss'
2162
+ } /* 'Delicious-Roman.otf' */,
2163
+ { startIndex: 66, type: 'string.delimiter.scss' } /* ''' */,
2164
+ { startIndex: 67, type: 'meta.scss' } /* ')' */,
2165
+ { startIndex: 68, type: 'delimiter.scss' } /* ';' */,
2166
+ { startIndex: 69, type: '' },
2167
+ { startIndex: 70, type: 'delimiter.curly.scss' } /* '}' */,
2168
+ { startIndex: 71, type: '' }
2169
+ ]
2170
+ }
2171
+ ],
2172
+
2173
+ // Keyframeswhitespaces
2174
+ [
2175
+ {
2176
+ line:
2177
+ '@-webkit-keyframes NAME-YOUR-ANIMATION {\n' +
2178
+ ' 0% { opacity: 0; }\n' +
2179
+ ' 100% { opacity: 1; }\n' +
2180
+ '}\n' +
2181
+ '@-moz-keyframes NAME-YOUR-ANIMATION {\n' +
2182
+ ' 0% { opacity: 0; }\n' +
2183
+ ' 100% { opacity: 1; }\n' +
2184
+ '}\n' +
2185
+ '@-o-keyframes NAME-YOUR-ANIMATION {\n' +
2186
+ ' 0% { opacity: 0; }\n' +
2187
+ ' 100% { opacity: 1; }\n' +
2188
+ '}\n' +
2189
+ '@keyframes NAME-YOUR-ANIMATION {\n' +
2190
+ ' 0% { opacity: 0; }\n' +
2191
+ ' 100% { opacity: 1; }\n' +
2192
+ '}',
2193
+ tokens: [
2194
+ {
2195
+ startIndex: 0,
2196
+ type: 'keyword.scss'
2197
+ } /* '@-webkit-keyframes' */,
2198
+ { startIndex: 18, type: '' },
2199
+ {
2200
+ startIndex: 19,
2201
+ type: 'meta.scss'
2202
+ } /* 'NAME-YOUR-ANIMATION' */,
2203
+ { startIndex: 38, type: '' },
2204
+ { startIndex: 39, type: 'delimiter.curly.scss' } /* '{' */,
2205
+ { startIndex: 40, type: '' },
2206
+ { startIndex: 43, type: 'number.scss' } /* '0%' */,
2207
+ { startIndex: 45, type: '' },
2208
+ { startIndex: 48, type: 'delimiter.curly.scss' } /* '{' */,
2209
+ { startIndex: 49, type: '' },
2210
+ {
2211
+ startIndex: 50,
2212
+ type: 'attribute.name.scss'
2213
+ } /* 'opacity:' */,
2214
+ { startIndex: 58, type: '' },
2215
+ { startIndex: 59, type: 'number.scss' } /* '0' */,
2216
+ { startIndex: 60, type: 'delimiter.scss' } /* ';' */,
2217
+ { startIndex: 61, type: '' },
2218
+ { startIndex: 62, type: 'delimiter.curly.scss' } /* '}' */,
2219
+ { startIndex: 63, type: '' },
2220
+ { startIndex: 66, type: 'number.scss' } /* '100%' */,
2221
+ { startIndex: 70, type: '' },
2222
+ { startIndex: 71, type: 'delimiter.curly.scss' } /* '{' */,
2223
+ { startIndex: 72, type: '' },
2224
+ {
2225
+ startIndex: 73,
2226
+ type: 'attribute.name.scss'
2227
+ } /* 'opacity:' */,
2228
+ { startIndex: 81, type: '' },
2229
+ { startIndex: 82, type: 'number.scss' } /* '1' */,
2230
+ { startIndex: 83, type: 'delimiter.scss' } /* ';' */,
2231
+ { startIndex: 84, type: '' },
2232
+ { startIndex: 85, type: 'delimiter.curly.scss' } /* '}' */,
2233
+ { startIndex: 86, type: '' },
2234
+ { startIndex: 87, type: 'delimiter.curly.scss' } /* '}' */,
2235
+ { startIndex: 88, type: '' },
2236
+ {
2237
+ startIndex: 89,
2238
+ type: 'keyword.scss'
2239
+ } /* '@-moz-keyframes' */,
2240
+ { startIndex: 104, type: '' },
2241
+ {
2242
+ startIndex: 105,
2243
+ type: 'meta.scss'
2244
+ } /* 'NAME-YOUR-ANIMATION' */,
2245
+ { startIndex: 124, type: '' },
2246
+ { startIndex: 125, type: 'delimiter.curly.scss' } /* '{' */,
2247
+ { startIndex: 126, type: '' },
2248
+ { startIndex: 129, type: 'number.scss' } /* '0%' */,
2249
+ { startIndex: 131, type: '' },
2250
+ { startIndex: 134, type: 'delimiter.curly.scss' } /* '{' */,
2251
+ { startIndex: 135, type: '' },
2252
+ {
2253
+ startIndex: 136,
2254
+ type: 'attribute.name.scss'
2255
+ } /* 'opacity:' */,
2256
+ { startIndex: 144, type: '' },
2257
+ { startIndex: 145, type: 'number.scss' } /* '0' */,
2258
+ { startIndex: 146, type: 'delimiter.scss' } /* ';' */,
2259
+ { startIndex: 147, type: '' },
2260
+ { startIndex: 148, type: 'delimiter.curly.scss' } /* '}' */,
2261
+ { startIndex: 149, type: '' },
2262
+ { startIndex: 152, type: 'number.scss' } /* '100%' */,
2263
+ { startIndex: 156, type: '' },
2264
+ { startIndex: 157, type: 'delimiter.curly.scss' } /* '{' */,
2265
+ { startIndex: 158, type: '' },
2266
+ {
2267
+ startIndex: 159,
2268
+ type: 'attribute.name.scss'
2269
+ } /* 'opacity:' */,
2270
+ { startIndex: 167, type: '' },
2271
+ { startIndex: 168, type: 'number.scss' } /* '1' */,
2272
+ { startIndex: 169, type: 'delimiter.scss' } /* ';' */,
2273
+ { startIndex: 170, type: '' },
2274
+ { startIndex: 171, type: 'delimiter.curly.scss' } /* '}' */,
2275
+ { startIndex: 172, type: '' },
2276
+ { startIndex: 173, type: 'delimiter.curly.scss' } /* '}' */,
2277
+ { startIndex: 174, type: '' },
2278
+ { startIndex: 175, type: 'keyword.scss' } /* '@-o-keyframes' */,
2279
+ { startIndex: 188, type: '' },
2280
+ {
2281
+ startIndex: 189,
2282
+ type: 'meta.scss'
2283
+ } /* 'NAME-YOUR-ANIMATION' */,
2284
+ { startIndex: 208, type: '' },
2285
+ { startIndex: 209, type: 'delimiter.curly.scss' } /* '{' */,
2286
+ { startIndex: 210, type: '' },
2287
+ { startIndex: 213, type: 'number.scss' } /* '0%' */,
2288
+ { startIndex: 215, type: '' },
2289
+ { startIndex: 218, type: 'delimiter.curly.scss' } /* '{' */,
2290
+ { startIndex: 219, type: '' },
2291
+ {
2292
+ startIndex: 220,
2293
+ type: 'attribute.name.scss'
2294
+ } /* 'opacity:' */,
2295
+ { startIndex: 228, type: '' },
2296
+ { startIndex: 229, type: 'number.scss' } /* '0' */,
2297
+ { startIndex: 230, type: 'delimiter.scss' } /* ';' */,
2298
+ { startIndex: 231, type: '' },
2299
+ { startIndex: 232, type: 'delimiter.curly.scss' } /* '}' */,
2300
+ { startIndex: 233, type: '' },
2301
+ { startIndex: 236, type: 'number.scss' } /* '100%' */,
2302
+ { startIndex: 240, type: '' },
2303
+ { startIndex: 241, type: 'delimiter.curly.scss' } /* '{' */,
2304
+ { startIndex: 242, type: '' },
2305
+ {
2306
+ startIndex: 243,
2307
+ type: 'attribute.name.scss'
2308
+ } /* 'opacity:' */,
2309
+ { startIndex: 251, type: '' },
2310
+ { startIndex: 252, type: 'number.scss' } /* '1' */,
2311
+ { startIndex: 253, type: 'delimiter.scss' } /* ';' */,
2312
+ { startIndex: 254, type: '' },
2313
+ { startIndex: 255, type: 'delimiter.curly.scss' } /* '}' */,
2314
+ { startIndex: 256, type: '' },
2315
+ { startIndex: 257, type: 'delimiter.curly.scss' } /* '}' */,
2316
+ { startIndex: 258, type: '' },
2317
+ { startIndex: 259, type: 'keyword.scss' } /* '@keyframes' */,
2318
+ { startIndex: 269, type: '' },
2319
+ {
2320
+ startIndex: 270,
2321
+ type: 'meta.scss'
2322
+ } /* 'NAME-YOUR-ANIMATION' */,
2323
+ { startIndex: 289, type: '' },
2324
+ { startIndex: 290, type: 'delimiter.curly.scss' } /* '{' */,
2325
+ { startIndex: 291, type: '' },
2326
+ { startIndex: 294, type: 'number.scss' } /* '0%' */,
2327
+ { startIndex: 296, type: '' },
2328
+ { startIndex: 299, type: 'delimiter.curly.scss' } /* '{' */,
2329
+ { startIndex: 300, type: '' },
2330
+ {
2331
+ startIndex: 301,
2332
+ type: 'attribute.name.scss'
2333
+ } /* 'opacity:' */,
2334
+ { startIndex: 309, type: '' },
2335
+ { startIndex: 310, type: 'number.scss' } /* '0' */,
2336
+ { startIndex: 311, type: 'delimiter.scss' } /* ';' */,
2337
+ { startIndex: 312, type: '' },
2338
+ { startIndex: 313, type: 'delimiter.curly.scss' } /* '}' */,
2339
+ { startIndex: 314, type: '' },
2340
+ { startIndex: 317, type: 'number.scss' } /* '100%' */,
2341
+ { startIndex: 321, type: '' },
2342
+ { startIndex: 322, type: 'delimiter.curly.scss' } /* '{' */,
2343
+ { startIndex: 323, type: '' },
2344
+ {
2345
+ startIndex: 324,
2346
+ type: 'attribute.name.scss'
2347
+ } /* 'opacity:' */,
2348
+ { startIndex: 332, type: '' },
2349
+ { startIndex: 333, type: 'number.scss' } /* '1' */,
2350
+ { startIndex: 334, type: 'delimiter.scss' } /* ';' */,
2351
+ { startIndex: 335, type: '' },
2352
+ { startIndex: 336, type: 'delimiter.curly.scss' } /* '}' */,
2353
+ { startIndex: 337, type: '' },
2354
+ { startIndex: 338, type: 'delimiter.curly.scss' } /* '}' */
2355
+ ]
2356
+ }
2357
+ ],
2358
+
2359
+ // String escapingwhitespaces
2360
+ [
2361
+ {
2362
+ line:
2363
+ "[data-icon='test-1']:before {\n" +
2364
+ " content:'\\\\';\n" +
2365
+ '}\n' +
2366
+ '/* a comment */\n' +
2367
+ "$var1: '\\'';\n" +
2368
+ '$var2: "\\"";\n' +
2369
+ '/* another comment */',
2370
+ tokens: [
2371
+ { startIndex: 0, type: 'delimiter.bracket.scss' } /* '[' */,
2372
+ {
2373
+ startIndex: 1,
2374
+ type: 'attribute.value.scss'
2375
+ } /* 'data-icon' */,
2376
+ { startIndex: 10, type: 'operator.scss' } /* '=' */,
2377
+ { startIndex: 11, type: 'string.delimiter.scss' } /* ''' */,
2378
+ { startIndex: 12, type: 'string.scss' } /* 'test-1' */,
2379
+ { startIndex: 18, type: 'string.delimiter.scss' } /* ''' */,
2380
+ { startIndex: 19, type: 'delimiter.bracket.scss' } /* ']' */,
2381
+ { startIndex: 20, type: 'tag.scss' } /* ':before' */,
2382
+ { startIndex: 27, type: '' },
2383
+ { startIndex: 28, type: 'delimiter.curly.scss' } /* '{' */,
2384
+ { startIndex: 29, type: '' },
2385
+ {
2386
+ startIndex: 32,
2387
+ type: 'attribute.name.scss'
2388
+ } /* 'content:' */,
2389
+ { startIndex: 40, type: 'string.delimiter.scss' } /* ''' */,
2390
+ { startIndex: 41, type: 'string.scss' } /* '\\' */,
2391
+ { startIndex: 43, type: 'string.delimiter.scss' } /* ''' */,
2392
+ { startIndex: 44, type: 'delimiter.scss' } /* ';' */,
2393
+ { startIndex: 45, type: '' },
2394
+ { startIndex: 46, type: 'delimiter.curly.scss' } /* '}' */,
2395
+ { startIndex: 47, type: '' },
2396
+ {
2397
+ startIndex: 48,
2398
+ type: 'comment.scss'
2399
+ } /* '/* a comment * /' */,
2400
+ { startIndex: 63, type: '' },
2401
+ { startIndex: 64, type: 'variable.decl.scss' } /* '$var1:' */,
2402
+ { startIndex: 70, type: '' },
2403
+ { startIndex: 71, type: 'string.delimiter.scss' } /* ''' */,
2404
+ { startIndex: 72, type: 'string.scss' } /* '\'' */,
2405
+ { startIndex: 74, type: 'string.delimiter.scss' } /* ''' */,
2406
+ { startIndex: 75, type: 'delimiter.scss' } /* ';' */,
2407
+ { startIndex: 76, type: '' },
2408
+ { startIndex: 77, type: 'variable.decl.scss' } /* '$var2:' */,
2409
+ { startIndex: 83, type: '' },
2410
+ { startIndex: 84, type: 'string.delimiter.scss' } /* '"' */,
2411
+ { startIndex: 85, type: 'string.scss' } /* '\"' */,
2412
+ { startIndex: 87, type: 'string.delimiter.scss' } /* '"' */,
2413
+ { startIndex: 88, type: 'delimiter.scss' } /* ';' */,
2414
+ { startIndex: 89, type: '' },
2415
+ {
2416
+ startIndex: 90,
2417
+ type: 'comment.scss'
2418
+ } /* '/* another comment * /' */
2419
+ ]
2420
+ }
2421
+ ]
2422
+ ]);