2.max.js 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. ((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this)["webpackJsonp"] = (typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this)["webpackJsonp"] || []).push([[2],{
  2. /***/ "../../node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js":
  3. /*!******************************************************************************************************!*\
  4. !*** D:/Repos/Babylon.js/node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js ***!
  5. \******************************************************************************************************/
  6. /*! exports provided: conf, language */
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
  11. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
  12. /*---------------------------------------------------------------------------------------------
  13. * Copyright (c) Microsoft Corporation. All rights reserved.
  14. * Licensed under the MIT License. See License.txt in the project root for license information.
  15. *--------------------------------------------------------------------------------------------*/
  16. // Allow for running under nodejs/requirejs in tests
  17. var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
  18. var conf = {
  19. wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
  20. comments: {
  21. lineComment: '//',
  22. blockComment: ['/*', '*/']
  23. },
  24. brackets: [
  25. ['{', '}'],
  26. ['[', ']'],
  27. ['(', ')']
  28. ],
  29. onEnterRules: [
  30. {
  31. // e.g. /** | */
  32. beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
  33. afterText: /^\s*\*\/$/,
  34. action: { indentAction: _monaco.languages.IndentAction.IndentOutdent, appendText: ' * ' }
  35. },
  36. {
  37. // e.g. /** ...|
  38. beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
  39. action: { indentAction: _monaco.languages.IndentAction.None, appendText: ' * ' }
  40. },
  41. {
  42. // e.g. * ...|
  43. beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
  44. action: { indentAction: _monaco.languages.IndentAction.None, appendText: '* ' }
  45. },
  46. {
  47. // e.g. */|
  48. beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
  49. action: { indentAction: _monaco.languages.IndentAction.None, removeText: 1 }
  50. }
  51. ],
  52. autoClosingPairs: [
  53. { open: '{', close: '}' },
  54. { open: '[', close: ']' },
  55. { open: '(', close: ')' },
  56. { open: '"', close: '"', notIn: ['string'] },
  57. { open: '\'', close: '\'', notIn: ['string', 'comment'] },
  58. { open: '`', close: '`', notIn: ['string', 'comment'] },
  59. { open: "/**", close: " */", notIn: ["string"] }
  60. ],
  61. folding: {
  62. markers: {
  63. start: new RegExp("^\\s*//\\s*#?region\\b"),
  64. end: new RegExp("^\\s*//\\s*#?endregion\\b")
  65. }
  66. }
  67. };
  68. var language = {
  69. // Set defaultToken to invalid to see what you do not tokenize yet
  70. defaultToken: 'invalid',
  71. tokenPostfix: '.ts',
  72. keywords: [
  73. 'abstract', 'as', 'break', 'case', 'catch', 'class', 'continue', 'const',
  74. 'constructor', 'debugger', 'declare', 'default', 'delete', 'do', 'else',
  75. 'enum', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
  76. 'get', 'if', 'implements', 'import', 'in', 'infer', 'instanceof', 'interface',
  77. 'is', 'keyof', 'let', 'module', 'namespace', 'never', 'new', 'null', 'package',
  78. 'private', 'protected', 'public', 'readonly', 'require', 'global', 'return',
  79. 'set', 'static', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try',
  80. 'type', 'typeof', 'unique', 'var', 'void', 'while', 'with', 'yield', 'async',
  81. 'await', 'of'
  82. ],
  83. typeKeywords: [
  84. 'any', 'boolean', 'number', 'object', 'string', 'undefined'
  85. ],
  86. operators: [
  87. '<=', '>=', '==', '!=', '===', '!==', '=>', '+', '-', '**',
  88. '*', '/', '%', '++', '--', '<<', '</', '>>', '>>>', '&',
  89. '|', '^', '!', '~', '&&', '||', '??', '?', ':', '=', '+=', '-=',
  90. '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', '&=', '|=',
  91. '^=', '@',
  92. ],
  93. // we include these common regular expressions
  94. symbols: /[=><!~?:&|+\-*\/\^%]+/,
  95. escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
  96. digits: /\d+(_+\d+)*/,
  97. octaldigits: /[0-7]+(_+[0-7]+)*/,
  98. binarydigits: /[0-1]+(_+[0-1]+)*/,
  99. hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
  100. regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
  101. regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
  102. // The main tokenizer for our languages
  103. tokenizer: {
  104. root: [
  105. [/[{}]/, 'delimiter.bracket'],
  106. { include: 'common' }
  107. ],
  108. common: [
  109. // identifiers and keywords
  110. [/[a-z_$][\w$]*/, {
  111. cases: {
  112. '@typeKeywords': 'keyword',
  113. '@keywords': 'keyword',
  114. '@default': 'identifier'
  115. }
  116. }],
  117. [/[A-Z][\w\$]*/, 'type.identifier'],
  118. // [/[A-Z][\w\$]*/, 'identifier'],
  119. // whitespace
  120. { include: '@whitespace' },
  121. // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
  122. [/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
  123. // delimiters and operators
  124. [/[()\[\]]/, '@brackets'],
  125. [/[<>](?!@symbols)/, '@brackets'],
  126. [/!(?=([^=]|$))/, 'delimiter'],
  127. [/@symbols/, {
  128. cases: {
  129. '@operators': 'delimiter',
  130. '@default': ''
  131. }
  132. }],
  133. // numbers
  134. [/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
  135. [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
  136. [/0[xX](@hexdigits)n?/, 'number.hex'],
  137. [/0[oO]?(@octaldigits)n?/, 'number.octal'],
  138. [/0[bB](@binarydigits)n?/, 'number.binary'],
  139. [/(@digits)n?/, 'number'],
  140. // delimiter: after number because of .\d floats
  141. [/[;,.]/, 'delimiter'],
  142. // strings
  143. [/"([^"\\]|\\.)*$/, 'string.invalid'],
  144. [/'([^'\\]|\\.)*$/, 'string.invalid'],
  145. [/"/, 'string', '@string_double'],
  146. [/'/, 'string', '@string_single'],
  147. [/`/, 'string', '@string_backtick'],
  148. ],
  149. whitespace: [
  150. [/[ \t\r\n]+/, ''],
  151. [/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
  152. [/\/\*/, 'comment', '@comment'],
  153. [/\/\/.*$/, 'comment'],
  154. ],
  155. comment: [
  156. [/[^\/*]+/, 'comment'],
  157. [/\*\//, 'comment', '@pop'],
  158. [/[\/*]/, 'comment']
  159. ],
  160. jsdoc: [
  161. [/[^\/*]+/, 'comment.doc'],
  162. [/\*\//, 'comment.doc', '@pop'],
  163. [/[\/*]/, 'comment.doc']
  164. ],
  165. // We match regular expression quite precisely
  166. regexp: [
  167. [/(\{)(\d+(?:,\d*)?)(\})/, ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']],
  168. [/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/, ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
  169. [/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
  170. [/[()]/, 'regexp.escape.control'],
  171. [/@regexpctl/, 'regexp.escape.control'],
  172. [/[^\\\/]/, 'regexp'],
  173. [/@regexpesc/, 'regexp.escape'],
  174. [/\\\./, 'regexp.invalid'],
  175. [/(\/)([gimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']],
  176. ],
  177. regexrange: [
  178. [/-/, 'regexp.escape.control'],
  179. [/\^/, 'regexp.invalid'],
  180. [/@regexpesc/, 'regexp.escape'],
  181. [/[^\]]/, 'regexp'],
  182. [/\]/, { token: 'regexp.escape.control', next: '@pop', bracket: '@close' }]
  183. ],
  184. string_double: [
  185. [/[^\\"]+/, 'string'],
  186. [/@escapes/, 'string.escape'],
  187. [/\\./, 'string.escape.invalid'],
  188. [/"/, 'string', '@pop']
  189. ],
  190. string_single: [
  191. [/[^\\']+/, 'string'],
  192. [/@escapes/, 'string.escape'],
  193. [/\\./, 'string.escape.invalid'],
  194. [/'/, 'string', '@pop']
  195. ],
  196. string_backtick: [
  197. [/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
  198. [/[^\\`$]+/, 'string'],
  199. [/@escapes/, 'string.escape'],
  200. [/\\./, 'string.escape.invalid'],
  201. [/`/, 'string', '@pop']
  202. ],
  203. bracketCounting: [
  204. [/\{/, 'delimiter.bracket', '@bracketCounting'],
  205. [/\}/, 'delimiter.bracket', '@pop'],
  206. { include: 'common' }
  207. ],
  208. },
  209. };
  210. /***/ })
  211. }]);
  212. //# sourceMappingURL=2.max.js.map