@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,2409 @@
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 } from '../test/testRunner';
7
+
8
+ testTokenization(
9
+ ['php', 'css', 'javascript'],
10
+ [
11
+ // Bug 13596:[ErrorTelemetry] Stream did not advance while tokenizing. Mode id is php (stuck)
12
+ // We're testing the fact that tokenize does not throw
13
+ [
14
+ { line: '<?php', tokens: [{ startIndex: 0, type: 'metatag.php' }] },
15
+ { line: '"', tokens: [{ startIndex: 0, type: 'string.php' }] },
16
+ { line: '\\', tokens: [{ startIndex: 0, type: '' }] }
17
+ ],
18
+
19
+ // Blocks
20
+ [
21
+ {
22
+ line: '<?php',
23
+ tokens: [{ startIndex: 0, type: 'metatag.php' }]
24
+ }
25
+ ],
26
+
27
+ [
28
+ {
29
+ line: '<?php ?>',
30
+ tokens: [
31
+ { startIndex: 0, type: 'metatag.php' },
32
+ { startIndex: 5, type: '' },
33
+ { startIndex: 6, type: 'metatag.php' }
34
+ ]
35
+ }
36
+ ],
37
+
38
+ [
39
+ {
40
+ line: '<?=',
41
+ tokens: [{ startIndex: 0, type: 'metatag.php' }]
42
+ }
43
+ ],
44
+
45
+ [
46
+ {
47
+ line: '<?php /* comment */ ?>',
48
+ tokens: [
49
+ { startIndex: 0, type: 'metatag.php' },
50
+ { startIndex: 5, type: '' },
51
+ { startIndex: 6, type: 'comment.php' },
52
+ { startIndex: 19, type: '' },
53
+ { startIndex: 20, type: 'metatag.php' }
54
+ ]
55
+ }
56
+ ],
57
+
58
+ // Variables
59
+ [
60
+ {
61
+ line: '<?php $abc = 5; ?>',
62
+ tokens: [
63
+ { startIndex: 0, type: 'metatag.php' },
64
+ { startIndex: 5, type: '' },
65
+ { startIndex: 6, type: 'variable.php' },
66
+ { startIndex: 10, type: '' },
67
+ { startIndex: 11, type: 'delimiter.php' },
68
+ { startIndex: 12, type: '' },
69
+ { startIndex: 13, type: 'number.php' },
70
+ { startIndex: 14, type: 'delimiter.php' },
71
+ { startIndex: 15, type: '' },
72
+ { startIndex: 16, type: 'metatag.php' }
73
+ ]
74
+ }
75
+ ],
76
+
77
+ [
78
+ {
79
+ line: '<?php $a = "chris"; ?>',
80
+ tokens: [
81
+ { startIndex: 0, type: 'metatag.php' },
82
+ { startIndex: 5, type: '' },
83
+ { startIndex: 6, type: 'variable.php' },
84
+ { startIndex: 8, type: '' },
85
+ { startIndex: 9, type: 'delimiter.php' },
86
+ { startIndex: 10, type: '' },
87
+ { startIndex: 11, type: 'string.php' },
88
+ { startIndex: 18, type: 'delimiter.php' },
89
+ { startIndex: 19, type: '' },
90
+ { startIndex: 20, type: 'metatag.php' }
91
+ ]
92
+ }
93
+ ],
94
+
95
+ [
96
+ {
97
+ line: '<?php $myVar = -10; ?>',
98
+ tokens: [
99
+ { startIndex: 0, type: 'metatag.php' },
100
+ { startIndex: 5, type: '' },
101
+ { startIndex: 6, type: 'variable.php' },
102
+ { startIndex: 12, type: '' },
103
+ { startIndex: 13, type: 'delimiter.php' },
104
+ { startIndex: 14, type: '' },
105
+ { startIndex: 15, type: 'delimiter.php' },
106
+ { startIndex: 16, type: 'number.php' },
107
+ { startIndex: 18, type: 'delimiter.php' },
108
+ { startIndex: 19, type: '' },
109
+ { startIndex: 20, type: 'metatag.php' }
110
+ ]
111
+ }
112
+ ],
113
+
114
+ [
115
+ {
116
+ line: '<?php $myVar = 5 + (10 * 2); ?>',
117
+ tokens: [
118
+ { startIndex: 0, type: 'metatag.php' },
119
+ { startIndex: 5, type: '' },
120
+ { startIndex: 6, type: 'variable.php' },
121
+ { startIndex: 12, type: '' },
122
+ { startIndex: 13, type: 'delimiter.php' },
123
+ { startIndex: 14, type: '' },
124
+ { startIndex: 15, type: 'number.php' },
125
+ { startIndex: 16, type: '' },
126
+ { startIndex: 17, type: 'delimiter.php' },
127
+ { startIndex: 18, type: '' },
128
+ { startIndex: 19, type: 'delimiter.parenthesis.php' },
129
+ { startIndex: 20, type: 'number.php' },
130
+ { startIndex: 22, type: '' },
131
+ { startIndex: 23, type: 'delimiter.php' },
132
+ { startIndex: 24, type: '' },
133
+ { startIndex: 25, type: 'number.php' },
134
+ { startIndex: 26, type: 'delimiter.parenthesis.php' },
135
+ { startIndex: 27, type: 'delimiter.php' },
136
+ { startIndex: 28, type: '' },
137
+ { startIndex: 29, type: 'metatag.php' }
138
+ ]
139
+ }
140
+ ],
141
+
142
+ // Keywords
143
+ [
144
+ {
145
+ line: '<?php function myFunc() { } ?>',
146
+ tokens: [
147
+ { startIndex: 0, type: 'metatag.php' },
148
+ { startIndex: 5, type: '' },
149
+ { startIndex: 6, type: 'keyword.php' },
150
+ { startIndex: 14, type: '' },
151
+ { startIndex: 15, type: 'identifier.php' },
152
+ { startIndex: 21, type: 'delimiter.parenthesis.php' },
153
+ { startIndex: 23, type: '' },
154
+ { startIndex: 24, type: 'delimiter.bracket.php' },
155
+ { startIndex: 25, type: '' },
156
+ { startIndex: 26, type: 'delimiter.bracket.php' },
157
+ { startIndex: 27, type: '' },
158
+ { startIndex: 28, type: 'metatag.php' }
159
+ ]
160
+ }
161
+ ],
162
+
163
+ [
164
+ {
165
+ line: '<?php function ?>',
166
+ tokens: [
167
+ { startIndex: 0, type: 'metatag.php' },
168
+ { startIndex: 5, type: '' },
169
+ { startIndex: 6, type: 'keyword.php' },
170
+ { startIndex: 14, type: '' },
171
+ { startIndex: 15, type: 'metatag.php' }
172
+ ]
173
+ }
174
+ ],
175
+
176
+ [
177
+ {
178
+ line: '<?php if ($start > 52) { $start = 0; } ?>',
179
+ tokens: [
180
+ { startIndex: 0, type: 'metatag.php' },
181
+ { startIndex: 5, type: '' },
182
+ { startIndex: 6, type: 'keyword.php' },
183
+ { startIndex: 8, type: '' },
184
+ { startIndex: 9, type: 'delimiter.parenthesis.php' },
185
+ { startIndex: 10, type: 'variable.php' },
186
+ { startIndex: 16, type: '' },
187
+ { startIndex: 17, type: 'delimiter.php' },
188
+ { startIndex: 18, type: '' },
189
+ { startIndex: 19, type: 'number.php' },
190
+ { startIndex: 21, type: 'delimiter.parenthesis.php' },
191
+ { startIndex: 22, type: '' },
192
+ { startIndex: 23, type: 'delimiter.bracket.php' },
193
+ { startIndex: 24, type: '' },
194
+ { startIndex: 25, type: 'variable.php' },
195
+ { startIndex: 31, type: '' },
196
+ { startIndex: 32, type: 'delimiter.php' },
197
+ { startIndex: 33, type: '' },
198
+ { startIndex: 34, type: 'number.php' },
199
+ { startIndex: 35, type: 'delimiter.php' },
200
+ { startIndex: 36, type: '' },
201
+ { startIndex: 37, type: 'delimiter.bracket.php' },
202
+ { startIndex: 38, type: '' },
203
+ { startIndex: 39, type: 'metatag.php' }
204
+ ]
205
+ }
206
+ ],
207
+
208
+ [
209
+ {
210
+ line: '<?php if (true) { $start = 0; } ?>',
211
+ tokens: [
212
+ { startIndex: 0, type: 'metatag.php' },
213
+ { startIndex: 5, type: '' },
214
+ { startIndex: 6, type: 'keyword.php' },
215
+ { startIndex: 8, type: '' },
216
+ { startIndex: 9, type: 'delimiter.parenthesis.php' },
217
+ { startIndex: 10, type: 'keyword.php' },
218
+ { startIndex: 14, type: 'delimiter.parenthesis.php' },
219
+ { startIndex: 15, type: '' },
220
+ { startIndex: 16, type: 'delimiter.bracket.php' },
221
+ { startIndex: 17, type: '' },
222
+ { startIndex: 18, type: 'variable.php' },
223
+ { startIndex: 24, type: '' },
224
+ { startIndex: 25, type: 'delimiter.php' },
225
+ { startIndex: 26, type: '' },
226
+ { startIndex: 27, type: 'number.php' },
227
+ { startIndex: 28, type: 'delimiter.php' },
228
+ { startIndex: 29, type: '' },
229
+ { startIndex: 30, type: 'delimiter.bracket.php' },
230
+ { startIndex: 31, type: '' },
231
+ { startIndex: 32, type: 'metatag.php' }
232
+ ]
233
+ }
234
+ ],
235
+
236
+ [
237
+ {
238
+ line: '<?php abstract ?>',
239
+ tokens: [
240
+ { startIndex: 0, type: 'metatag.php' },
241
+ { startIndex: 5, type: '' },
242
+ { startIndex: 6, type: 'keyword.php' },
243
+ { startIndex: 14, type: '' },
244
+ { startIndex: 15, type: 'metatag.php' }
245
+ ]
246
+ }
247
+ ],
248
+
249
+ [
250
+ {
251
+ line: '<?php and ?>',
252
+ tokens: [
253
+ { startIndex: 0, type: 'metatag.php' },
254
+ { startIndex: 5, type: '' },
255
+ { startIndex: 6, type: 'keyword.php' },
256
+ { startIndex: 9, type: '' },
257
+ { startIndex: 10, type: 'metatag.php' }
258
+ ]
259
+ }
260
+ ],
261
+
262
+ [
263
+ {
264
+ line: '<?php array ?>',
265
+ tokens: [
266
+ { startIndex: 0, type: 'metatag.php' },
267
+ { startIndex: 5, type: '' },
268
+ { startIndex: 6, type: 'keyword.php' },
269
+ { startIndex: 11, type: '' },
270
+ { startIndex: 12, type: 'metatag.php' }
271
+ ]
272
+ }
273
+ ],
274
+
275
+ [
276
+ {
277
+ line: '<?php as ?>',
278
+ tokens: [
279
+ { startIndex: 0, type: 'metatag.php' },
280
+ { startIndex: 5, type: '' },
281
+ { startIndex: 6, type: 'keyword.php' },
282
+ { startIndex: 8, type: '' },
283
+ { startIndex: 9, type: 'metatag.php' }
284
+ ]
285
+ }
286
+ ],
287
+
288
+ [
289
+ {
290
+ line: '<?php break ?>',
291
+ tokens: [
292
+ { startIndex: 0, type: 'metatag.php' },
293
+ { startIndex: 5, type: '' },
294
+ { startIndex: 6, type: 'keyword.php' },
295
+ { startIndex: 11, type: '' },
296
+ { startIndex: 12, type: 'metatag.php' }
297
+ ]
298
+ }
299
+ ],
300
+
301
+ [
302
+ {
303
+ line: '<?php case ?>',
304
+ tokens: [
305
+ { startIndex: 0, type: 'metatag.php' },
306
+ { startIndex: 5, type: '' },
307
+ { startIndex: 6, type: 'keyword.php' },
308
+ { startIndex: 10, type: '' },
309
+ { startIndex: 11, type: 'metatag.php' }
310
+ ]
311
+ }
312
+ ],
313
+
314
+ [
315
+ {
316
+ line: '<?php catch ?>',
317
+ tokens: [
318
+ { startIndex: 0, type: 'metatag.php' },
319
+ { startIndex: 5, type: '' },
320
+ { startIndex: 6, type: 'keyword.php' },
321
+ { startIndex: 11, type: '' },
322
+ { startIndex: 12, type: 'metatag.php' }
323
+ ]
324
+ }
325
+ ],
326
+
327
+ [
328
+ {
329
+ line: '<?php cfunction ?>',
330
+ tokens: [
331
+ { startIndex: 0, type: 'metatag.php' },
332
+ { startIndex: 5, type: '' },
333
+ { startIndex: 6, type: 'keyword.php' },
334
+ { startIndex: 15, type: '' },
335
+ { startIndex: 16, type: 'metatag.php' }
336
+ ]
337
+ }
338
+ ],
339
+
340
+ [
341
+ {
342
+ line: '<?php class ?>',
343
+ tokens: [
344
+ { startIndex: 0, type: 'metatag.php' },
345
+ { startIndex: 5, type: '' },
346
+ { startIndex: 6, type: 'keyword.php' },
347
+ { startIndex: 11, type: '' },
348
+ { startIndex: 12, type: 'metatag.php' }
349
+ ]
350
+ }
351
+ ],
352
+
353
+ [
354
+ {
355
+ line: '<?php clone ?>',
356
+ tokens: [
357
+ { startIndex: 0, type: 'metatag.php' },
358
+ { startIndex: 5, type: '' },
359
+ { startIndex: 6, type: 'keyword.php' },
360
+ { startIndex: 11, type: '' },
361
+ { startIndex: 12, type: 'metatag.php' }
362
+ ]
363
+ }
364
+ ],
365
+
366
+ [
367
+ {
368
+ line: '<?php const ?>',
369
+ tokens: [
370
+ { startIndex: 0, type: 'metatag.php' },
371
+ { startIndex: 5, type: '' },
372
+ { startIndex: 6, type: 'keyword.php' },
373
+ { startIndex: 11, type: '' },
374
+ { startIndex: 12, type: 'metatag.php' }
375
+ ]
376
+ }
377
+ ],
378
+
379
+ [
380
+ {
381
+ line: '<?php continue ?>',
382
+ tokens: [
383
+ { startIndex: 0, type: 'metatag.php' },
384
+ { startIndex: 5, type: '' },
385
+ { startIndex: 6, type: 'keyword.php' },
386
+ { startIndex: 14, type: '' },
387
+ { startIndex: 15, type: 'metatag.php' }
388
+ ]
389
+ }
390
+ ],
391
+
392
+ [
393
+ {
394
+ line: '<?php declare ?>',
395
+ tokens: [
396
+ { startIndex: 0, type: 'metatag.php' },
397
+ { startIndex: 5, type: '' },
398
+ { startIndex: 6, type: 'keyword.php' },
399
+ { startIndex: 13, type: '' },
400
+ { startIndex: 14, type: 'metatag.php' }
401
+ ]
402
+ }
403
+ ],
404
+
405
+ [
406
+ {
407
+ line: '<?php default ?>',
408
+ tokens: [
409
+ { startIndex: 0, type: 'metatag.php' },
410
+ { startIndex: 5, type: '' },
411
+ { startIndex: 6, type: 'keyword.php' },
412
+ { startIndex: 13, type: '' },
413
+ { startIndex: 14, type: 'metatag.php' }
414
+ ]
415
+ }
416
+ ],
417
+
418
+ [
419
+ {
420
+ line: '<?php do ?>',
421
+ tokens: [
422
+ { startIndex: 0, type: 'metatag.php' },
423
+ { startIndex: 5, type: '' },
424
+ { startIndex: 6, type: 'keyword.php' },
425
+ { startIndex: 8, type: '' },
426
+ { startIndex: 9, type: 'metatag.php' }
427
+ ]
428
+ }
429
+ ],
430
+
431
+ [
432
+ {
433
+ line: '<?php else ?>',
434
+ tokens: [
435
+ { startIndex: 0, type: 'metatag.php' },
436
+ { startIndex: 5, type: '' },
437
+ { startIndex: 6, type: 'keyword.php' },
438
+ { startIndex: 10, type: '' },
439
+ { startIndex: 11, type: 'metatag.php' }
440
+ ]
441
+ }
442
+ ],
443
+
444
+ [
445
+ {
446
+ line: '<?php elseif ?>',
447
+ tokens: [
448
+ { startIndex: 0, type: 'metatag.php' },
449
+ { startIndex: 5, type: '' },
450
+ { startIndex: 6, type: 'keyword.php' },
451
+ { startIndex: 12, type: '' },
452
+ { startIndex: 13, type: 'metatag.php' }
453
+ ]
454
+ }
455
+ ],
456
+
457
+ [
458
+ {
459
+ line: '<?php enddeclare ?>',
460
+ tokens: [
461
+ { startIndex: 0, type: 'metatag.php' },
462
+ { startIndex: 5, type: '' },
463
+ { startIndex: 6, type: 'keyword.php' },
464
+ { startIndex: 16, type: '' },
465
+ { startIndex: 17, type: 'metatag.php' }
466
+ ]
467
+ }
468
+ ],
469
+
470
+ [
471
+ {
472
+ line: '<?php endfor ?>',
473
+ tokens: [
474
+ { startIndex: 0, type: 'metatag.php' },
475
+ { startIndex: 5, type: '' },
476
+ { startIndex: 6, type: 'keyword.php' },
477
+ { startIndex: 12, type: '' },
478
+ { startIndex: 13, type: 'metatag.php' }
479
+ ]
480
+ }
481
+ ],
482
+
483
+ [
484
+ {
485
+ line: '<?php endforeach ?>',
486
+ tokens: [
487
+ { startIndex: 0, type: 'metatag.php' },
488
+ { startIndex: 5, type: '' },
489
+ { startIndex: 6, type: 'keyword.php' },
490
+ { startIndex: 16, type: '' },
491
+ { startIndex: 17, type: 'metatag.php' }
492
+ ]
493
+ }
494
+ ],
495
+
496
+ [
497
+ {
498
+ line: '<?php endif ?>',
499
+ tokens: [
500
+ { startIndex: 0, type: 'metatag.php' },
501
+ { startIndex: 5, type: '' },
502
+ { startIndex: 6, type: 'keyword.php' },
503
+ { startIndex: 11, type: '' },
504
+ { startIndex: 12, type: 'metatag.php' }
505
+ ]
506
+ }
507
+ ],
508
+
509
+ [
510
+ {
511
+ line: '<?php endswitch ?>',
512
+ tokens: [
513
+ { startIndex: 0, type: 'metatag.php' },
514
+ { startIndex: 5, type: '' },
515
+ { startIndex: 6, type: 'keyword.php' },
516
+ { startIndex: 15, type: '' },
517
+ { startIndex: 16, type: 'metatag.php' }
518
+ ]
519
+ }
520
+ ],
521
+
522
+ [
523
+ {
524
+ line: '<?php endwhile ?>',
525
+ tokens: [
526
+ { startIndex: 0, type: 'metatag.php' },
527
+ { startIndex: 5, type: '' },
528
+ { startIndex: 6, type: 'keyword.php' },
529
+ { startIndex: 14, type: '' },
530
+ { startIndex: 15, type: 'metatag.php' }
531
+ ]
532
+ }
533
+ ],
534
+
535
+ [
536
+ {
537
+ line: '<?php extends ?>',
538
+ tokens: [
539
+ { startIndex: 0, type: 'metatag.php' },
540
+ { startIndex: 5, type: '' },
541
+ { startIndex: 6, type: 'keyword.php' },
542
+ { startIndex: 13, type: '' },
543
+ { startIndex: 14, type: 'metatag.php' }
544
+ ]
545
+ }
546
+ ],
547
+
548
+ [
549
+ {
550
+ line: '<?php false ?>',
551
+ tokens: [
552
+ { startIndex: 0, type: 'metatag.php' },
553
+ { startIndex: 5, type: '' },
554
+ { startIndex: 6, type: 'keyword.php' },
555
+ { startIndex: 11, type: '' },
556
+ { startIndex: 12, type: 'metatag.php' }
557
+ ]
558
+ }
559
+ ],
560
+
561
+ [
562
+ {
563
+ line: '<?php final ?>',
564
+ tokens: [
565
+ { startIndex: 0, type: 'metatag.php' },
566
+ { startIndex: 5, type: '' },
567
+ { startIndex: 6, type: 'keyword.php' },
568
+ { startIndex: 11, type: '' },
569
+ { startIndex: 12, type: 'metatag.php' }
570
+ ]
571
+ }
572
+ ],
573
+
574
+ [
575
+ {
576
+ line: '<?php for ?>',
577
+ tokens: [
578
+ { startIndex: 0, type: 'metatag.php' },
579
+ { startIndex: 5, type: '' },
580
+ { startIndex: 6, type: 'keyword.php' },
581
+ { startIndex: 9, type: '' },
582
+ { startIndex: 10, type: 'metatag.php' }
583
+ ]
584
+ }
585
+ ],
586
+
587
+ [
588
+ {
589
+ line: '<?php foreach ?>',
590
+ tokens: [
591
+ { startIndex: 0, type: 'metatag.php' },
592
+ { startIndex: 5, type: '' },
593
+ { startIndex: 6, type: 'keyword.php' },
594
+ { startIndex: 13, type: '' },
595
+ { startIndex: 14, type: 'metatag.php' }
596
+ ]
597
+ }
598
+ ],
599
+
600
+ [
601
+ {
602
+ line: '<?php function ?>',
603
+ tokens: [
604
+ { startIndex: 0, type: 'metatag.php' },
605
+ { startIndex: 5, type: '' },
606
+ { startIndex: 6, type: 'keyword.php' },
607
+ { startIndex: 14, type: '' },
608
+ { startIndex: 15, type: 'metatag.php' }
609
+ ]
610
+ }
611
+ ],
612
+
613
+ [
614
+ {
615
+ line: '<?php global ?>',
616
+ tokens: [
617
+ { startIndex: 0, type: 'metatag.php' },
618
+ { startIndex: 5, type: '' },
619
+ { startIndex: 6, type: 'keyword.php' },
620
+ { startIndex: 12, type: '' },
621
+ { startIndex: 13, type: 'metatag.php' }
622
+ ]
623
+ }
624
+ ],
625
+
626
+ [
627
+ {
628
+ line: '<?php goto ?>',
629
+ tokens: [
630
+ { startIndex: 0, type: 'metatag.php' },
631
+ { startIndex: 5, type: '' },
632
+ { startIndex: 6, type: 'keyword.php' },
633
+ { startIndex: 10, type: '' },
634
+ { startIndex: 11, type: 'metatag.php' }
635
+ ]
636
+ }
637
+ ],
638
+
639
+ [
640
+ {
641
+ line: '<?php if ?>',
642
+ tokens: [
643
+ { startIndex: 0, type: 'metatag.php' },
644
+ { startIndex: 5, type: '' },
645
+ { startIndex: 6, type: 'keyword.php' },
646
+ { startIndex: 8, type: '' },
647
+ { startIndex: 9, type: 'metatag.php' }
648
+ ]
649
+ }
650
+ ],
651
+
652
+ [
653
+ {
654
+ line: '<?php implements ?>',
655
+ tokens: [
656
+ { startIndex: 0, type: 'metatag.php' },
657
+ { startIndex: 5, type: '' },
658
+ { startIndex: 6, type: 'keyword.php' },
659
+ { startIndex: 16, type: '' },
660
+ { startIndex: 17, type: 'metatag.php' }
661
+ ]
662
+ }
663
+ ],
664
+
665
+ [
666
+ {
667
+ line: '<?php interface ?>',
668
+ tokens: [
669
+ { startIndex: 0, type: 'metatag.php' },
670
+ { startIndex: 5, type: '' },
671
+ { startIndex: 6, type: 'keyword.php' },
672
+ { startIndex: 15, type: '' },
673
+ { startIndex: 16, type: 'metatag.php' }
674
+ ]
675
+ }
676
+ ],
677
+
678
+ [
679
+ {
680
+ line: '<?php instanceof ?>',
681
+ tokens: [
682
+ { startIndex: 0, type: 'metatag.php' },
683
+ { startIndex: 5, type: '' },
684
+ { startIndex: 6, type: 'keyword.php' },
685
+ { startIndex: 16, type: '' },
686
+ { startIndex: 17, type: 'metatag.php' }
687
+ ]
688
+ }
689
+ ],
690
+
691
+ [
692
+ {
693
+ line: '<?php namespace ?>',
694
+ tokens: [
695
+ { startIndex: 0, type: 'metatag.php' },
696
+ { startIndex: 5, type: '' },
697
+ { startIndex: 6, type: 'keyword.php' },
698
+ { startIndex: 15, type: '' },
699
+ { startIndex: 16, type: 'metatag.php' }
700
+ ]
701
+ }
702
+ ],
703
+
704
+ [
705
+ {
706
+ line: '<?php new ?>',
707
+ tokens: [
708
+ { startIndex: 0, type: 'metatag.php' },
709
+ { startIndex: 5, type: '' },
710
+ { startIndex: 6, type: 'keyword.php' },
711
+ { startIndex: 9, type: '' },
712
+ { startIndex: 10, type: 'metatag.php' }
713
+ ]
714
+ }
715
+ ],
716
+
717
+ [
718
+ {
719
+ line: '<?php null ?>',
720
+ tokens: [
721
+ { startIndex: 0, type: 'metatag.php' },
722
+ { startIndex: 5, type: '' },
723
+ { startIndex: 6, type: 'keyword.php' },
724
+ { startIndex: 10, type: '' },
725
+ { startIndex: 11, type: 'metatag.php' }
726
+ ]
727
+ }
728
+ ],
729
+
730
+ [
731
+ {
732
+ line: '<?php object ?>',
733
+ tokens: [
734
+ { startIndex: 0, type: 'metatag.php' },
735
+ { startIndex: 5, type: '' },
736
+ { startIndex: 6, type: 'keyword.php' },
737
+ { startIndex: 12, type: '' },
738
+ { startIndex: 13, type: 'metatag.php' }
739
+ ]
740
+ }
741
+ ],
742
+
743
+ [
744
+ {
745
+ line: '<?php old_function ?>',
746
+ tokens: [
747
+ { startIndex: 0, type: 'metatag.php' },
748
+ { startIndex: 5, type: '' },
749
+ { startIndex: 6, type: 'keyword.php' },
750
+ { startIndex: 18, type: '' },
751
+ { startIndex: 19, type: 'metatag.php' }
752
+ ]
753
+ }
754
+ ],
755
+
756
+ [
757
+ {
758
+ line: '<?php or ?>',
759
+ tokens: [
760
+ { startIndex: 0, type: 'metatag.php' },
761
+ { startIndex: 5, type: '' },
762
+ { startIndex: 6, type: 'keyword.php' },
763
+ { startIndex: 8, type: '' },
764
+ { startIndex: 9, type: 'metatag.php' }
765
+ ]
766
+ }
767
+ ],
768
+
769
+ [
770
+ {
771
+ line: '<?php private ?>',
772
+ tokens: [
773
+ { startIndex: 0, type: 'metatag.php' },
774
+ { startIndex: 5, type: '' },
775
+ { startIndex: 6, type: 'keyword.php' },
776
+ { startIndex: 13, type: '' },
777
+ { startIndex: 14, type: 'metatag.php' }
778
+ ]
779
+ }
780
+ ],
781
+
782
+ [
783
+ {
784
+ line: '<?php protected ?>',
785
+ tokens: [
786
+ { startIndex: 0, type: 'metatag.php' },
787
+ { startIndex: 5, type: '' },
788
+ { startIndex: 6, type: 'keyword.php' },
789
+ { startIndex: 15, type: '' },
790
+ { startIndex: 16, type: 'metatag.php' }
791
+ ]
792
+ }
793
+ ],
794
+
795
+ [
796
+ {
797
+ line: '<?php public ?>',
798
+ tokens: [
799
+ { startIndex: 0, type: 'metatag.php' },
800
+ { startIndex: 5, type: '' },
801
+ { startIndex: 6, type: 'keyword.php' },
802
+ { startIndex: 12, type: '' },
803
+ { startIndex: 13, type: 'metatag.php' }
804
+ ]
805
+ }
806
+ ],
807
+
808
+ [
809
+ {
810
+ line: '<?php resource ?>',
811
+ tokens: [
812
+ { startIndex: 0, type: 'metatag.php' },
813
+ { startIndex: 5, type: '' },
814
+ { startIndex: 6, type: 'keyword.php' },
815
+ { startIndex: 14, type: '' },
816
+ { startIndex: 15, type: 'metatag.php' }
817
+ ]
818
+ }
819
+ ],
820
+
821
+ [
822
+ {
823
+ line: '<?php static ?>',
824
+ tokens: [
825
+ { startIndex: 0, type: 'metatag.php' },
826
+ { startIndex: 5, type: '' },
827
+ { startIndex: 6, type: 'keyword.php' },
828
+ { startIndex: 12, type: '' },
829
+ { startIndex: 13, type: 'metatag.php' }
830
+ ]
831
+ }
832
+ ],
833
+
834
+ [
835
+ {
836
+ line: '<?php switch ?>',
837
+ tokens: [
838
+ { startIndex: 0, type: 'metatag.php' },
839
+ { startIndex: 5, type: '' },
840
+ { startIndex: 6, type: 'keyword.php' },
841
+ { startIndex: 12, type: '' },
842
+ { startIndex: 13, type: 'metatag.php' }
843
+ ]
844
+ }
845
+ ],
846
+
847
+ [
848
+ {
849
+ line: '<?php throw ?>',
850
+ tokens: [
851
+ { startIndex: 0, type: 'metatag.php' },
852
+ { startIndex: 5, type: '' },
853
+ { startIndex: 6, type: 'keyword.php' },
854
+ { startIndex: 11, type: '' },
855
+ { startIndex: 12, type: 'metatag.php' }
856
+ ]
857
+ }
858
+ ],
859
+
860
+ [
861
+ {
862
+ line: '<?php try ?>',
863
+ tokens: [
864
+ { startIndex: 0, type: 'metatag.php' },
865
+ { startIndex: 5, type: '' },
866
+ { startIndex: 6, type: 'keyword.php' },
867
+ { startIndex: 9, type: '' },
868
+ { startIndex: 10, type: 'metatag.php' }
869
+ ]
870
+ }
871
+ ],
872
+
873
+ [
874
+ {
875
+ line: '<?php true ?>',
876
+ tokens: [
877
+ { startIndex: 0, type: 'metatag.php' },
878
+ { startIndex: 5, type: '' },
879
+ { startIndex: 6, type: 'keyword.php' },
880
+ { startIndex: 10, type: '' },
881
+ { startIndex: 11, type: 'metatag.php' }
882
+ ]
883
+ }
884
+ ],
885
+
886
+ [
887
+ {
888
+ line: '<?php use ?>',
889
+ tokens: [
890
+ { startIndex: 0, type: 'metatag.php' },
891
+ { startIndex: 5, type: '' },
892
+ { startIndex: 6, type: 'keyword.php' },
893
+ { startIndex: 9, type: '' },
894
+ { startIndex: 10, type: 'metatag.php' }
895
+ ]
896
+ }
897
+ ],
898
+
899
+ [
900
+ {
901
+ line: '<?php var ?>',
902
+ tokens: [
903
+ { startIndex: 0, type: 'metatag.php' },
904
+ { startIndex: 5, type: '' },
905
+ { startIndex: 6, type: 'keyword.php' },
906
+ { startIndex: 9, type: '' },
907
+ { startIndex: 10, type: 'metatag.php' }
908
+ ]
909
+ }
910
+ ],
911
+
912
+ [
913
+ {
914
+ line: '<?php while ?>',
915
+ tokens: [
916
+ { startIndex: 0, type: 'metatag.php' },
917
+ { startIndex: 5, type: '' },
918
+ { startIndex: 6, type: 'keyword.php' },
919
+ { startIndex: 11, type: '' },
920
+ { startIndex: 12, type: 'metatag.php' }
921
+ ]
922
+ }
923
+ ],
924
+
925
+ [
926
+ {
927
+ line: '<?php xor ?>',
928
+ tokens: [
929
+ { startIndex: 0, type: 'metatag.php' },
930
+ { startIndex: 5, type: '' },
931
+ { startIndex: 6, type: 'keyword.php' },
932
+ { startIndex: 9, type: '' },
933
+ { startIndex: 10, type: 'metatag.php' }
934
+ ]
935
+ }
936
+ ],
937
+
938
+ [
939
+ {
940
+ line: '<?php die ?>',
941
+ tokens: [
942
+ { startIndex: 0, type: 'metatag.php' },
943
+ { startIndex: 5, type: '' },
944
+ { startIndex: 6, type: 'keyword.php' },
945
+ { startIndex: 9, type: '' },
946
+ { startIndex: 10, type: 'metatag.php' }
947
+ ]
948
+ }
949
+ ],
950
+
951
+ [
952
+ {
953
+ line: '<?php echo ?>',
954
+ tokens: [
955
+ { startIndex: 0, type: 'metatag.php' },
956
+ { startIndex: 5, type: '' },
957
+ { startIndex: 6, type: 'keyword.php' },
958
+ { startIndex: 10, type: '' },
959
+ { startIndex: 11, type: 'metatag.php' }
960
+ ]
961
+ }
962
+ ],
963
+
964
+ [
965
+ {
966
+ line: '<?php empty ?>',
967
+ tokens: [
968
+ { startIndex: 0, type: 'metatag.php' },
969
+ { startIndex: 5, type: '' },
970
+ { startIndex: 6, type: 'keyword.php' },
971
+ { startIndex: 11, type: '' },
972
+ { startIndex: 12, type: 'metatag.php' }
973
+ ]
974
+ }
975
+ ],
976
+
977
+ [
978
+ {
979
+ line: '<?php exit ?>',
980
+ tokens: [
981
+ { startIndex: 0, type: 'metatag.php' },
982
+ { startIndex: 5, type: '' },
983
+ { startIndex: 6, type: 'keyword.php' },
984
+ { startIndex: 10, type: '' },
985
+ { startIndex: 11, type: 'metatag.php' }
986
+ ]
987
+ }
988
+ ],
989
+
990
+ [
991
+ {
992
+ line: '<?php eval ?>',
993
+ tokens: [
994
+ { startIndex: 0, type: 'metatag.php' },
995
+ { startIndex: 5, type: '' },
996
+ { startIndex: 6, type: 'keyword.php' },
997
+ { startIndex: 10, type: '' },
998
+ { startIndex: 11, type: 'metatag.php' }
999
+ ]
1000
+ }
1001
+ ],
1002
+
1003
+ [
1004
+ {
1005
+ line: '<?php include ?>',
1006
+ tokens: [
1007
+ { startIndex: 0, type: 'metatag.php' },
1008
+ { startIndex: 5, type: '' },
1009
+ { startIndex: 6, type: 'keyword.php' },
1010
+ { startIndex: 13, type: '' },
1011
+ { startIndex: 14, type: 'metatag.php' }
1012
+ ]
1013
+ }
1014
+ ],
1015
+
1016
+ [
1017
+ {
1018
+ line: '<?php include_once ?>',
1019
+ tokens: [
1020
+ { startIndex: 0, type: 'metatag.php' },
1021
+ { startIndex: 5, type: '' },
1022
+ { startIndex: 6, type: 'keyword.php' },
1023
+ { startIndex: 18, type: '' },
1024
+ { startIndex: 19, type: 'metatag.php' }
1025
+ ]
1026
+ }
1027
+ ],
1028
+
1029
+ [
1030
+ {
1031
+ line: '<?php isset ?>',
1032
+ tokens: [
1033
+ { startIndex: 0, type: 'metatag.php' },
1034
+ { startIndex: 5, type: '' },
1035
+ { startIndex: 6, type: 'keyword.php' },
1036
+ { startIndex: 11, type: '' },
1037
+ { startIndex: 12, type: 'metatag.php' }
1038
+ ]
1039
+ }
1040
+ ],
1041
+
1042
+ [
1043
+ {
1044
+ line: '<?php list ?>',
1045
+ tokens: [
1046
+ { startIndex: 0, type: 'metatag.php' },
1047
+ { startIndex: 5, type: '' },
1048
+ { startIndex: 6, type: 'keyword.php' },
1049
+ { startIndex: 10, type: '' },
1050
+ { startIndex: 11, type: 'metatag.php' }
1051
+ ]
1052
+ }
1053
+ ],
1054
+
1055
+ [
1056
+ {
1057
+ line: '<?php require ?>',
1058
+ tokens: [
1059
+ { startIndex: 0, type: 'metatag.php' },
1060
+ { startIndex: 5, type: '' },
1061
+ { startIndex: 6, type: 'keyword.php' },
1062
+ { startIndex: 13, type: '' },
1063
+ { startIndex: 14, type: 'metatag.php' }
1064
+ ]
1065
+ }
1066
+ ],
1067
+
1068
+ [
1069
+ {
1070
+ line: '<?php require_once ?>',
1071
+ tokens: [
1072
+ { startIndex: 0, type: 'metatag.php' },
1073
+ { startIndex: 5, type: '' },
1074
+ { startIndex: 6, type: 'keyword.php' },
1075
+ { startIndex: 18, type: '' },
1076
+ { startIndex: 19, type: 'metatag.php' }
1077
+ ]
1078
+ }
1079
+ ],
1080
+
1081
+ [
1082
+ {
1083
+ line: '<?php return ?>',
1084
+ tokens: [
1085
+ { startIndex: 0, type: 'metatag.php' },
1086
+ { startIndex: 5, type: '' },
1087
+ { startIndex: 6, type: 'keyword.php' },
1088
+ { startIndex: 12, type: '' },
1089
+ { startIndex: 13, type: 'metatag.php' }
1090
+ ]
1091
+ }
1092
+ ],
1093
+
1094
+ [
1095
+ {
1096
+ line: '<?php print ?>',
1097
+ tokens: [
1098
+ { startIndex: 0, type: 'metatag.php' },
1099
+ { startIndex: 5, type: '' },
1100
+ { startIndex: 6, type: 'keyword.php' },
1101
+ { startIndex: 11, type: '' },
1102
+ { startIndex: 12, type: 'metatag.php' }
1103
+ ]
1104
+ }
1105
+ ],
1106
+
1107
+ [
1108
+ {
1109
+ line: '<?php unset ?>',
1110
+ tokens: [
1111
+ { startIndex: 0, type: 'metatag.php' },
1112
+ { startIndex: 5, type: '' },
1113
+ { startIndex: 6, type: 'keyword.php' },
1114
+ { startIndex: 11, type: '' },
1115
+ { startIndex: 12, type: 'metatag.php' }
1116
+ ]
1117
+ }
1118
+ ],
1119
+
1120
+ [
1121
+ {
1122
+ line: '<?php __construct ?>',
1123
+ tokens: [
1124
+ { startIndex: 0, type: 'metatag.php' },
1125
+ { startIndex: 5, type: '' },
1126
+ { startIndex: 6, type: 'keyword.php' },
1127
+ { startIndex: 17, type: '' },
1128
+ { startIndex: 18, type: 'metatag.php' }
1129
+ ]
1130
+ }
1131
+ ],
1132
+
1133
+ // Compile Time Constants
1134
+ [
1135
+ {
1136
+ line: '<?php __FILE__ ?>',
1137
+ tokens: [
1138
+ { startIndex: 0, type: 'metatag.php' },
1139
+ { startIndex: 5, type: '' },
1140
+ { startIndex: 6, type: 'constant.php' },
1141
+ { startIndex: 14, type: '' },
1142
+ { startIndex: 15, type: 'metatag.php' }
1143
+ ]
1144
+ }
1145
+ ],
1146
+
1147
+ [
1148
+ {
1149
+ line: '<?php $myscript = __FILE__; ?>',
1150
+ tokens: [
1151
+ { startIndex: 0, type: 'metatag.php' },
1152
+ { startIndex: 5, type: '' },
1153
+ { startIndex: 6, type: 'variable.php' },
1154
+ { startIndex: 15, type: '' },
1155
+ { startIndex: 16, type: 'delimiter.php' },
1156
+ { startIndex: 17, type: '' },
1157
+ { startIndex: 18, type: 'constant.php' },
1158
+ { startIndex: 26, type: 'delimiter.php' },
1159
+ { startIndex: 27, type: '' },
1160
+ { startIndex: 28, type: 'metatag.php' }
1161
+ ]
1162
+ }
1163
+ ],
1164
+
1165
+ [
1166
+ {
1167
+ line: '<?php __CLASS__ ?>',
1168
+ tokens: [
1169
+ { startIndex: 0, type: 'metatag.php' },
1170
+ { startIndex: 5, type: '' },
1171
+ { startIndex: 6, type: 'constant.php' },
1172
+ { startIndex: 15, type: '' },
1173
+ { startIndex: 16, type: 'metatag.php' }
1174
+ ]
1175
+ }
1176
+ ],
1177
+
1178
+ [
1179
+ {
1180
+ line: '<?php __DIR__ ?>',
1181
+ tokens: [
1182
+ { startIndex: 0, type: 'metatag.php' },
1183
+ { startIndex: 5, type: '' },
1184
+ { startIndex: 6, type: 'constant.php' },
1185
+ { startIndex: 13, type: '' },
1186
+ { startIndex: 14, type: 'metatag.php' }
1187
+ ]
1188
+ }
1189
+ ],
1190
+
1191
+ [
1192
+ {
1193
+ line: '<?php __LINE__ ?>',
1194
+ tokens: [
1195
+ { startIndex: 0, type: 'metatag.php' },
1196
+ { startIndex: 5, type: '' },
1197
+ { startIndex: 6, type: 'constant.php' },
1198
+ { startIndex: 14, type: '' },
1199
+ { startIndex: 15, type: 'metatag.php' }
1200
+ ]
1201
+ }
1202
+ ],
1203
+
1204
+ [
1205
+ {
1206
+ line: '<?php __NAMESPACE__ ?>',
1207
+ tokens: [
1208
+ { startIndex: 0, type: 'metatag.php' },
1209
+ { startIndex: 5, type: '' },
1210
+ { startIndex: 6, type: 'constant.php' },
1211
+ { startIndex: 19, type: '' },
1212
+ { startIndex: 20, type: 'metatag.php' }
1213
+ ]
1214
+ }
1215
+ ],
1216
+
1217
+ [
1218
+ {
1219
+ line: '<?php __METHOD__ ?>',
1220
+ tokens: [
1221
+ { startIndex: 0, type: 'metatag.php' },
1222
+ { startIndex: 5, type: '' },
1223
+ { startIndex: 6, type: 'constant.php' },
1224
+ { startIndex: 16, type: '' },
1225
+ { startIndex: 17, type: 'metatag.php' }
1226
+ ]
1227
+ }
1228
+ ],
1229
+
1230
+ [
1231
+ {
1232
+ line: '<?php __FUNCTION__ ?>',
1233
+ tokens: [
1234
+ { startIndex: 0, type: 'metatag.php' },
1235
+ { startIndex: 5, type: '' },
1236
+ { startIndex: 6, type: 'constant.php' },
1237
+ { startIndex: 18, type: '' },
1238
+ { startIndex: 19, type: 'metatag.php' }
1239
+ ]
1240
+ }
1241
+ ],
1242
+
1243
+ [
1244
+ {
1245
+ line: '<?php __TRAIT__ ?>',
1246
+ tokens: [
1247
+ { startIndex: 0, type: 'metatag.php' },
1248
+ { startIndex: 5, type: '' },
1249
+ { startIndex: 6, type: 'constant.php' },
1250
+ { startIndex: 15, type: '' },
1251
+ { startIndex: 16, type: 'metatag.php' }
1252
+ ]
1253
+ }
1254
+ ],
1255
+
1256
+ // Predefined Variables
1257
+ [
1258
+ {
1259
+ line: '<?php $_ENV ?>',
1260
+ tokens: [
1261
+ { startIndex: 0, type: 'metatag.php' },
1262
+ { startIndex: 5, type: '' },
1263
+ { startIndex: 6, type: 'variable.predefined.php' },
1264
+ { startIndex: 11, type: '' },
1265
+ { startIndex: 12, type: 'metatag.php' }
1266
+ ]
1267
+ }
1268
+ ],
1269
+
1270
+ [
1271
+ {
1272
+ line: '<?php echo $_ENV; ?>',
1273
+ tokens: [
1274
+ { startIndex: 0, type: 'metatag.php' },
1275
+ { startIndex: 5, type: '' },
1276
+ { startIndex: 6, type: 'keyword.php' },
1277
+ { startIndex: 10, type: '' },
1278
+ { startIndex: 11, type: 'variable.predefined.php' },
1279
+ { startIndex: 16, type: 'delimiter.php' },
1280
+ { startIndex: 17, type: '' },
1281
+ { startIndex: 18, type: 'metatag.php' }
1282
+ ]
1283
+ }
1284
+ ],
1285
+
1286
+ [
1287
+ {
1288
+ line: '<?php $GLOBALS ?>',
1289
+ tokens: [
1290
+ { startIndex: 0, type: 'metatag.php' },
1291
+ { startIndex: 5, type: '' },
1292
+ { startIndex: 6, type: 'variable.predefined.php' },
1293
+ { startIndex: 14, type: '' },
1294
+ { startIndex: 15, type: 'metatag.php' }
1295
+ ]
1296
+ }
1297
+ ],
1298
+
1299
+ [
1300
+ {
1301
+ line: '<?php $_SERVER ?>',
1302
+ tokens: [
1303
+ { startIndex: 0, type: 'metatag.php' },
1304
+ { startIndex: 5, type: '' },
1305
+ { startIndex: 6, type: 'variable.predefined.php' },
1306
+ { startIndex: 14, type: '' },
1307
+ { startIndex: 15, type: 'metatag.php' }
1308
+ ]
1309
+ }
1310
+ ],
1311
+
1312
+ [
1313
+ {
1314
+ line: '<?php $_GET ?>',
1315
+ tokens: [
1316
+ { startIndex: 0, type: 'metatag.php' },
1317
+ { startIndex: 5, type: '' },
1318
+ { startIndex: 6, type: 'variable.predefined.php' },
1319
+ { startIndex: 11, type: '' },
1320
+ { startIndex: 12, type: 'metatag.php' }
1321
+ ]
1322
+ }
1323
+ ],
1324
+
1325
+ [
1326
+ {
1327
+ line: '<?php $_POST ?>',
1328
+ tokens: [
1329
+ { startIndex: 0, type: 'metatag.php' },
1330
+ { startIndex: 5, type: '' },
1331
+ { startIndex: 6, type: 'variable.predefined.php' },
1332
+ { startIndex: 12, type: '' },
1333
+ { startIndex: 13, type: 'metatag.php' }
1334
+ ]
1335
+ }
1336
+ ],
1337
+
1338
+ [
1339
+ {
1340
+ line: '<?php $_FILES ?>',
1341
+ tokens: [
1342
+ { startIndex: 0, type: 'metatag.php' },
1343
+ { startIndex: 5, type: '' },
1344
+ { startIndex: 6, type: 'variable.predefined.php' },
1345
+ { startIndex: 13, type: '' },
1346
+ { startIndex: 14, type: 'metatag.php' }
1347
+ ]
1348
+ }
1349
+ ],
1350
+
1351
+ [
1352
+ {
1353
+ line: '<?php $_REQUEST ?>',
1354
+ tokens: [
1355
+ { startIndex: 0, type: 'metatag.php' },
1356
+ { startIndex: 5, type: '' },
1357
+ { startIndex: 6, type: 'variable.predefined.php' },
1358
+ { startIndex: 15, type: '' },
1359
+ { startIndex: 16, type: 'metatag.php' }
1360
+ ]
1361
+ }
1362
+ ],
1363
+
1364
+ [
1365
+ {
1366
+ line: '<?php $_SESSION ?>',
1367
+ tokens: [
1368
+ { startIndex: 0, type: 'metatag.php' },
1369
+ { startIndex: 5, type: '' },
1370
+ { startIndex: 6, type: 'variable.predefined.php' },
1371
+ { startIndex: 15, type: '' },
1372
+ { startIndex: 16, type: 'metatag.php' }
1373
+ ]
1374
+ }
1375
+ ],
1376
+
1377
+ [
1378
+ {
1379
+ line: '<?php $_ENV ?>',
1380
+ tokens: [
1381
+ { startIndex: 0, type: 'metatag.php' },
1382
+ { startIndex: 5, type: '' },
1383
+ { startIndex: 6, type: 'variable.predefined.php' },
1384
+ { startIndex: 11, type: '' },
1385
+ { startIndex: 12, type: 'metatag.php' }
1386
+ ]
1387
+ }
1388
+ ],
1389
+
1390
+ [
1391
+ {
1392
+ line: '<?php $_COOKIE ?>',
1393
+ tokens: [
1394
+ { startIndex: 0, type: 'metatag.php' },
1395
+ { startIndex: 5, type: '' },
1396
+ { startIndex: 6, type: 'variable.predefined.php' },
1397
+ { startIndex: 14, type: '' },
1398
+ { startIndex: 15, type: 'metatag.php' }
1399
+ ]
1400
+ }
1401
+ ],
1402
+
1403
+ [
1404
+ {
1405
+ line: '<?php $php_errormsg ?>',
1406
+ tokens: [
1407
+ { startIndex: 0, type: 'metatag.php' },
1408
+ { startIndex: 5, type: '' },
1409
+ { startIndex: 6, type: 'variable.predefined.php' },
1410
+ { startIndex: 19, type: '' },
1411
+ { startIndex: 20, type: 'metatag.php' }
1412
+ ]
1413
+ }
1414
+ ],
1415
+
1416
+ [
1417
+ {
1418
+ line: '<?php $HTTP_RAW_POST_DATA ?>',
1419
+ tokens: [
1420
+ { startIndex: 0, type: 'metatag.php' },
1421
+ { startIndex: 5, type: '' },
1422
+ { startIndex: 6, type: 'variable.predefined.php' },
1423
+ { startIndex: 25, type: '' },
1424
+ { startIndex: 26, type: 'metatag.php' }
1425
+ ]
1426
+ }
1427
+ ],
1428
+
1429
+ [
1430
+ {
1431
+ line: '<?php $http_response_header ?>',
1432
+ tokens: [
1433
+ { startIndex: 0, type: 'metatag.php' },
1434
+ { startIndex: 5, type: '' },
1435
+ { startIndex: 6, type: 'variable.predefined.php' },
1436
+ { startIndex: 27, type: '' },
1437
+ { startIndex: 28, type: 'metatag.php' }
1438
+ ]
1439
+ }
1440
+ ],
1441
+
1442
+ [
1443
+ {
1444
+ line: '<?php $argc ?>',
1445
+ tokens: [
1446
+ { startIndex: 0, type: 'metatag.php' },
1447
+ { startIndex: 5, type: '' },
1448
+ { startIndex: 6, type: 'variable.predefined.php' },
1449
+ { startIndex: 11, type: '' },
1450
+ { startIndex: 12, type: 'metatag.php' }
1451
+ ]
1452
+ }
1453
+ ],
1454
+
1455
+ [
1456
+ {
1457
+ line: '<?php $argv ?>',
1458
+ tokens: [
1459
+ { startIndex: 0, type: 'metatag.php' },
1460
+ { startIndex: 5, type: '' },
1461
+ { startIndex: 6, type: 'variable.predefined.php' },
1462
+ { startIndex: 11, type: '' },
1463
+ { startIndex: 12, type: 'metatag.php' }
1464
+ ]
1465
+ }
1466
+ ],
1467
+
1468
+ // Comments - single line
1469
+ [
1470
+ {
1471
+ line: '<?php // a',
1472
+ tokens: [
1473
+ { startIndex: 0, type: 'metatag.php' },
1474
+ { startIndex: 5, type: '' },
1475
+ { startIndex: 6, type: 'comment.php' }
1476
+ ]
1477
+ }
1478
+ ],
1479
+
1480
+ [
1481
+ {
1482
+ line: '<?php / / / not a comment',
1483
+ tokens: [
1484
+ { startIndex: 0, type: 'metatag.php' },
1485
+ { startIndex: 5, type: '' },
1486
+ { startIndex: 6, type: 'delimiter.php' },
1487
+ { startIndex: 7, type: '' },
1488
+ { startIndex: 8, type: 'delimiter.php' },
1489
+ { startIndex: 9, type: '' },
1490
+ { startIndex: 10, type: 'delimiter.php' },
1491
+ { startIndex: 11, type: '' },
1492
+ { startIndex: 12, type: 'identifier.php' },
1493
+ { startIndex: 15, type: '' },
1494
+ { startIndex: 16, type: 'identifier.php' },
1495
+ { startIndex: 17, type: '' },
1496
+ { startIndex: 18, type: 'identifier.php' }
1497
+ ]
1498
+ }
1499
+ ],
1500
+
1501
+ [
1502
+ {
1503
+ line: '<?php // a comment',
1504
+ tokens: [
1505
+ { startIndex: 0, type: 'metatag.php' },
1506
+ { startIndex: 5, type: '' },
1507
+ { startIndex: 9, type: 'comment.php' }
1508
+ ]
1509
+ }
1510
+ ],
1511
+
1512
+ [
1513
+ {
1514
+ line: '<?php // a comment',
1515
+ tokens: [
1516
+ { startIndex: 0, type: 'metatag.php' },
1517
+ { startIndex: 5, type: '' },
1518
+ { startIndex: 6, type: 'comment.php' }
1519
+ ]
1520
+ }
1521
+ ],
1522
+
1523
+ [
1524
+ {
1525
+ line: '<?php //sticky comment',
1526
+ tokens: [
1527
+ { startIndex: 0, type: 'metatag.php' },
1528
+ { startIndex: 5, type: '' },
1529
+ { startIndex: 6, type: 'comment.php' }
1530
+ ]
1531
+ }
1532
+ ],
1533
+
1534
+ [
1535
+ {
1536
+ line: '<?php /almost a comment',
1537
+ tokens: [
1538
+ { startIndex: 0, type: 'metatag.php' },
1539
+ { startIndex: 5, type: '' },
1540
+ { startIndex: 6, type: 'delimiter.php' },
1541
+ { startIndex: 7, type: 'identifier.php' },
1542
+ { startIndex: 13, type: '' },
1543
+ { startIndex: 14, type: 'identifier.php' },
1544
+ { startIndex: 15, type: '' },
1545
+ { startIndex: 16, type: 'identifier.php' }
1546
+ ]
1547
+ }
1548
+ ],
1549
+
1550
+ [
1551
+ {
1552
+ line: '<?php $x = 1; // my comment // is a nice one',
1553
+ tokens: [
1554
+ { startIndex: 0, type: 'metatag.php' },
1555
+ { startIndex: 5, type: '' },
1556
+ { startIndex: 6, type: 'variable.php' },
1557
+ { startIndex: 8, type: '' },
1558
+ { startIndex: 9, type: 'delimiter.php' },
1559
+ { startIndex: 10, type: '' },
1560
+ { startIndex: 11, type: 'number.php' },
1561
+ { startIndex: 12, type: 'delimiter.php' },
1562
+ { startIndex: 13, type: '' },
1563
+ { startIndex: 14, type: 'comment.php' }
1564
+ ]
1565
+ }
1566
+ ],
1567
+
1568
+ // Comments - range comment, single line
1569
+ [
1570
+ {
1571
+ line: '<?php /* a simple comment */ ?>',
1572
+ tokens: [
1573
+ { startIndex: 0, type: 'metatag.php' },
1574
+ { startIndex: 5, type: '' },
1575
+ { startIndex: 6, type: 'comment.php' },
1576
+ { startIndex: 28, type: '' },
1577
+ { startIndex: 29, type: 'metatag.php' }
1578
+ ]
1579
+ }
1580
+ ],
1581
+
1582
+ [
1583
+ {
1584
+ line: '<?php $x = /* a simple comment */ 1; ?>',
1585
+ tokens: [
1586
+ { startIndex: 0, type: 'metatag.php' },
1587
+ { startIndex: 5, type: '' },
1588
+ { startIndex: 6, type: 'variable.php' },
1589
+ { startIndex: 8, type: '' },
1590
+ { startIndex: 9, type: 'delimiter.php' },
1591
+ { startIndex: 10, type: '' },
1592
+ { startIndex: 11, type: 'comment.php' },
1593
+ { startIndex: 33, type: '' },
1594
+ { startIndex: 34, type: 'number.php' },
1595
+ { startIndex: 35, type: 'delimiter.php' },
1596
+ { startIndex: 36, type: '' },
1597
+ { startIndex: 37, type: 'metatag.php' }
1598
+ ]
1599
+ }
1600
+ ],
1601
+
1602
+ [
1603
+ {
1604
+ line: '<?php $x = /* comment */ 1; */ ?>',
1605
+ tokens: [
1606
+ { startIndex: 0, type: 'metatag.php' },
1607
+ { startIndex: 5, type: '' },
1608
+ { startIndex: 6, type: 'variable.php' },
1609
+ { startIndex: 8, type: '' },
1610
+ { startIndex: 9, type: 'delimiter.php' },
1611
+ { startIndex: 10, type: '' },
1612
+ { startIndex: 11, type: 'comment.php' },
1613
+ { startIndex: 24, type: '' },
1614
+ { startIndex: 25, type: 'number.php' },
1615
+ { startIndex: 26, type: 'delimiter.php' },
1616
+ { startIndex: 27, type: '' },
1617
+ { startIndex: 28, type: 'delimiter.php' },
1618
+ { startIndex: 30, type: '' },
1619
+ { startIndex: 31, type: 'metatag.php' }
1620
+ ]
1621
+ }
1622
+ ],
1623
+
1624
+ [
1625
+ {
1626
+ line: '<?php $x = /**/; ?>',
1627
+ tokens: [
1628
+ { startIndex: 0, type: 'metatag.php' },
1629
+ { startIndex: 5, type: '' },
1630
+ { startIndex: 6, type: 'variable.php' },
1631
+ { startIndex: 8, type: '' },
1632
+ { startIndex: 9, type: 'delimiter.php' },
1633
+ { startIndex: 10, type: '' },
1634
+ { startIndex: 11, type: 'comment.php' },
1635
+ { startIndex: 15, type: 'delimiter.php' },
1636
+ { startIndex: 16, type: '' },
1637
+ { startIndex: 17, type: 'metatag.php' }
1638
+ ]
1639
+ }
1640
+ ],
1641
+
1642
+ [
1643
+ {
1644
+ line: '<?php $x = /*/;',
1645
+ tokens: [
1646
+ { startIndex: 0, type: 'metatag.php' },
1647
+ { startIndex: 5, type: '' },
1648
+ { startIndex: 6, type: 'variable.php' },
1649
+ { startIndex: 8, type: '' },
1650
+ { startIndex: 9, type: 'delimiter.php' },
1651
+ { startIndex: 10, type: '' },
1652
+ { startIndex: 11, type: 'comment.php' }
1653
+ ]
1654
+ }
1655
+ ],
1656
+
1657
+ // Comments - range comment, multi lines
1658
+ [
1659
+ {
1660
+ line: '<?php /* a multiline comment',
1661
+ tokens: [
1662
+ { startIndex: 0, type: 'metatag.php' },
1663
+ { startIndex: 5, type: '' },
1664
+ { startIndex: 6, type: 'comment.php' }
1665
+ ]
1666
+ },
1667
+ {
1668
+ line: 'can actually span',
1669
+ tokens: [{ startIndex: 0, type: 'comment.php' }]
1670
+ },
1671
+ {
1672
+ line: 'multiple lines */',
1673
+ tokens: [{ startIndex: 0, type: 'comment.php' }]
1674
+ }
1675
+ ],
1676
+
1677
+ [
1678
+ {
1679
+ line: '<?php $x = /* start a comment',
1680
+ tokens: [
1681
+ { startIndex: 0, type: 'metatag.php' },
1682
+ { startIndex: 5, type: '' },
1683
+ { startIndex: 6, type: 'variable.php' },
1684
+ { startIndex: 8, type: '' },
1685
+ { startIndex: 9, type: 'delimiter.php' },
1686
+ { startIndex: 10, type: '' },
1687
+ { startIndex: 11, type: 'comment.php' }
1688
+ ]
1689
+ },
1690
+ {
1691
+ line: ' a ',
1692
+ tokens: [{ startIndex: 0, type: 'comment.php' }]
1693
+ },
1694
+ {
1695
+ line: 'and end it */ var a = 2;',
1696
+ tokens: [
1697
+ { startIndex: 0, type: 'comment.php' },
1698
+ { startIndex: 13, type: '' },
1699
+ { startIndex: 14, type: 'keyword.php' },
1700
+ { startIndex: 17, type: '' },
1701
+ { startIndex: 18, type: 'identifier.php' },
1702
+ { startIndex: 19, type: '' },
1703
+ { startIndex: 20, type: 'delimiter.php' },
1704
+ { startIndex: 21, type: '' },
1705
+ { startIndex: 22, type: 'number.php' },
1706
+ { startIndex: 23, type: 'delimiter.php' }
1707
+ ]
1708
+ }
1709
+ ],
1710
+
1711
+ // Strings
1712
+ [
1713
+ {
1714
+ line: "<?php $a = 'a'; ?>",
1715
+ tokens: [
1716
+ { startIndex: 0, type: 'metatag.php' },
1717
+ { startIndex: 5, type: '' },
1718
+ { startIndex: 6, type: 'variable.php' },
1719
+ { startIndex: 8, type: '' },
1720
+ { startIndex: 9, type: 'delimiter.php' },
1721
+ { startIndex: 10, type: '' },
1722
+ { startIndex: 11, type: 'string.php' },
1723
+ { startIndex: 14, type: 'delimiter.php' },
1724
+ { startIndex: 15, type: '' },
1725
+ { startIndex: 16, type: 'metatag.php' }
1726
+ ]
1727
+ }
1728
+ ],
1729
+
1730
+ [
1731
+ {
1732
+ line: "<?php 'use_strict'; ?>",
1733
+ tokens: [
1734
+ { startIndex: 0, type: 'metatag.php' },
1735
+ { startIndex: 5, type: '' },
1736
+ { startIndex: 6, type: 'string.php' },
1737
+ { startIndex: 18, type: 'delimiter.php' },
1738
+ { startIndex: 19, type: '' },
1739
+ { startIndex: 20, type: 'metatag.php' }
1740
+ ]
1741
+ }
1742
+ ],
1743
+
1744
+ [
1745
+ {
1746
+ line: '<?php $b = $a + " \'cool\' " ?>',
1747
+ tokens: [
1748
+ { startIndex: 0, type: 'metatag.php' },
1749
+ { startIndex: 5, type: '' },
1750
+ { startIndex: 6, type: 'variable.php' },
1751
+ { startIndex: 8, type: '' },
1752
+ { startIndex: 9, type: 'delimiter.php' },
1753
+ { startIndex: 10, type: '' },
1754
+ { startIndex: 11, type: 'variable.php' },
1755
+ { startIndex: 13, type: '' },
1756
+ { startIndex: 14, type: 'delimiter.php' },
1757
+ { startIndex: 15, type: '' },
1758
+ { startIndex: 16, type: 'string.php' },
1759
+ { startIndex: 27, type: '' },
1760
+ { startIndex: 28, type: 'metatag.php' }
1761
+ ]
1762
+ }
1763
+ ],
1764
+
1765
+ [
1766
+ {
1767
+ line: "<?php '''",
1768
+ tokens: [
1769
+ { startIndex: 0, type: 'metatag.php' },
1770
+ { startIndex: 5, type: '' },
1771
+ { startIndex: 6, type: 'string.php' }
1772
+ ]
1773
+ }
1774
+ ],
1775
+
1776
+ [
1777
+ {
1778
+ line: '<?php "multiline',
1779
+ tokens: [
1780
+ { startIndex: 0, type: 'metatag.php' },
1781
+ { startIndex: 5, type: '' },
1782
+ { startIndex: 6, type: 'string.php' }
1783
+ ]
1784
+ },
1785
+ {
1786
+ line: 'strings";',
1787
+ tokens: [
1788
+ { startIndex: 0, type: 'string.php' },
1789
+ { startIndex: 8, type: 'delimiter.php' }
1790
+ ]
1791
+ }
1792
+ ],
1793
+
1794
+ // Numbers
1795
+ [
1796
+ {
1797
+ line: '<?php 0 ?>',
1798
+ tokens: [
1799
+ { startIndex: 0, type: 'metatag.php' },
1800
+ { startIndex: 5, type: '' },
1801
+ { startIndex: 6, type: 'number.php' },
1802
+ { startIndex: 7, type: '' },
1803
+ { startIndex: 8, type: 'metatag.php' }
1804
+ ]
1805
+ }
1806
+ ],
1807
+
1808
+ [
1809
+ {
1810
+ line: '<?php 0+0 ?>',
1811
+ tokens: [
1812
+ { startIndex: 0, type: 'metatag.php' },
1813
+ { startIndex: 5, type: '' },
1814
+ { startIndex: 6, type: 'number.php' },
1815
+ { startIndex: 7, type: 'delimiter.php' },
1816
+ { startIndex: 8, type: 'number.php' },
1817
+ { startIndex: 9, type: '' },
1818
+ { startIndex: 10, type: 'metatag.php' }
1819
+ ]
1820
+ }
1821
+ ],
1822
+
1823
+ [
1824
+ {
1825
+ line: '<?php 100+10 ?>',
1826
+ tokens: [
1827
+ { startIndex: 0, type: 'metatag.php' },
1828
+ { startIndex: 5, type: '' },
1829
+ { startIndex: 6, type: 'number.php' },
1830
+ { startIndex: 9, type: 'delimiter.php' },
1831
+ { startIndex: 10, type: 'number.php' },
1832
+ { startIndex: 12, type: '' },
1833
+ { startIndex: 13, type: 'metatag.php' }
1834
+ ]
1835
+ }
1836
+ ],
1837
+
1838
+ [
1839
+ {
1840
+ line: '<?php 0 + 0 ?>',
1841
+ tokens: [
1842
+ { startIndex: 0, type: 'metatag.php' },
1843
+ { startIndex: 5, type: '' },
1844
+ { startIndex: 6, type: 'number.php' },
1845
+ { startIndex: 7, type: '' },
1846
+ { startIndex: 8, type: 'delimiter.php' },
1847
+ { startIndex: 9, type: '' },
1848
+ { startIndex: 10, type: 'number.php' },
1849
+ { startIndex: 11, type: '' },
1850
+ { startIndex: 12, type: 'metatag.php' }
1851
+ ]
1852
+ }
1853
+ ],
1854
+
1855
+ [
1856
+ {
1857
+ line: '<?php 0123 ?>',
1858
+ tokens: [
1859
+ { startIndex: 0, type: 'metatag.php' },
1860
+ { startIndex: 5, type: '' },
1861
+ { startIndex: 6, type: 'number.octal.php' },
1862
+ { startIndex: 10, type: '' },
1863
+ { startIndex: 11, type: 'metatag.php' }
1864
+ ]
1865
+ }
1866
+ ],
1867
+
1868
+ [
1869
+ {
1870
+ line: '<?php 01239 ?>',
1871
+ tokens: [
1872
+ { startIndex: 0, type: 'metatag.php' },
1873
+ { startIndex: 5, type: '' },
1874
+ { startIndex: 6, type: 'number.octal.php' },
1875
+ { startIndex: 10, type: 'number.php' },
1876
+ { startIndex: 11, type: '' },
1877
+ { startIndex: 12, type: 'metatag.php' }
1878
+ ]
1879
+ }
1880
+ ],
1881
+
1882
+ [
1883
+ {
1884
+ line: '<?php 0x ?>',
1885
+ tokens: [
1886
+ { startIndex: 0, type: 'metatag.php' },
1887
+ { startIndex: 5, type: '' },
1888
+ { startIndex: 6, type: 'number.php' },
1889
+ { startIndex: 7, type: 'identifier.php' },
1890
+ { startIndex: 8, type: '' },
1891
+ { startIndex: 9, type: 'metatag.php' }
1892
+ ]
1893
+ }
1894
+ ],
1895
+
1896
+ [
1897
+ {
1898
+ line: '<?php 0x123 ?>',
1899
+ tokens: [
1900
+ { startIndex: 0, type: 'metatag.php' },
1901
+ { startIndex: 5, type: '' },
1902
+ { startIndex: 6, type: 'number.hex.php' },
1903
+ { startIndex: 11, type: '' },
1904
+ { startIndex: 12, type: 'metatag.php' }
1905
+ ]
1906
+ }
1907
+ ],
1908
+
1909
+ [
1910
+ {
1911
+ line: '<?php 0b1 ?>',
1912
+ tokens: [
1913
+ { startIndex: 0, type: 'metatag.php' },
1914
+ { startIndex: 5, type: '' },
1915
+ { startIndex: 6, type: 'number.binary.php' },
1916
+ { startIndex: 9, type: '' },
1917
+ { startIndex: 10, type: 'metatag.php' }
1918
+ ]
1919
+ }
1920
+ ],
1921
+
1922
+ [
1923
+ {
1924
+ line: '<?php { } ?>',
1925
+ tokens: [
1926
+ { startIndex: 0, type: 'metatag.php' },
1927
+ { startIndex: 5, type: '' },
1928
+ { startIndex: 6, type: 'delimiter.bracket.php' },
1929
+ { startIndex: 7, type: '' },
1930
+ { startIndex: 8, type: 'delimiter.bracket.php' },
1931
+ { startIndex: 9, type: '' },
1932
+ { startIndex: 10, type: 'metatag.php' }
1933
+ ]
1934
+ }
1935
+ ],
1936
+
1937
+ [
1938
+ {
1939
+ line: '<?php [1,2,3] ?>',
1940
+ tokens: [
1941
+ { startIndex: 0, type: 'metatag.php' },
1942
+ { startIndex: 5, type: '' },
1943
+ { startIndex: 6, type: 'delimiter.array.php' },
1944
+ { startIndex: 7, type: 'number.php' },
1945
+ { startIndex: 8, type: 'delimiter.php' },
1946
+ { startIndex: 9, type: 'number.php' },
1947
+ { startIndex: 10, type: 'delimiter.php' },
1948
+ { startIndex: 11, type: 'number.php' },
1949
+ { startIndex: 12, type: 'delimiter.array.php' },
1950
+ { startIndex: 13, type: '' },
1951
+ { startIndex: 14, type: 'metatag.php' }
1952
+ ]
1953
+ }
1954
+ ],
1955
+
1956
+ [
1957
+ {
1958
+ line: '<?php foo(123);',
1959
+ tokens: [
1960
+ { startIndex: 0, type: 'metatag.php' },
1961
+ { startIndex: 5, type: '' },
1962
+ { startIndex: 6, type: 'identifier.php' },
1963
+ { startIndex: 9, type: 'delimiter.parenthesis.php' },
1964
+ { startIndex: 10, type: 'number.php' },
1965
+ { startIndex: 13, type: 'delimiter.parenthesis.php' },
1966
+ { startIndex: 14, type: 'delimiter.php' }
1967
+ ]
1968
+ }
1969
+ ],
1970
+
1971
+ [
1972
+ {
1973
+ line: '<?php $x = "[{()}]" ?>',
1974
+ tokens: [
1975
+ { startIndex: 0, type: 'metatag.php' },
1976
+ { startIndex: 5, type: '' },
1977
+ { startIndex: 6, type: 'variable.php' },
1978
+ { startIndex: 8, type: '' },
1979
+ { startIndex: 9, type: 'delimiter.php' },
1980
+ { startIndex: 10, type: '' },
1981
+ { startIndex: 11, type: 'string.php' },
1982
+ { startIndex: 19, type: '' },
1983
+ { startIndex: 20, type: 'metatag.php' }
1984
+ ]
1985
+ }
1986
+ ],
1987
+
1988
+ // Comments - comment with sharp
1989
+ [
1990
+ {
1991
+ line: '<?php # a',
1992
+ tokens: [
1993
+ { startIndex: 0, type: 'metatag.php' },
1994
+ { startIndex: 5, type: '' },
1995
+ { startIndex: 6, type: 'comment.php' }
1996
+ ]
1997
+ }
1998
+ ],
1999
+
2000
+ [
2001
+ {
2002
+ line: '<?php ## a',
2003
+ tokens: [
2004
+ { startIndex: 0, type: 'metatag.php' },
2005
+ { startIndex: 5, type: '' },
2006
+ { startIndex: 6, type: 'comment.php' }
2007
+ ]
2008
+ }
2009
+ ],
2010
+
2011
+ [
2012
+ {
2013
+ line: '<?php # a comment',
2014
+ tokens: [
2015
+ { startIndex: 0, type: 'metatag.php' },
2016
+ { startIndex: 5, type: '' },
2017
+ { startIndex: 9, type: 'comment.php' }
2018
+ ]
2019
+ }
2020
+ ],
2021
+
2022
+ [
2023
+ {
2024
+ line: '<?php #sticky comment',
2025
+ tokens: [
2026
+ { startIndex: 0, type: 'metatag.php' },
2027
+ { startIndex: 5, type: '' },
2028
+ { startIndex: 6, type: 'comment.php' }
2029
+ ]
2030
+ }
2031
+ ],
2032
+
2033
+ [
2034
+ {
2035
+ line: '<?php $x = 1; # my comment // is a nice one',
2036
+ tokens: [
2037
+ { startIndex: 0, type: 'metatag.php' },
2038
+ { startIndex: 5, type: '' },
2039
+ { startIndex: 6, type: 'variable.php' },
2040
+ { startIndex: 8, type: '' },
2041
+ { startIndex: 9, type: 'delimiter.php' },
2042
+ { startIndex: 10, type: '' },
2043
+ { startIndex: 11, type: 'number.php' },
2044
+ { startIndex: 12, type: 'delimiter.php' },
2045
+ { startIndex: 13, type: '' },
2046
+ { startIndex: 14, type: 'comment.php' }
2047
+ ]
2048
+ }
2049
+ ],
2050
+
2051
+ [
2052
+ {
2053
+ line: '<?php # comment?>',
2054
+ tokens: [
2055
+ { startIndex: 0, type: 'metatag.php' },
2056
+ { startIndex: 5, type: '' },
2057
+ { startIndex: 6, type: 'comment.php' },
2058
+ { startIndex: 15, type: 'metatag.php' }
2059
+ ]
2060
+ }
2061
+ ],
2062
+
2063
+ [
2064
+ {
2065
+ line: '<?php # comment? ?>',
2066
+ tokens: [
2067
+ { startIndex: 0, type: 'metatag.php' },
2068
+ { startIndex: 5, type: '' },
2069
+ { startIndex: 6, type: 'comment.php' },
2070
+ { startIndex: 17, type: 'metatag.php' }
2071
+ ]
2072
+ }
2073
+ ],
2074
+
2075
+ // 3-languages parser
2076
+
2077
+ // php
2078
+ [
2079
+ {
2080
+ line: "<?='hi'?>",
2081
+ tokens: [
2082
+ { startIndex: 0, type: 'metatag.php' },
2083
+ { startIndex: 3, type: 'string.php' },
2084
+ { startIndex: 7, type: 'metatag.php' }
2085
+ ]
2086
+ }
2087
+ ],
2088
+
2089
+ // php/html/php
2090
+ [
2091
+ {
2092
+ line: '<?php5+3?><br/><?=1?>',
2093
+ tokens: [
2094
+ { startIndex: 0, type: 'metatag.php' },
2095
+ { startIndex: 5, type: 'number.php' },
2096
+ { startIndex: 6, type: 'delimiter.php' },
2097
+ { startIndex: 7, type: 'number.php' },
2098
+ { startIndex: 8, type: 'metatag.php' },
2099
+ { startIndex: 10, type: 'delimiter.html' },
2100
+ { startIndex: 11, type: 'tag.html' },
2101
+ { startIndex: 13, type: 'delimiter.html' },
2102
+ { startIndex: 15, type: 'metatag.php' },
2103
+ { startIndex: 18, type: 'number.php' },
2104
+ { startIndex: 19, type: 'metatag.php' }
2105
+ ]
2106
+ }
2107
+ ],
2108
+
2109
+ // php/html/php
2110
+ [
2111
+ {
2112
+ line: '<?php5+3?><abc><?=1?>',
2113
+ tokens: [
2114
+ { startIndex: 0, type: 'metatag.php' },
2115
+ { startIndex: 5, type: 'number.php' },
2116
+ { startIndex: 6, type: 'delimiter.php' },
2117
+ { startIndex: 7, type: 'number.php' },
2118
+ { startIndex: 8, type: 'metatag.php' },
2119
+ { startIndex: 10, type: 'delimiter.html' },
2120
+ { startIndex: 11, type: 'tag.html' },
2121
+ { startIndex: 14, type: 'delimiter.html' },
2122
+ { startIndex: 15, type: 'metatag.php' },
2123
+ { startIndex: 18, type: 'number.php' },
2124
+ { startIndex: 19, type: 'metatag.php' }
2125
+ ]
2126
+ }
2127
+ ],
2128
+
2129
+ // html/php/html
2130
+ [
2131
+ {
2132
+ line: '<abc><?php5+3?><abc>',
2133
+ tokens: [
2134
+ { startIndex: 0, type: 'delimiter.html' },
2135
+ { startIndex: 1, type: 'tag.html' },
2136
+ { startIndex: 4, type: 'delimiter.html' },
2137
+ { startIndex: 5, type: 'metatag.php' },
2138
+ { startIndex: 10, type: 'number.php' },
2139
+ { startIndex: 11, type: 'delimiter.php' },
2140
+ { startIndex: 12, type: 'number.php' },
2141
+ { startIndex: 13, type: 'metatag.php' },
2142
+ { startIndex: 15, type: 'delimiter.html' },
2143
+ { startIndex: 16, type: 'tag.html' },
2144
+ { startIndex: 19, type: 'delimiter.html' }
2145
+ ]
2146
+ }
2147
+ ],
2148
+
2149
+ // html/js/php/html
2150
+ [
2151
+ {
2152
+ line: '<abc><script>var i= 10;</script><?php5+3?><abc>',
2153
+ tokens: [
2154
+ { startIndex: 0, type: 'delimiter.html' },
2155
+ { startIndex: 1, type: 'tag.html' },
2156
+ { startIndex: 4, type: 'delimiter.html' },
2157
+ // { startIndex:5, type: 'delimiter.html' },
2158
+ { startIndex: 6, type: 'tag.html' },
2159
+ { startIndex: 12, type: 'delimiter.html' },
2160
+ { startIndex: 13, type: 'keyword.js' },
2161
+ { startIndex: 16, type: '' },
2162
+ { startIndex: 17, type: 'identifier.js' },
2163
+ { startIndex: 18, type: 'delimiter.js' },
2164
+ { startIndex: 19, type: '' },
2165
+ { startIndex: 20, type: 'number.js' },
2166
+ { startIndex: 22, type: 'delimiter.js' },
2167
+ { startIndex: 23, type: 'delimiter.html' },
2168
+ { startIndex: 25, type: 'tag.html' },
2169
+ { startIndex: 31, type: 'delimiter.html' },
2170
+ { startIndex: 32, type: 'metatag.php' },
2171
+ { startIndex: 37, type: 'number.php' },
2172
+ { startIndex: 38, type: 'delimiter.php' },
2173
+ { startIndex: 39, type: 'number.php' },
2174
+ { startIndex: 40, type: 'metatag.php' },
2175
+ { startIndex: 42, type: 'delimiter.html' },
2176
+ { startIndex: 43, type: 'tag.html' },
2177
+ { startIndex: 46, type: 'delimiter.html' }
2178
+ ]
2179
+ }
2180
+ ],
2181
+
2182
+ // html/js/php/js/
2183
+ [
2184
+ {
2185
+ line: '<abc><script>var i= 10;</script><?php5+3?><script>var x= 15;</script>',
2186
+ tokens: [
2187
+ { startIndex: 0, type: 'delimiter.html' },
2188
+ { startIndex: 1, type: 'tag.html' },
2189
+ { startIndex: 4, type: 'delimiter.html' },
2190
+ // { startIndex:5, type: 'delimiter.html' },
2191
+ { startIndex: 6, type: 'tag.html' },
2192
+ { startIndex: 12, type: 'delimiter.html' },
2193
+ { startIndex: 13, type: 'keyword.js' },
2194
+ { startIndex: 16, type: '' },
2195
+ { startIndex: 17, type: 'identifier.js' },
2196
+ { startIndex: 18, type: 'delimiter.js' },
2197
+ { startIndex: 19, type: '' },
2198
+ { startIndex: 20, type: 'number.js' },
2199
+ { startIndex: 22, type: 'delimiter.js' },
2200
+ { startIndex: 23, type: 'delimiter.html' },
2201
+ { startIndex: 25, type: 'tag.html' },
2202
+ { startIndex: 31, type: 'delimiter.html' },
2203
+ { startIndex: 32, type: 'metatag.php' },
2204
+ { startIndex: 37, type: 'number.php' },
2205
+ { startIndex: 38, type: 'delimiter.php' },
2206
+ { startIndex: 39, type: 'number.php' },
2207
+ { startIndex: 40, type: 'metatag.php' },
2208
+ { startIndex: 42, type: 'delimiter.html' },
2209
+ { startIndex: 43, type: 'tag.html' },
2210
+ { startIndex: 49, type: 'delimiter.html' },
2211
+ { startIndex: 50, type: 'keyword.js' },
2212
+ { startIndex: 53, type: '' },
2213
+ { startIndex: 54, type: 'identifier.js' },
2214
+ { startIndex: 55, type: 'delimiter.js' },
2215
+ { startIndex: 56, type: '' },
2216
+ { startIndex: 57, type: 'number.js' },
2217
+ { startIndex: 59, type: 'delimiter.js' },
2218
+ { startIndex: 60, type: 'delimiter.html' },
2219
+ { startIndex: 62, type: 'tag.html' },
2220
+ { startIndex: 68, type: 'delimiter.html' }
2221
+ ]
2222
+ }
2223
+ ],
2224
+
2225
+ // Multiline test
2226
+ [
2227
+ {
2228
+ line: '<html>',
2229
+ tokens: [
2230
+ { startIndex: 0, type: 'delimiter.html' },
2231
+ { startIndex: 1, type: 'tag.html' },
2232
+ { startIndex: 5, type: 'delimiter.html' }
2233
+ ]
2234
+ },
2235
+ {
2236
+ line: '<style><?="div"?>{ color:blue; }</style>',
2237
+ tokens: [
2238
+ { startIndex: 0, type: 'delimiter.html' },
2239
+ { startIndex: 1, type: 'tag.html' },
2240
+ { startIndex: 6, type: 'delimiter.html' },
2241
+ { startIndex: 7, type: 'metatag.php' },
2242
+ { startIndex: 10, type: 'string.php' },
2243
+ { startIndex: 15, type: 'metatag.php' },
2244
+ { startIndex: 17, type: 'delimiter.bracket.css' },
2245
+ { startIndex: 18, type: '' },
2246
+ { startIndex: 19, type: 'attribute.name.css' },
2247
+ { startIndex: 25, type: 'attribute.value.css' },
2248
+ { startIndex: 29, type: 'delimiter.css' },
2249
+ { startIndex: 30, type: '' },
2250
+ { startIndex: 31, type: 'delimiter.bracket.css' },
2251
+ { startIndex: 32, type: 'delimiter.html' },
2252
+ { startIndex: 34, type: 'tag.html' },
2253
+ { startIndex: 39, type: 'delimiter.html' }
2254
+ ]
2255
+ }
2256
+ ],
2257
+
2258
+ // HTML (CSS (PHP)), HTML ( PHP, JS (PHP), PHP)
2259
+ [
2260
+ {
2261
+ line: '<html><style><?="div"?> { color:blue; }</style><!--<?="HTML Comment"?>--><script>var x = 3;/* <?="JS Comment"/*</script>*/?> */var y = 4;</script></html><? $x = 3;?>',
2262
+ tokens: [
2263
+ { startIndex: 0, type: 'delimiter.html' },
2264
+ { startIndex: 1, type: 'tag.html' },
2265
+ { startIndex: 5, type: 'delimiter.html' },
2266
+ // { startIndex:6, type: 'delimiter.html' },
2267
+ { startIndex: 7, type: 'tag.html' },
2268
+ { startIndex: 12, type: 'delimiter.html' },
2269
+ { startIndex: 13, type: 'metatag.php' },
2270
+ { startIndex: 16, type: 'string.php' },
2271
+ { startIndex: 21, type: 'metatag.php' },
2272
+ { startIndex: 23, type: '' },
2273
+ { startIndex: 24, type: 'delimiter.bracket.css' },
2274
+ { startIndex: 25, type: '' },
2275
+ { startIndex: 26, type: 'attribute.name.css' },
2276
+ { startIndex: 32, type: 'attribute.value.css' },
2277
+ { startIndex: 36, type: 'delimiter.css' },
2278
+ { startIndex: 37, type: '' },
2279
+ { startIndex: 38, type: 'delimiter.bracket.css' },
2280
+ { startIndex: 39, type: 'delimiter.html' },
2281
+ { startIndex: 41, type: 'tag.html' },
2282
+ { startIndex: 46, type: 'delimiter.html' },
2283
+ { startIndex: 47, type: 'comment.html' },
2284
+ { startIndex: 51, type: 'metatag.php' },
2285
+ { startIndex: 54, type: 'string.php' },
2286
+ { startIndex: 68, type: 'metatag.php' },
2287
+ { startIndex: 70, type: 'comment.html' },
2288
+ { startIndex: 73, type: 'delimiter.html' },
2289
+ { startIndex: 74, type: 'tag.html' },
2290
+ { startIndex: 80, type: 'delimiter.html' },
2291
+ { startIndex: 81, type: 'keyword.js' },
2292
+ { startIndex: 84, type: '' },
2293
+ { startIndex: 85, type: 'identifier.js' },
2294
+ { startIndex: 86, type: '' },
2295
+ { startIndex: 87, type: 'delimiter.js' },
2296
+ { startIndex: 88, type: '' },
2297
+ { startIndex: 89, type: 'number.js' },
2298
+ { startIndex: 90, type: 'delimiter.js' },
2299
+ { startIndex: 91, type: 'comment.js' },
2300
+ { startIndex: 94, type: 'metatag.php' },
2301
+ { startIndex: 97, type: 'string.php' },
2302
+ { startIndex: 109, type: 'comment.php' },
2303
+ { startIndex: 122, type: 'metatag.php' },
2304
+ { startIndex: 124, type: '' },
2305
+ { startIndex: 127, type: 'keyword.js' },
2306
+ { startIndex: 130, type: '' },
2307
+ { startIndex: 131, type: 'identifier.js' },
2308
+ { startIndex: 132, type: '' },
2309
+ { startIndex: 133, type: 'delimiter.js' },
2310
+ { startIndex: 134, type: '' },
2311
+ { startIndex: 135, type: 'number.js' },
2312
+ { startIndex: 136, type: 'delimiter.js' },
2313
+ { startIndex: 137, type: 'delimiter.html' },
2314
+ { startIndex: 139, type: 'tag.html' },
2315
+ { startIndex: 145, type: 'delimiter.html' },
2316
+ // { startIndex:146, type: 'delimiter.html' },
2317
+ { startIndex: 148, type: 'tag.html' },
2318
+ { startIndex: 152, type: 'delimiter.html' },
2319
+ { startIndex: 153, type: 'metatag.php' },
2320
+ { startIndex: 155, type: '' },
2321
+ { startIndex: 156, type: 'variable.php' },
2322
+ { startIndex: 158, type: '' },
2323
+ { startIndex: 159, type: 'delimiter.php' },
2324
+ { startIndex: 160, type: '' },
2325
+ { startIndex: 161, type: 'number.php' },
2326
+ { startIndex: 162, type: 'delimiter.php' },
2327
+ { startIndex: 163, type: 'metatag.php' }
2328
+ ]
2329
+ }
2330
+ ],
2331
+
2332
+ // PHP-tag detection
2333
+ [
2334
+ {
2335
+ line: '<!--c--><?',
2336
+ tokens: [
2337
+ { startIndex: 0, type: 'comment.html' },
2338
+ { startIndex: 4, type: 'comment.content.html' },
2339
+ { startIndex: 5, type: 'comment.html' },
2340
+ { startIndex: 8, type: 'metatag.php' }
2341
+ ]
2342
+ }
2343
+ ],
2344
+
2345
+ [
2346
+ {
2347
+ line: '<script>//<?',
2348
+ tokens: [
2349
+ { startIndex: 0, type: 'delimiter.html' },
2350
+ { startIndex: 1, type: 'tag.html' },
2351
+ { startIndex: 7, type: 'delimiter.html' },
2352
+ { startIndex: 8, type: 'comment.js' },
2353
+ { startIndex: 10, type: 'metatag.php' }
2354
+ ]
2355
+ }
2356
+ ],
2357
+
2358
+ [
2359
+ {
2360
+ line: '<script>"<?php5+3?>"',
2361
+ tokens: [
2362
+ { startIndex: 0, type: 'delimiter.html' },
2363
+ { startIndex: 1, type: 'tag.html' },
2364
+ { startIndex: 7, type: 'delimiter.html' },
2365
+ { startIndex: 8, type: 'string.invalid.js' },
2366
+ { startIndex: 9, type: 'metatag.php' },
2367
+ { startIndex: 14, type: 'number.php' },
2368
+ { startIndex: 15, type: 'delimiter.php' },
2369
+ { startIndex: 16, type: 'number.php' },
2370
+ { startIndex: 17, type: 'metatag.php' },
2371
+ { startIndex: 19, type: 'string.invalid.js' }
2372
+ ]
2373
+ }
2374
+ ],
2375
+
2376
+ [
2377
+ {
2378
+ line: '<?php toString(); ?>',
2379
+ tokens: [
2380
+ { startIndex: 0, type: 'metatag.php' },
2381
+ { startIndex: 5, type: '' },
2382
+ { startIndex: 6, type: 'identifier.php' },
2383
+ { startIndex: 14, type: 'delimiter.parenthesis.php' },
2384
+ { startIndex: 16, type: 'delimiter.php' },
2385
+ { startIndex: 17, type: '' },
2386
+ { startIndex: 18, type: 'metatag.php' }
2387
+ ]
2388
+ }
2389
+ ],
2390
+
2391
+ [
2392
+ {
2393
+ line: '<?php',
2394
+ tokens: [{ startIndex: 0, type: 'metatag.php' }]
2395
+ },
2396
+ {
2397
+ line: ' //',
2398
+ tokens: [
2399
+ { startIndex: 0, type: '' },
2400
+ { startIndex: 2, type: 'comment.php' }
2401
+ ]
2402
+ },
2403
+ {
2404
+ line: 'if',
2405
+ tokens: [{ startIndex: 0, type: 'keyword.php' }]
2406
+ }
2407
+ ]
2408
+ ]
2409
+ );