Browse Source

张博明

Gis-Y 6 months ago
parent
commit
3bea94a45e
100 changed files with 61907 additions and 0 deletions
  1. 276 0
      22409240张博明/homework2/_entry.js
  2. 300 0
      22409240张博明/homework2/_entry_preview.js
  3. 6 0
      22409240张博明/homework2/data/111.js
  4. 6 0
      22409240张博明/homework2/data/444.js
  5. 185 0
      22409240张博明/homework2/js/_model.js
  6. 92 0
      22409240张博明/homework2/js/mainfrm_pane.js
  7. 6 0
      22409240张博明/homework2/js/saved/script.js
  8. 1 0
      22409240张博明/homework2/js/saved/未命名.js
  9. 11 0
      22409240张博明/homework2/kul/kul.entry.xml
  10. 134 0
      22409240张博明/homework2/kul/mainfrm.kul
  11. 17 0
      22409240张博明/homework2/monaco/package-lock.json
  12. 5 0
      22409240张博明/homework2/monaco/package.json
  13. 7913 0
      22409240张博明/homework2/monaco/public/font-awesome/css/all.css
  14. 9 0
      22409240张博明/homework2/monaco/public/font-awesome/css/all.min.css
  15. 1609 0
      22409240张博明/homework2/monaco/public/font-awesome/css/brands.css
  16. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/brands.min.css
  17. 6243 0
      22409240张博明/homework2/monaco/public/font-awesome/css/fontawesome.css
  18. 9 0
      22409240张博明/homework2/monaco/public/font-awesome/css/fontawesome.min.css
  19. 19 0
      22409240张博明/homework2/monaco/public/font-awesome/css/regular.css
  20. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/regular.min.css
  21. 19 0
      22409240张博明/homework2/monaco/public/font-awesome/css/solid.css
  22. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/solid.min.css
  23. 461 0
      22409240张博明/homework2/monaco/public/font-awesome/css/svg-with-js.css
  24. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/svg-with-js.min.css
  25. 26 0
      22409240张博明/homework2/monaco/public/font-awesome/css/v4-font-face.css
  26. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/v4-font-face.min.css
  27. 2194 0
      22409240张博明/homework2/monaco/public/font-awesome/css/v4-shims.css
  28. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/v4-shims.min.css
  29. 22 0
      22409240张博明/homework2/monaco/public/font-awesome/css/v5-font-face.css
  30. 6 0
      22409240张博明/homework2/monaco/public/font-awesome/css/v5-font-face.min.css
  31. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-brands-400.ttf
  32. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-brands-400.woff2
  33. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-regular-400.ttf
  34. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-regular-400.woff2
  35. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-solid-900.ttf
  36. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-solid-900.woff2
  37. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-v4compatibility.ttf
  38. BIN
      22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-v4compatibility.woff2
  39. 740 0
      22409240张博明/homework2/monaco/public/index.html
  40. 1327 0
      22409240张博明/homework2/monaco/public/monaco-editor/CHANGELOG.md
  41. 21 0
      22409240张博明/homework2/monaco/public/monaco-editor/LICENSE
  42. 97 0
      22409240张博明/homework2/monaco/public/monaco-editor/README.md
  43. 259 0
      22409240张博明/homework2/monaco/public/monaco-editor/ThirdPartyNotices.txt
  44. 7117 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/bundleInfo.json
  45. 3443 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/nls.metadata.json
  46. BIN
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/base/browser/ui/codicons/codicon/codicon.ttf
  47. 11898 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/base/worker/workerMain.js
  48. 1 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/base/worker/workerMain.js.map
  49. 1359 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/abap/abap.js
  50. 339 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/apex/apex.js
  51. 75 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/azcli/azcli.js
  52. 107 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/bat/bat.js
  53. 114 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/bicep/bicep.js
  54. 180 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/cameligo/cameligo.js
  55. 767 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/clojure/clojure.js
  56. 239 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/coffee/coffee.js
  57. 405 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/cpp/cpp.js
  58. 331 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/csharp/csharp.js
  59. 60 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/csp/csp.js
  60. 185 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/css/css.js
  61. 285 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/dart/dart.js
  62. 135 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/dockerfile/dockerfile.js
  63. 462 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/ecl/ecl.js
  64. 562 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/elixir/elixir.js
  65. 149 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/flow9/flow9.js
  66. 223 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/fsharp/fsharp.js
  67. 224 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/go/go.js
  68. 157 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/graphql/graphql.js
  69. 399 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/handlebars/handlebars.js
  70. 187 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/hcl/hcl.js
  71. 310 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/html/html.js
  72. 76 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/ini/ini.js
  73. 238 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/java/java.js
  74. 412 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/javascript/javascript.js
  75. 517 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/julia/julia.js
  76. 259 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/kotlin/kotlin.js
  77. 168 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/less/less.js
  78. 164 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/lexon/lexon.js
  79. 232 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/liquid/liquid.js
  80. 167 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/lua/lua.js
  81. 217 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/m3/m3.js
  82. 229 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/markdown/markdown.js
  83. 205 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/mips/mips.js
  84. 382 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/msdax/msdax.js
  85. 824 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/mysql/mysql.js
  86. 190 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/objective-c/objective-c.js
  87. 257 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pascal/pascal.js
  88. 170 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pascaligo/pascaligo.js
  89. 628 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/perl/perl.js
  90. 854 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pgsql/pgsql.js
  91. 579 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/php/php.js
  92. 144 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pla/pla.js
  93. 716 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/postiats/postiats.js
  94. 897 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/powerquery/powerquery.js
  95. 246 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/powershell/powershell.js
  96. 418 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/protobuf/protobuf.js
  97. 409 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pug/pug.js
  98. 256 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/python/python.js
  99. 291 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/qsharp/qsharp.js
  100. 0 0
      22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/r/r.js

+ 276 - 0
22409240张博明/homework2/_entry.js

@@ -0,0 +1,276 @@
+global.__comx_global_exception_function = function(e, promise){
+    if(promise) {
+        console.log('unhandledRejection:', e, promise);
+    }
+    else {
+//        if(e && e.message) {
+//            console.log('uncaughtException:', e.message);
+//        }
+//        else {
+            console.log('uncaughtException:', e);
+//        }
+    }
+};
+
+process.on('uncaughtException', (e)=>{
+    __comx_global_exception_function(e);
+});
+
+process.on('unhandledRejection',function(err,promise){
+    __comx_global_exception_function(err, promise);
+});
+
+var is_embedded = false;
+if(process.argv.length == 3 && process.argv[2] == 'embedded')
+{
+    is_embedded = true;
+}
+
+var fs = require('fs');
+var vm = require('vm');
+const { execSync } = require('child_process');
+
+initRuntimeEnv();
+
+var dirHome = process.env['COMX_SDK'];
+var dirUnit = __dirname + '/';
+
+if(process.platform == 'win32')
+{
+    require('bindings')('js_ext_comx_qtshell-native-win.node');
+    require('bindings')('js_ext_comx_resource-native-win.node');
+    require('bindings')('js_ext_comx_mutex-native-win.node');
+}
+
+if(process.platform == 'linux')
+{
+    require('bindings')('js_ext_comx_qt-native-linux.node');
+    require('bindings')('js_ext_comx_resource-native-linux.node');
+    require('bindings')('js_ext_comx_mutex-native-linux.node');
+}
+
+if(process.platform == 'darwin')
+{
+    require('bindings')('js_ext_comx_qt-native-darwin.node');
+    require('bindings')('js_ext_comx_resource-native-darwin.node');
+    require('bindings')('js_ext_comx_mutex-native-darwin.node');
+}
+
+var require_ = require('require-from-string');
+var __ = (_)=>{
+    (new vm.Script(_, {filename : 'remote'})).runInNewContext({
+	'require' : require,
+	'process' : process,
+	'comx' : comx,
+	'exports' :exports,
+	'comx_startup' : ()=>{
+	    comx.resource.qt.loadUnit(dirUnit, exports, function(){
+                if(is_embedded)
+                    unit.form._entry.ShowEmbedded();
+		else if(process.argv.length >= 3)
+		    unit.form[process.argv[2]].Show();
+		else
+		    unit.form._entry.Show();
+	    }, (form)=>{
+		//readyForm
+	    });
+	}
+    });
+};
+
+var tmpl = fs.readFileSync(dirHome+'template/4e7b90182d3b4e11a7ca74d8fc8c545f');
+comx.resource.Initialize(require_, __, tmpl);
+
+if(!comx.resource.hasResource)
+{
+    if(process.argv.length == 4)
+    {
+	var tmpl = fs.readFileSync(dirHome+'template/008f111453704f82b9616e9bf92655f0');
+	comx.resource.LoadKernelRemote(parseInt(process.argv[3]), false, tmpl);
+    }
+    else
+    {
+	var tmpl = fs.readFileSync(dirHome+'template/ad72fee60eea4a89844aa934b9bc099b');
+	comx.resource.LoadKernelRemote(getWSAddress(), false, tmpl);
+    }
+}
+else
+{
+    comx.resource.qt.loadUnit(dirUnit, exports, function(){
+        if(is_embedded)
+            unit.form._entry.ShowEmbedded();
+	else if(process.argv.length >= 3)
+	    unit.form[process.argv[2]].Show();
+	else
+	    unit.form._entry.Show();
+    }, (form)=>{
+	//readyForm
+    });
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Init Runtime Env
+
+function initRuntimeEnv()
+{
+    process.env.COMX_SDK = getHomeDir().replace(/\\/g, '/');
+
+    if(process.platform == 'win32')
+    {
+	addPathToEnv(getHomeDir() + 'dependences\\windows\\occt\\7.5\\win64\\vc14\\bin');
+	addPathToEnv(getHomeDir() + 'dependences\\windows\\vtk\\8.1\\bin');
+	addPathToEnv(getHomeDir() + 'dependences\\windows\\vtk\\9.3\\bin');
+    }
+    
+    var depsDir = getDepsDir();
+
+    if(depsDir)
+    {
+	process.chdir(depsDir);
+    }
+
+    if(process.platform == 'linux')
+    {
+	const packages = ['occt-7.5.0', 'vtk-8.1', 'vtk-9.3'];
+	const hardcodedPaths = ['/usr/lib/x86_64-linux-gnu/'];
+	
+	configureLdLibraryPath(packages, hardcodedPaths);
+    }
+}
+
+function getParentDir(dirName)
+{
+    var idx = dirName.lastIndexOf('/');
+    if(idx == -1)
+    {
+	idx = dirName.lastIndexOf('\\');
+    }
+
+    return dirName.substr(0, idx);
+}
+
+function getHomeDir()
+{
+    if(fs.existsSync(__dirname + '/07D976FB68304742A31191AA0503DE79'))
+    {
+	return __dirname + '/';
+    }
+    else
+    {
+    return getParentDir(getParentDir(__dirname)) + '/';
+    }
+}
+
+function getDepsDir()
+{
+    if(process.platform == 'win32')
+    {
+        return getHomeDir() + 'dependences\\windows\\qt\\5.15.2\\msvc2019_64\\bin\\';
+    }
+
+    if(process.platform == 'linux' || process.platform == 'darwin')
+    {
+	return getHomeDir() + 'addon';
+    }
+    
+    return false;
+}
+
+function getWSAddress()
+{
+    var fpath = getHomeDir() + '/cache/ws.cache';
+
+    if(!fs.existsSync(fpath))
+    {
+	return "ws://localhost:3000";
+    }
+    else
+    {
+	return '' + fs.readFileSync(fpath);
+    }
+}
+
+
+/**
+ * papend some env variables to PATH
+ * @param {string} newPath - new path that will be appended
+ * @param {boolean} [prepend=true] - append to the begin of PATH£¨default value is true£©
+ * @returns {void}
+ */
+function addPathToEnv(newPath, prepend = true) {
+    if (!newPath || typeof newPath !== 'string') {
+        throw new Error('Invalid path: Path must be a non-empty string.');
+    }
+
+    // get current PATH
+    const currentPath = process.env.PATH || '';
+
+    // check path exists or not
+    if (currentPath.includes(newPath)) {
+        console.warn(`Path "${newPath}" is already in PATH.`);
+        return;
+    }
+
+    // get separator char by os type
+    const separator = process.platform === 'win32' ? ';' : ':';
+
+    // append to PATH
+    process.env.PATH = prepend
+        ? `${newPath}${separator}${currentPath}` // append to begin
+        : `${currentPath}${separator}${newPath}`; // append to end
+
+    //console.log(`Updated PATH: ${process.env.PATH}`);
+}
+
+
+/**
+ * get pkg-config PATH
+ * @param {string} pkgName - pkg-config's package name£¨such as "occt-7.5.0"£©
+ * @returns {string} - PATH 
+ */
+function extractLibraryPath(pkgName) {
+    try {
+        const command = `pkg-config --libs-only-L ${pkgName} | sed -n 's/^-L//p'`;
+        const path = execSync(command, { encoding: 'utf-8' }).trim();
+        return path;
+    } catch (error) {
+        console.error(`Error extracting path for ${pkgName}:`, error.message);
+        return null;
+    }
+}
+
+/**
+ * append to LD_LIBRARY_PATH
+ * @param {string} path - target path
+ */
+function addPathToLdLibraryPath(path) {
+    if (path && !process.env.LD_LIBRARY_PATH?.includes(path)) {
+        process.env.LD_LIBRARY_PATH = `${path}:${process.env.LD_LIBRARY_PATH || ''}`;
+        //console.log(`Added to LD_LIBRARY_PATH: ${path}`);
+    } else {
+        //console.log(`Path already in LD_LIBRARY_PATH or invalid: ${path}`);
+    }
+}
+
+/**
+ * config LD_LIBRARY_PATH
+ * @param {string[]} packages - An array of package names that need to extract paths.
+ * @param {string[]} hardcodedPaths - Hard-coded path array
+ */
+function configureLdLibraryPath(packages, hardcodedPaths) {
+    // Add a hard-coded path
+    hardcodedPaths.forEach(path => {
+        addPathToLdLibraryPath(path);
+    });
+
+    // Extract and add the package path
+    packages.forEach(pkg => {
+        const path = extractLibraryPath(pkg);
+        if (path) {
+            addPathToLdLibraryPath(path);
+        }
+    });
+
+    //console.log('Updated LD_LIBRARY_PATH:', process.env.LD_LIBRARY_PATH);
+}
+

+ 300 - 0
22409240张博明/homework2/_entry_preview.js

@@ -0,0 +1,300 @@
+global.__comx_global_exception_function = function(e, promise){
+    if(promise) {
+        console.log('unhandledRejection:', e, promise);
+    }
+    else {
+//        if(e && e.message) {
+//            console.log('uncaughtException:', e.message);
+//        }
+//        else {
+            console.log('uncaughtException:', e);
+//        }
+    }
+};
+
+process.on('uncaughtException', (e)=>{
+    __comx_global_exception_function(e);
+});
+
+process.on('unhandledRejection',function(err,promise){
+    __comx_global_exception_function(err, promise);
+});
+
+var fs = require('fs');
+var vm = require('vm');
+const { execSync } = require('child_process');
+
+initRuntimeEnv();
+
+var dirHome = process.env['COMX_SDK'];
+var dirUnit = __dirname + '/';
+
+if(process.platform == 'win32')
+{
+    require('bindings')('js_ext_comx_qtshell-native-win.node');
+    require('bindings')('js_ext_comx_resource-native-win.node');
+    require('bindings')('js_ext_comx_mutex-native-win.node');
+}
+
+if(process.platform == 'linux')
+{
+    require('bindings')('js_ext_comx_qt-native-linux.node');
+    require('bindings')('js_ext_comx_resource-native-linux.node');
+    require('bindings')('js_ext_comx_mutex-native-linux.node');
+}
+
+if(process.platform == 'darwin')
+{
+    require('bindings')('js_ext_comx_qt-native-darwin.node');
+    require('bindings')('js_ext_comx_resource-native-darwin.node');
+    require('bindings')('js_ext_comx_mutex-native-darwin.node');
+}
+
+var require_ = require('require-from-string');
+var __ = (_)=>{
+    (new vm.Script(_, {filename : 'remote'})).runInNewContext({
+	'require' : require,
+	'process' : process,
+	'comx' : comx,
+	'exports' :exports,
+	'comx_startup' : ()=>{
+	    comx.resource.qt.loadUnit(dirUnit, exports, function(){
+		if(process.argv.length >= 4)
+                {
+                    var is_hide = !process.argv[3];
+                    if(is_hide)
+                    {
+                        unit.form[process.argv[2]].ShowEmbedded();
+                    }
+                    else
+		        unit.form[process.argv[2]].ShowPreview();
+                }
+		else
+                {
+                    var is_hide = !process.argv[2];
+                    if(is_hide)
+                    {
+                        unit.form._entry.ShowEmbedded();
+                    }
+                    else
+		        unit.form._entry.ShowPreview();
+                }
+	    }, (form)=>{
+		//readyForm
+	    });
+	}
+    });
+};
+
+var tmpl = fs.readFileSync(dirHome+'template/4e7b90182d3b4e11a7ca74d8fc8c545f');
+comx.resource.Initialize(require_, __, tmpl);
+
+if(!comx.resource.hasResource)
+{
+    if(process.argv.length == 4)
+    {
+	var tmpl = fs.readFileSync(dirHome+'template/008f111453704f82b9616e9bf92655f0');
+	comx.resource.LoadKernelRemote(parseInt(process.argv[3]), false, tmpl);
+    }
+    else
+    {
+	var tmpl = fs.readFileSync(dirHome+'template/ad72fee60eea4a89844aa934b9bc099b');
+	comx.resource.LoadKernelRemote(getWSAddress(), false, tmpl);
+    }
+}
+else
+{
+    comx.resource.qt.loadUnit(dirUnit, exports, function(){
+	if(process.argv.length >= 4)
+        {
+            var is_hide = !process.argv[3];
+            if(is_hide)
+            {
+                unit.form[process.argv[2]].ShowEmbedded();
+            }
+            else
+	        unit.form[process.argv[2]].ShowPreview();
+        }
+	else
+        {
+            var is_hide = !process.argv[2];
+            if(is_hide)
+            {
+                unit.form._entry.ShowEmbedded();
+            }
+            else
+	        unit.form._entry.ShowPreview();
+        }
+    }, (form)=>{
+	//readyForm
+    });
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Init Runtime Env
+
+function initRuntimeEnv()
+{
+    process.env.COMX_SDK = getHomeDir().replace(/\\/g, '/');
+
+    if(process.platform == 'win32')
+    {
+	addPathToEnv(getHomeDir() + 'dependences\\windows\\occt\\7.5\\win64\\vc14\\bin');
+	addPathToEnv(getHomeDir() + 'dependences\\windows\\vtk\\8.1\\bin');
+	addPathToEnv(getHomeDir() + 'dependences\\windows\\vtk\\9.3\\bin');
+    }
+    
+    var depsDir = getDepsDir();
+
+    if(depsDir)
+    {
+	process.chdir(depsDir);
+    }
+
+    if(process.platform == 'linux')
+    {
+	const packages = ['occt-7.5.0', 'vtk-8.1', 'vtk-9.3'];
+	const hardcodedPaths = ['/usr/lib/x86_64-linux-gnu/'];
+	
+	configureLdLibraryPath(packages, hardcodedPaths);
+    }
+}
+
+function getParentDir(dirName)
+{
+    var idx = dirName.lastIndexOf('/');
+    if(idx == -1)
+    {
+	idx = dirName.lastIndexOf('\\');
+    }
+
+    return dirName.substr(0, idx);
+}
+
+function getHomeDir()
+{
+    if(fs.existsSync(__dirname + '/07D976FB68304742A31191AA0503DE79'))
+    {
+	return __dirname + '/';
+    }
+    else
+    {
+    return getParentDir(getParentDir(__dirname)) + '/';
+    }
+}
+
+function getDepsDir()
+{
+    if(process.platform == 'win32')
+    {
+        return getHomeDir() + 'dependences\\windows\\qt\\5.15.2\\msvc2019_64\\bin\\';
+    }
+
+    if(process.platform == 'linux' || process.platform == 'darwin')
+    {
+	return getHomeDir() + 'addon';
+    }
+    
+    return false;
+}
+
+function getWSAddress()
+{
+    var fpath = getHomeDir() + '/cache/ws.cache';
+
+    if(!fs.existsSync(fpath))
+    {
+	return "ws://localhost:3000";
+    }
+    else
+    {
+	return '' + fs.readFileSync(fpath);
+    }
+}
+
+
+
+/**
+ * Adds the specified PATH to the environment variable path.
+ * @param {string} newPath - New path to add
+ * @param {boolean} [prepend=true] - Whether to add the PATH to the beginning of the path (default true)
+ * @returns {void}
+ */
+function addPathToEnv(newPath, prepend = true) {
+    if (!newPath || typeof newPath !== 'string') {
+        throw new Error('Invalid path: Path must be a non-empty string.');
+    }
+
+    // Get the current PATH
+    const currentPath = process.env.PATH || '';
+
+    // Check whether the path already exists.
+    if (currentPath.includes(newPath)) {
+        console.warn(`Path "${newPath}" is already in PATH.`);
+        return;
+    }
+
+    // Determine the path separator according to the operating system
+    const separator = process.platform === 'win32' ? ';' : ':';
+
+    // Add a new path
+    process.env.PATH = prepend
+        ? `${newPath}${separator}${currentPath}` // Add to the beginning
+        : `${currentPath}${separator}${newPath}`; // Add to end
+
+    //console.log(`Updated PATH: ${process.env.PATH}`);
+}
+
+
+/**
+ * Extract the library path of pkg-config.
+ * @param {string} pkgName - Package name of pkg-config (such as "occt-7.5.0")
+ * @returns {string} - The extracted path
+ */
+function extractLibraryPath(pkgName) {
+    try {
+        // Call pkg-config to extract the path.
+        const command = `pkg-config --libs-only-L ${pkgName} | sed -n 's/^-L//p'`;
+        const path = execSync(command, { encoding: 'utf-8' }).trim();
+        return path;
+    } catch (error) {
+        console.error(`Error extracting path for ${pkgName}:`, error.message);
+        return null;
+    }
+}
+
+/**
+ * Add path to LD_LIBRARY_PATH
+ * @param {string} path - Path to add
+ */
+function addPathToLdLibraryPath(path) {
+    if (path && !process.env.LD_LIBRARY_PATH?.includes(path)) {
+        process.env.LD_LIBRARY_PATH = `${path}:${process.env.LD_LIBRARY_PATH || ''}`;
+        //console.log(`Added to LD_LIBRARY_PATH: ${path}`);
+    } else {
+        //console.log(`Path already in LD_LIBRARY_PATH or invalid: ${path}`);
+    }
+}
+
+/**
+ * Configure LD_LIBRARY_PATH
+ * @param {string[]} packages - An array of package names that need to extract paths.
+ * @param {string[]} hardcodedPaths - Hard-coded path array
+ */
+function configureLdLibraryPath(packages, hardcodedPaths) {
+    // Add a hard-coded path
+    hardcodedPaths.forEach(path => {
+        addPathToLdLibraryPath(path);
+    });
+
+    // Extract and add the package path
+    packages.forEach(pkg => {
+        const path = extractLibraryPath(pkg);
+        if (path) {
+            addPathToLdLibraryPath(path);
+        }
+    });
+
+    //console.log('Updated LD_LIBRARY_PATH:', process.env.LD_LIBRARY_PATH);
+}
+

+ 6 - 0
22409240张博明/homework2/data/111.js

@@ -0,0 +1,6 @@
+// 欢迎使用JavaScript编辑器
+console.log("Hello, World!");
+
+function example() {
+  return "This is an example function";
+}

+ 6 - 0
22409240张博明/homework2/data/444.js

@@ -0,0 +1,6 @@
+// 欢迎使用JavaScript编辑器
+console.log("Hello, World!");
+
+function example() {
+  return "This is an example function";
+}

+ 185 - 0
22409240张博明/homework2/js/_model.js

@@ -0,0 +1,185 @@
+const { fork } = require('child_process');
+const fs = require('fs');
+const path = require('path');
+const WebSocket = require('ws'); // 引入 WebSocket 库
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Initialize codes.
+AutoLoadPlugins();
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//You can load the plugins in global field, if the next line codes are uncommented.
+//AutoLoadGlobalPlugins();
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Sample codes.
+
+let ws_global = null; // 用于保存 WebSocket 实例,全局可访问
+
+// 暴露变量,由 callback.js 负责注册监听
+exports.OnMonacoSaveRequest = null; // 实现保存时的回调
+exports.OnMonacoOpenRequest = null; // 实现打开时的回调
+
+exports.StartupMonacoEdit = function (cb) {
+        // 启动 monaco 的 Node.js 服务端(server.js)
+        fork(path.join(unit.dir, 'monaco', 'server.js'))
+                .on('message', msg => {
+                        if (msg.type === 'ready') { cb(); }
+                });
+
+        // 启动 WebSocket 服务器,监听 3999 端口
+        const wss = new WebSocket.Server({ port: 3999 });
+
+        // 当前端连接建立时的回调
+        wss.on('connection', ws => {
+                ws_global = ws;
+                console.log("WebSocket 连接成功");
+
+                // 监听来自前端的消息
+                ws.on('message', msg => {
+                        try {
+                                const data = JSON.parse(msg); // 尝试解析消息内容为 JSON 对象
+
+                                if (data.type === 'save') {
+                                        // 收到保存请求,调用外部定义的保存回调函数
+                                        exports.OnMonacoSaveRequest(data.content, filepath => {
+                                                // 执行实际文件保存操作
+                                                fs.writeFileSync(filepath, data.content, 'utf-8');
+                                                // 将保存结果通过 WebSocket 返回给前端
+                                                ws.send(JSON.stringify({
+                                                        type: 'save_success',
+                                                        filename: path.basename(filepath), // 提取文件名
+                                                        fullpath: filepath // 完整路径
+                                                }));
+                                        });
+
+                                } else if (data.type === 'open') {
+                                        // 收到打开请求,调用外部定义的打开回调函数
+                                        exports.OnMonacoOpenRequest(filepath => {
+                                                // 读取文件内容
+                                                const content = fs.readFileSync(filepath, 'utf-8');
+                                                // 将内容通过 WebSocket 发送给前端
+                                                ws.send(JSON.stringify({
+                                                        type: 'open_success',
+                                                        filename: path.basename(filepath),
+                                                        fullpath: filepath,
+                                                        content: content
+                                                }));
+                                        });
+                                }
+
+                        } catch (err) {
+                                // 捕获解析或处理过程中的异常
+                                console.error("WebSocket 消息解析失败:", err);
+                        }
+                });
+        });
+};
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//Put you codes here
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// AutoLoadPlugins Function Implement Start.
+
+function extractPluginName(filename) {
+        const regex = /js_ext_comx_(.*?)-(native)/;
+        const match = filename.match(regex);
+        if (match) {
+                return match[1];
+        }
+        return null;
+}
+
+function isSysPluginName(filename) {
+        const knownPlugins = ['kul', 'qt', 'qtshell', 'resource', 'mutex', 'encrypt', 'encryptshell'];
+        return knownPlugins.includes(extractPluginName(filename));
+}
+
+function requirePlugin(filedir) {
+        const cache = {};
+        requirePlugin = function(filedir) {
+                const filename = path.basename(filedir);
+        
+                if(isSysPluginName(filename)){return;}
+
+                if (cache[filename]) {
+                        //console.log(cache[filename], 'has been loaded');
+                } else {
+                        cache[filename] = filedir;
+                        require(filedir);
+                }
+        };
+    
+        requirePlugin(filedir);
+}
+
+function AutoLoadPlugins() {
+        var plugin_dir = (__dirname + '/../addon/');
+        if (!fs.existsSync(plugin_dir)) {
+                return;
+        }
+    
+        var files = fs.readdirSync(plugin_dir);
+        files.forEach(function(filename) {
+                var filedir = path.join(plugin_dir, filename);
+                var stats = fs.statSync(filedir);
+                if (!stats.isDirectory()) {
+                        if (filedir.indexOf('-linux.node') !== -1 && require('os').platform() === 'linux') {
+                                requirePlugin(filedir);
+                        }
+            
+                        if (filedir.indexOf('-win.node') !== -1 && require('os').platform() === 'win32') {
+                                requirePlugin(filedir);
+                        }
+
+                        if (filedir.indexOf('-darwin.node') !== -1 && require('os').platform() === 'darwin') {
+                                requirePlugin(filedir);
+                        }
+                }
+        });
+}
+
+function AutoLoadGlobalPlugins() {
+        var plugin_dir = (process.env.COMX_SDK + 'addon/');
+        if (!fs.existsSync(plugin_dir)) {
+                return;
+        }
+    
+        var files = fs.readdirSync(plugin_dir);
+        files.forEach(function(filename) {
+                var filedir = path.join(plugin_dir, filename);
+                var stats = fs.statSync(filedir);
+                if (!stats.isDirectory()) {
+                        if (filedir.indexOf('-linux.node') !== -1 && require('os').platform() === 'linux') {
+                                requirePlugin(filedir);
+                        }
+            
+                        if (filedir.indexOf('-win.node') !== -1 && require('os').platform() === 'win32') {
+                                requirePlugin(filedir);
+                        }
+
+                        if (filedir.indexOf('-darwin.node') !== -1 && require('os').platform() === 'darwin') {
+                                requirePlugin(filedir);
+                        }
+                }
+        });
+}
+
+//AutoLoadPlugins Function Implement End.
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// ide_info Function Implement Start.
+
+exports.ide_info = (msg) => {
+        if (process.send) {
+                process.send({
+                        type: 'debug',
+                        info: msg
+                });
+        }
+};
+
+//ide_info Function Implement End.
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

+ 92 - 0
22409240张博明/homework2/js/mainfrm_pane.js

@@ -0,0 +1,92 @@
+////////////////////////////////////////////////////////////////////////////
+// System Pre-define Functions
+// 95099372-ef3e-11ea-9c81-bf848405c62e
+
+//Callback of data preparation stage before UI is fully loaded.
+function OnInitializeData() {
+        // 注册保存请求的回调函数,当网页请求保存时会触发此逻辑
+        model.OnMonacoSaveRequest = function (content, cb) {
+        // 弹出“保存文件”对话框,初始目录为 D:/,允许保存为 .txt 文件
+                const filepath = ui.SaveFileDialog("保存文件", "D:/", "*.txt");
+
+                // 如果用户选择了文件路径
+                if (filepath) {
+                        cb(filepath); // 调用回调函数,把选定路径传给 model 层保存文件内容
+
+                        const filename = filepath.split(/[/\\]/).pop(); // 提取不带路径的文件名
+                        ui.MessageBox("提示", `成功保存‘${filename}’到‘${filepath}’`, MessageBox.Icon.Information, MessageBox.Button.Ok); // 弹出成功提示
+                } else {
+                // 用户取消保存操作
+                        ui.MessageBox("提示", "取消", MessageBox.Icon.Warning, MessageBox.Button.Ok);
+                }
+        };
+
+        // 注册打开请求的回调函数,当网页请求打开文件时会触发此逻辑
+        model.OnMonacoOpenRequest = function (cb) {
+        // 弹出“打开文件”对话框,初始目录为 D:/,仅显示 .txt 文件
+                const filepath = ui.OpenFileDialog("打开文件", "D:/", "*.txt");
+
+                // 对于用户选择的文件
+                if (filepath) {
+                        cb(filepath); // 调用回调函数,把选定路径传给 model 层读取文件内容
+
+                        const filename = filepath.split(/[/\\]/).pop(); // 提取文件名
+                        ui.MessageBox("提示", `成功打开‘${filename}’`, MessageBox.Icon.Information, MessageBox.Button.Ok); // 弹出成功提示
+                } else {
+                // 用户取消打开操作
+                        ui.MessageBox("提示", "取消", MessageBox.Icon.Warning, MessageBox.Button.Ok);
+                }
+        };
+}
+
+//Callback after UI is fully loaded and displayed.
+
+function OnReady(reload, preview) {
+        model.StartupMonacoEdit(()=>{
+                ui.url.value = "http://localhost:3000";
+        });
+}
+
+function OnCloseForm() {
+    
+}
+
+function OnException(err) {
+        //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Callback Functions.
+// 641a254c-ef3e-11ea-bc8a-379bb908bdd7
+
+function OnPageLoadOkay(){
+        ui.page.index = 1;
+}
+
+function OnPageLoadFail(){
+        ui.url.value = "http://localhost:3000";
+}
+
+//The message corresponding callback executed by the main form
+// when calling pui.fireEvent(type,para) in the Docker subform.
+
+//////////////////////////////////////////////////////////////////////////
+// Utils Functions.
+// 6c165ad6-ef3e-11ea-987c-b761a131c2fe
+
+function onDragFile(filepath) {
+}
+
+/*Usage of BLOCK_EVENT
+        BLOCK_EVENT(()=>{
+                ui.[name].[var] = ...;
+        });
+*/
+
+function BLOCK_EVENT(cb) {
+        ui.block_event = true;
+        
+        cb();
+        
+        ui.block_event = false;
+}

+ 6 - 0
22409240张博明/homework2/js/saved/script.js

@@ -0,0 +1,6 @@
+// 欢迎使用JavaScript编辑器
+console.log("Hello, World!");
+
+function example() {
+  return "This is an example function";
+}

+ 1 - 0
22409240张博明/homework2/js/saved/未命名.js

@@ -0,0 +1 @@
+111111111111

+ 11 - 0
22409240张博明/homework2/kul/kul.entry.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<kul_pkg type="entry" name="me_shell" xmlns="http://www.kingmesh.com">
+  <pkgid name="mainfrm">
+    <location>mainfrm.kul</location>
+    <value>nil</value>
+  </pkgid>
+  <formid name="mainfrm_pane">
+    <location>mainfrm.kul</location>
+    <value>nil</value>
+  </formid>
+</kul_pkg>

+ 134 - 0
22409240张博明/homework2/kul/mainfrm.kul

@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<kul_pkg type="ui" name="mainfrm" xmlns="http://www.kingmesh.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kingmesh.com kul.xsd">
+  <property name="id">0x462d442a-0x56d5-0x4361-0x92-0x2b-0x46-0x97-0x49-0x78-0x08-0x22</property>
+  <widget type="form" name="mainfrm_pane">
+    <property name="id">0x7b068684-0xe174-0x420d-0x91-0x7e-0xb2-0xe0-0xda-0xfe-0x63-0x5a</property>
+    <property name="style">popup</property>
+    <property name="title">DCiP | Monaco Editor Prototype</property>
+    <property name="titlebar">true</property>
+    <property name="icon">kmas.bmp</property>
+    <property name="bkcolor">gray</property>
+    <property name="width">auto</property>
+    <property name="height">auto</property>
+    <property name="center">center</property>
+    <property name="auto_center">false</property>
+    <property name="transparent">false</property>
+    <property name="resize">true</property>
+    <property name="show">normal</property>
+    <property name="maximum_box">true</property>
+    <property name="minimum_box">true</property>
+    <property name="close_box">true</property>
+    <property name="toolwindow">false</property>
+    <property name="app_window">true</property>
+    <property name="topmost">true</property>
+    <property name="is_service">true</property>
+    <property name="attachment">none</property>
+    <property name="attachment_size">5</property>
+    <property name="attach_dev">none</property>
+    <property name="attach_dev_size">5</property>
+    <property name="javascript">mainfrm_pane.js</property>
+    <property name="onGeometryChange"/>
+    <property name="onHotKey"/>
+    <property name="onDockChange"/>
+    <widget type="vbox">
+      <property name="adjust">auto</property>
+      <property name="hightlight">false</property>
+      <property name="margin">1</property>
+      <property name="scroll">false</property>
+      <property name="shadow">true</property>
+      <property name="scroll_height">auto</property>
+      <property name="scroll_amargin">5</property>
+      <property name="scroll_steps">3</property>
+      <widget type="stack">
+        <property name="name">page</property>
+        <property name="adjust">auto</property>
+        <property name="margin">3</property>
+        <property name="border">flat</property>
+        <property name="label">Group Box</property>
+        <property name="index1_bind"/>
+        <property name="hightlight">false</property>
+        <widget type="hbox">
+          <property name="adjust">auto</property>
+          <property name="hightlight">false</property>
+          <property name="margin">1</property>
+          <property name="scroll">false</property>
+          <property name="shadow">true</property>
+          <property name="scroll_width">auto</property>
+          <property name="scroll_amargin">5</property>
+          <property name="scroll_steps">3</property>
+          <widget type="space">
+            <property name="size">auto</property>
+          </widget>
+          <widget type="label">
+            <property name="name"/>
+            <property name="text">&lt;h2 style="color:darkred"&gt;&lt;b&gt;Monaco Editor 引擎加载中, 请稍候 ...&lt;/b&gt;&lt;/h2&gt;</property>
+            <property name="tip"/>
+            <property name="id_alias">7</property>
+            <property name="width">19</property>
+            <property name="height">8</property>
+            <property name="adjust">fixed</property>
+            <property name="auto_width">true</property>
+            <property name="align">center</property>
+            <property name="gray">false</property>
+            <property name="visible">true</property>
+            <property name="handle_bind"/>
+            <property name="simple_bind"/>
+            <property name="visible_bind"/>
+            <property name="hightlight">false</property>
+            <property name="stylesheet"/>
+          </widget>
+          <widget type="space">
+            <property name="size">25</property>
+          </widget>
+          <widget type="bitmap">
+            <property name="name"/>
+            <property name="picture">progress2.gif</property>
+            <property name="autoPlay">true</property>
+            <property name="id_alias">9</property>
+            <property name="width">80</property>
+            <property name="height">8</property>
+            <property name="adjust">fixed</property>
+            <property name="fit_origin_size">false</property>
+            <property name="transparent_background">true</property>
+            <property name="mouse_trace">false</property>
+            <property name="gray">false</property>
+            <property name="visible">true</property>
+            <property name="simple_bind"/>
+            <property name="handle_bind"/>
+            <property name="onLButtonDown"/>
+            <property name="onLButtonUp"/>
+            <property name="onMButtonDown"/>
+            <property name="onMButtonUp"/>
+            <property name="onRButtonDown"/>
+            <property name="onRButtonUp"/>
+            <property name="onMouseMove"/>
+            <property name="onResize"/>
+            <property name="hightlight">false</property>
+            <property name="stylesheet"/>
+          </widget>
+          <widget type="space">
+            <property name="size">auto</property>
+          </widget>
+        </widget>
+        <widget type="webview">
+          <property name="name">url</property>
+          <property name="url"/>
+          <property name="width">360</property>
+          <property name="height">240</property>
+          <property name="id_alias">5</property>
+          <property name="adjust">fixed</property>
+          <property name="margin">1</property>
+          <property name="scrollbar">true</property>
+          <property name="enable">true</property>
+          <property name="gray">false</property>
+          <property name="visible">true</property>
+          <property name="hightlight">false</property>
+          <property name="onResize"/>
+          <property name="onSaveFile"/>
+          <property name="onPageLoadFail">OnPageLoadFail()</property>
+          <property name="onPageLoadSuccessful">OnPageLoadOkay()</property>
+        </widget>
+      </widget>
+    </widget>
+  </widget>
+</kul_pkg>

+ 17 - 0
22409240张博明/homework2/monaco/package-lock.json

@@ -0,0 +1,17 @@
+{
+  "name": "monaco-editor-app",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "monaco-editor": "^0.30.1"
+      }
+    },
+    "node_modules/monaco-editor": {
+      "version": "0.30.1",
+      "resolved": "https://registry.npmmirror.com/monaco-editor/-/monaco-editor-0.30.1.tgz",
+      "integrity": "sha512-B/y4+b2O5G2gjuxIFtCE2EkM17R2NM7/3F8x0qcPsqy4V83bitJTIO4TIeZpYlzu/xy6INiY/+84BEm6+7Cmzg=="
+    }
+  }
+}

+ 5 - 0
22409240张博明/homework2/monaco/package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "monaco-editor": "^0.30.1"
+  }
+}

File diff suppressed because it is too large
+ 7913 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/all.css


File diff suppressed because it is too large
+ 9 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/all.min.css


File diff suppressed because it is too large
+ 1609 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/brands.css


File diff suppressed because it is too large
+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/brands.min.css


File diff suppressed because it is too large
+ 6243 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/fontawesome.css


File diff suppressed because it is too large
+ 9 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/fontawesome.min.css


+ 19 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/regular.css

@@ -0,0 +1,19 @@
+/*!
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ * Copyright 2024 Fonticons, Inc.
+ */
+:root, :host {
+  --fa-style-family-classic: 'Font Awesome 6 Free';
+  --fa-font-regular: normal 400 1em/1 'Font Awesome 6 Free'; }
+
+@font-face {
+  font-family: 'Font Awesome 6 Free';
+  font-style: normal;
+  font-weight: 400;
+  font-display: block;
+  src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
+
+.far,
+.fa-regular {
+  font-weight: 400; }

+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/regular.min.css

@@ -0,0 +1,6 @@
+/*!
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ * Copyright 2024 Fonticons, Inc.
+ */
+:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}.fa-regular,.far{font-weight:400}

+ 19 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/solid.css

@@ -0,0 +1,19 @@
+/*!
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ * Copyright 2024 Fonticons, Inc.
+ */
+:root, :host {
+  --fa-style-family-classic: 'Font Awesome 6 Free';
+  --fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; }
+
+@font-face {
+  font-family: 'Font Awesome 6 Free';
+  font-style: normal;
+  font-weight: 900;
+  font-display: block;
+  src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
+
+.fas,
+.fa-solid {
+  font-weight: 900; }

+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/solid.min.css

@@ -0,0 +1,6 @@
+/*!
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ * Copyright 2024 Fonticons, Inc.
+ */
+:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900}

+ 461 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/svg-with-js.css

@@ -0,0 +1,461 @@
+/*!
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ * Copyright 2024 Fonticons, Inc.
+ */
+:root, :host {
+  --fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free';
+  --fa-font-regular: normal 400 1em/1 'Font Awesome 6 Free';
+  --fa-font-light: normal 300 1em/1 'Font Awesome 6 Pro';
+  --fa-font-thin: normal 100 1em/1 'Font Awesome 6 Pro';
+  --fa-font-duotone: normal 900 1em/1 'Font Awesome 6 Duotone';
+  --fa-font-duotone-regular: normal 400 1em/1 'Font Awesome 6 Duotone';
+  --fa-font-duotone-light: normal 300 1em/1 'Font Awesome 6 Duotone';
+  --fa-font-duotone-thin: normal 100 1em/1 'Font Awesome 6 Duotone';
+  --fa-font-brands: normal 400 1em/1 'Font Awesome 6 Brands';
+  --fa-font-sharp-solid: normal 900 1em/1 'Font Awesome 6 Sharp';
+  --fa-font-sharp-regular: normal 400 1em/1 'Font Awesome 6 Sharp';
+  --fa-font-sharp-light: normal 300 1em/1 'Font Awesome 6 Sharp';
+  --fa-font-sharp-thin: normal 100 1em/1 'Font Awesome 6 Sharp';
+  --fa-font-sharp-duotone-solid: normal 900 1em/1 'Font Awesome 6 Sharp Duotone';
+  --fa-font-sharp-duotone-regular: normal 400 1em/1 'Font Awesome 6 Sharp Duotone';
+  --fa-font-sharp-duotone-light: normal 300 1em/1 'Font Awesome 6 Sharp Duotone';
+  --fa-font-sharp-duotone-thin: normal 100 1em/1 'Font Awesome 6 Sharp Duotone'; }
+
+svg.svg-inline--fa:not(:root), svg.svg-inline--fa:not(:host) {
+  overflow: visible;
+  box-sizing: content-box; }
+
+.svg-inline--fa {
+  display: var(--fa-display, inline-block);
+  height: 1em;
+  overflow: visible;
+  vertical-align: -.125em; }
+  .svg-inline--fa.fa-2xs {
+    vertical-align: 0.1em; }
+  .svg-inline--fa.fa-xs {
+    vertical-align: 0em; }
+  .svg-inline--fa.fa-sm {
+    vertical-align: -0.07143em; }
+  .svg-inline--fa.fa-lg {
+    vertical-align: -0.2em; }
+  .svg-inline--fa.fa-xl {
+    vertical-align: -0.25em; }
+  .svg-inline--fa.fa-2xl {
+    vertical-align: -0.3125em; }
+  .svg-inline--fa.fa-pull-left {
+    margin-right: var(--fa-pull-margin, 0.3em);
+    width: auto; }
+  .svg-inline--fa.fa-pull-right {
+    margin-left: var(--fa-pull-margin, 0.3em);
+    width: auto; }
+  .svg-inline--fa.fa-li {
+    width: var(--fa-li-width, 2em);
+    top: 0.25em; }
+  .svg-inline--fa.fa-fw {
+    width: var(--fa-fw-width, 1.25em); }
+
+.fa-layers svg.svg-inline--fa {
+  bottom: 0;
+  left: 0;
+  margin: auto;
+  position: absolute;
+  right: 0;
+  top: 0; }
+
+.fa-layers-counter, .fa-layers-text {
+  display: inline-block;
+  position: absolute;
+  text-align: center; }
+
+.fa-layers {
+  display: inline-block;
+  height: 1em;
+  position: relative;
+  text-align: center;
+  vertical-align: -.125em;
+  width: 1em; }
+  .fa-layers svg.svg-inline--fa {
+    transform-origin: center center; }
+
+.fa-layers-text {
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
+  transform-origin: center center; }
+
+.fa-layers-counter {
+  background-color: var(--fa-counter-background-color, #ff253a);
+  border-radius: var(--fa-counter-border-radius, 1em);
+  box-sizing: border-box;
+  color: var(--fa-inverse, #fff);
+  line-height: var(--fa-counter-line-height, 1);
+  max-width: var(--fa-counter-max-width, 5em);
+  min-width: var(--fa-counter-min-width, 1.5em);
+  overflow: hidden;
+  padding: var(--fa-counter-padding, 0.25em 0.5em);
+  right: var(--fa-right, 0);
+  text-overflow: ellipsis;
+  top: var(--fa-top, 0);
+  transform: scale(var(--fa-counter-scale, 0.25));
+  transform-origin: top right; }
+
+.fa-layers-bottom-right {
+  bottom: var(--fa-bottom, 0);
+  right: var(--fa-right, 0);
+  top: auto;
+  transform: scale(var(--fa-layers-scale, 0.25));
+  transform-origin: bottom right; }
+
+.fa-layers-bottom-left {
+  bottom: var(--fa-bottom, 0);
+  left: var(--fa-left, 0);
+  right: auto;
+  top: auto;
+  transform: scale(var(--fa-layers-scale, 0.25));
+  transform-origin: bottom left; }
+
+.fa-layers-top-right {
+  top: var(--fa-top, 0);
+  right: var(--fa-right, 0);
+  transform: scale(var(--fa-layers-scale, 0.25));
+  transform-origin: top right; }
+
+.fa-layers-top-left {
+  left: var(--fa-left, 0);
+  right: auto;
+  top: var(--fa-top, 0);
+  transform: scale(var(--fa-layers-scale, 0.25));
+  transform-origin: top left; }
+
+.fa-1x {
+  font-size: 1em; }
+
+.fa-2x {
+  font-size: 2em; }
+
+.fa-3x {
+  font-size: 3em; }
+
+.fa-4x {
+  font-size: 4em; }
+
+.fa-5x {
+  font-size: 5em; }
+
+.fa-6x {
+  font-size: 6em; }
+
+.fa-7x {
+  font-size: 7em; }
+
+.fa-8x {
+  font-size: 8em; }
+
+.fa-9x {
+  font-size: 9em; }
+
+.fa-10x {
+  font-size: 10em; }
+
+.fa-2xs {
+  font-size: 0.625em;
+  line-height: 0.1em;
+  vertical-align: 0.225em; }
+
+.fa-xs {
+  font-size: 0.75em;
+  line-height: 0.08333em;
+  vertical-align: 0.125em; }
+
+.fa-sm {
+  font-size: 0.875em;
+  line-height: 0.07143em;
+  vertical-align: 0.05357em; }
+
+.fa-lg {
+  font-size: 1.25em;
+  line-height: 0.05em;
+  vertical-align: -0.075em; }
+
+.fa-xl {
+  font-size: 1.5em;
+  line-height: 0.04167em;
+  vertical-align: -0.125em; }
+
+.fa-2xl {
+  font-size: 2em;
+  line-height: 0.03125em;
+  vertical-align: -0.1875em; }
+
+.fa-fw {
+  text-align: center;
+  width: 1.25em; }
+
+.fa-ul {
+  list-style-type: none;
+  margin-left: var(--fa-li-margin, 2.5em);
+  padding-left: 0; }
+  .fa-ul > li {
+    position: relative; }
+
+.fa-li {
+  left: calc(-1 * var(--fa-li-width, 2em));
+  position: absolute;
+  text-align: center;
+  width: var(--fa-li-width, 2em);
+  line-height: inherit; }
+
+.fa-border {
+  border-color: var(--fa-border-color, #eee);
+  border-radius: var(--fa-border-radius, 0.1em);
+  border-style: var(--fa-border-style, solid);
+  border-width: var(--fa-border-width, 0.08em);
+  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); }
+
+.fa-pull-left {
+  float: left;
+  margin-right: var(--fa-pull-margin, 0.3em); }
+
+.fa-pull-right {
+  float: right;
+  margin-left: var(--fa-pull-margin, 0.3em); }
+
+.fa-beat {
+  animation-name: fa-beat;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, ease-in-out); }
+
+.fa-bounce {
+  animation-name: fa-bounce;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); }
+
+.fa-fade {
+  animation-name: fa-fade;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); }
+
+.fa-beat-fade {
+  animation-name: fa-beat-fade;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); }
+
+.fa-flip {
+  animation-name: fa-flip;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, ease-in-out); }
+
+.fa-shake {
+  animation-name: fa-shake;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, linear); }
+
+.fa-spin {
+  animation-name: fa-spin;
+  animation-delay: var(--fa-animation-delay, 0s);
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 2s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, linear); }
+
+.fa-spin-reverse {
+  --fa-animation-direction: reverse; }
+
+.fa-pulse,
+.fa-spin-pulse {
+  animation-name: fa-spin;
+  animation-direction: var(--fa-animation-direction, normal);
+  animation-duration: var(--fa-animation-duration, 1s);
+  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
+  animation-timing-function: var(--fa-animation-timing, steps(8)); }
+
+@media (prefers-reduced-motion: reduce) {
+  .fa-beat,
+  .fa-bounce,
+  .fa-fade,
+  .fa-beat-fade,
+  .fa-flip,
+  .fa-pulse,
+  .fa-shake,
+  .fa-spin,
+  .fa-spin-pulse {
+    animation-delay: -1ms;
+    animation-duration: 1ms;
+    animation-iteration-count: 1;
+    transition-delay: 0s;
+    transition-duration: 0s; } }
+
+@keyframes fa-beat {
+  0%, 90% {
+    transform: scale(1); }
+  45% {
+    transform: scale(var(--fa-beat-scale, 1.25)); } }
+
+@keyframes fa-bounce {
+  0% {
+    transform: scale(1, 1) translateY(0); }
+  10% {
+    transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); }
+  30% {
+    transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); }
+  50% {
+    transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); }
+  57% {
+    transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); }
+  64% {
+    transform: scale(1, 1) translateY(0); }
+  100% {
+    transform: scale(1, 1) translateY(0); } }
+
+@keyframes fa-fade {
+  50% {
+    opacity: var(--fa-fade-opacity, 0.4); } }
+
+@keyframes fa-beat-fade {
+  0%, 100% {
+    opacity: var(--fa-beat-fade-opacity, 0.4);
+    transform: scale(1); }
+  50% {
+    opacity: 1;
+    transform: scale(var(--fa-beat-fade-scale, 1.125)); } }
+
+@keyframes fa-flip {
+  50% {
+    transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } }
+
+@keyframes fa-shake {
+  0% {
+    transform: rotate(-15deg); }
+  4% {
+    transform: rotate(15deg); }
+  8%, 24% {
+    transform: rotate(-18deg); }
+  12%, 28% {
+    transform: rotate(18deg); }
+  16% {
+    transform: rotate(-22deg); }
+  20% {
+    transform: rotate(22deg); }
+  32% {
+    transform: rotate(-12deg); }
+  36% {
+    transform: rotate(12deg); }
+  40%, 100% {
+    transform: rotate(0deg); } }
+
+@keyframes fa-spin {
+  0% {
+    transform: rotate(0deg); }
+  100% {
+    transform: rotate(360deg); } }
+
+.fa-rotate-90 {
+  transform: rotate(90deg); }
+
+.fa-rotate-180 {
+  transform: rotate(180deg); }
+
+.fa-rotate-270 {
+  transform: rotate(270deg); }
+
+.fa-flip-horizontal {
+  transform: scale(-1, 1); }
+
+.fa-flip-vertical {
+  transform: scale(1, -1); }
+
+.fa-flip-both,
+.fa-flip-horizontal.fa-flip-vertical {
+  transform: scale(-1, -1); }
+
+.fa-rotate-by {
+  transform: rotate(var(--fa-rotate-angle, 0)); }
+
+.fa-stack {
+  display: inline-block;
+  vertical-align: middle;
+  height: 2em;
+  position: relative;
+  width: 2.5em; }
+
+.fa-stack-1x,
+.fa-stack-2x {
+  bottom: 0;
+  left: 0;
+  margin: auto;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: var(--fa-stack-z-index, auto); }
+
+.svg-inline--fa.fa-stack-1x {
+  height: 1em;
+  width: 1.25em; }
+
+.svg-inline--fa.fa-stack-2x {
+  height: 2em;
+  width: 2.5em; }
+
+.fa-inverse {
+  color: var(--fa-inverse, #fff); }
+
+.sr-only,
+.fa-sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  padding: 0;
+  margin: -1px;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  white-space: nowrap;
+  border-width: 0; }
+
+.sr-only-focusable:not(:focus),
+.fa-sr-only-focusable:not(:focus) {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  padding: 0;
+  margin: -1px;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  white-space: nowrap;
+  border-width: 0; }
+
+.svg-inline--fa .fa-primary {
+  fill: var(--fa-primary-color, currentColor);
+  opacity: var(--fa-primary-opacity, 1); }
+
+.svg-inline--fa .fa-secondary {
+  fill: var(--fa-secondary-color, currentColor);
+  opacity: var(--fa-secondary-opacity, 0.4); }
+
+.svg-inline--fa.fa-swap-opacity .fa-primary {
+  opacity: var(--fa-secondary-opacity, 0.4); }
+
+.svg-inline--fa.fa-swap-opacity .fa-secondary {
+  opacity: var(--fa-primary-opacity, 1); }
+
+.svg-inline--fa mask .fa-primary,
+.svg-inline--fa mask .fa-secondary {
+  fill: black; }

File diff suppressed because it is too large
+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/svg-with-js.min.css


File diff suppressed because it is too large
+ 26 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/v4-font-face.css


File diff suppressed because it is too large
+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/v4-font-face.min.css


File diff suppressed because it is too large
+ 2194 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/v4-shims.css


File diff suppressed because it is too large
+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/v4-shims.min.css


+ 22 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/v5-font-face.css

@@ -0,0 +1,22 @@
+/*!
+ * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ * Copyright 2024 Fonticons, Inc.
+ */
+@font-face {
+  font-family: 'Font Awesome 5 Brands';
+  font-display: block;
+  font-weight: 400;
+  src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
+
+@font-face {
+  font-family: 'Font Awesome 5 Free';
+  font-display: block;
+  font-weight: 900;
+  src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
+
+@font-face {
+  font-family: 'Font Awesome 5 Free';
+  font-display: block;
+  font-weight: 400;
+  src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }

File diff suppressed because it is too large
+ 6 - 0
22409240张博明/homework2/monaco/public/font-awesome/css/v5-font-face.min.css


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-brands-400.ttf


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-brands-400.woff2


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-regular-400.ttf


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-regular-400.woff2


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-solid-900.ttf


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-solid-900.woff2


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-v4compatibility.ttf


BIN
22409240张博明/homework2/monaco/public/font-awesome/webfonts/fa-v4compatibility.woff2


+ 740 - 0
22409240张博明/homework2/monaco/public/index.html

@@ -0,0 +1,740 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Monaco Editor - 多标签JS源码编辑器</title>
+    <link rel="stylesheet" href="/font-awesome/css/all.min.css">
+    <style>
+        :root {
+            --primary-color: #0078d7;
+            --tab-bg: #252526;
+            --tab-active-bg: #1e1e1e;
+            --tab-hover-bg: #2d2d2d;
+            --toolbar-bg: #333333;
+            --border-color: #454545;
+            --text-color: #d4d4d4;
+            --danger-color: #f14c4c;
+        }
+        
+        * {
+            margin: 0;
+            padding: 0;
+            box-sizing: border-box;
+        }
+        
+        body {
+            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+            background-color: #1e1e1e;
+            color: var(--text-color);
+            height: 100vh;
+            overflow: hidden;
+            display: flex;
+            flex-direction: column;
+        }
+        
+        #toolbar {
+            background-color: var(--toolbar-bg);
+            padding: 10px 15px;
+            display: flex;
+            gap: 15px;
+            border-bottom: 1px solid var(--border-color);
+            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
+            z-index: 10;
+        }
+        
+        .btn {
+            background-color: #3c3c3c;
+            color: var(--text-color);
+            border: 1px solid var(--border-color);
+            padding: 8px 15px;
+            border-radius: 4px;
+            cursor: pointer;
+            display: flex;
+            align-items: center;
+            gap: 8px;
+            transition: all 0.2s;
+        }
+        
+        .btn:hover {
+            background-color: #454545;
+        }
+        
+        .btn-primary {
+            background-color: var(--primary-color);
+            border-color: var(--primary-color);
+        }
+        
+        .btn-primary:hover {
+            background-color: #0066b4;
+        }
+        
+        .btn-danger {
+            background-color: var(--danger-color);
+            border-color: var(--danger-color);
+        }
+        
+        .btn-danger:hover {
+            background-color: #d93636;
+        }
+        
+        #tabs-container {
+            background-color: var(--tab-bg);
+            display: flex;
+            overflow-x: auto;
+            padding: 0 10px;
+            border-bottom: 1px solid var(--border-color);
+        }
+        
+        .tab {
+            padding: 10px 15px;
+            background-color: var(--tab-bg);
+            cursor: pointer;
+            display: flex;
+            align-items: center;
+            gap: 10px;
+            border-right: 1px solid var(--border-color);
+            min-width: 180px;
+            max-width: 250px;
+            position: relative;
+        }
+        
+        .tab:hover {
+            background-color: var(--tab-hover-bg);
+        }
+        
+        .tab.active {
+            background-color: var(--tab-active-bg);
+        }
+        
+        .tab.active::before {
+            content: '';
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            height: 3px;
+            background-color: var(--primary-color);
+        }
+        
+        .tab-title {
+            flex: 1;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            font-size: 14px;
+        }
+        
+        .tab-close {
+            color: #888;
+            padding: 2px;
+            border-radius: 50%;
+            width: 20px;
+            height: 20px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+        }
+        
+        .tab-close:hover {
+            background-color: rgba(255, 255, 255, 0.1);
+            color: #fff;
+        }
+        
+        #editors-container {
+            flex: 1;
+            position: relative;
+            overflow: hidden;
+        }
+        
+        .editor-wrapper {
+            position: absolute;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            display: none;
+        }
+        
+        .editor-wrapper.active {
+            display: block;
+        }
+        
+        #status-bar {
+            background-color: var(--toolbar-bg);
+            padding: 5px 15px;
+            font-size: 12px;
+            display: flex;
+            justify-content: space-between;
+            border-top: 1px solid var(--border-color);
+        }
+        
+        .status-item {
+            display: flex;
+            align-items: center;
+            gap: 8px;
+        }
+        
+        .ws-status {
+            display: inline-block;
+            width: 10px;
+            height: 10px;
+            border-radius: 50%;
+            background-color: #888;
+        }
+        
+        .ws-status.connected {
+            background-color: #4caf50;
+        }
+        
+        .ws-status.disconnected {
+            background-color: #f44336;
+        }
+        
+        #notification {
+            position: fixed;
+            bottom: 20px;
+            right: 20px;
+            background-color: #333;
+            color: white;
+            padding: 15px 20px;
+            border-radius: 4px;
+            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
+            display: none;
+            z-index: 1000;
+        }
+        
+        #ws-console {
+            position: fixed;
+            bottom: 0;
+            right: 0;
+            width: 300px;
+            height: 200px;
+            background-color: rgba(0, 0, 0, 0.8);
+            border-left: 1px solid #333;
+            border-top: 1px solid #333;
+            padding: 10px;
+            font-size: 12px;
+            overflow-y: auto;
+            display: none;
+            z-index: 100;
+        }
+        
+        .console-title {
+            margin-bottom: 8px;
+            font-weight: bold;
+            color: var(--primary-color);
+        }
+        
+        .console-entry {
+            margin-bottom: 5px;
+            padding: 3px 5px;
+            border-radius: 3px;
+            background-color: rgba(255, 255, 255, 0.05);
+        }
+        
+        .console-entry.incoming {
+            color: #4caf50;
+        }
+        
+        .console-entry.outgoing {
+            color: #2196f3;
+        }
+        
+        .console-entry.error {
+            color: #f44336;
+        }
+    </style>
+</head>
+<body>
+    <div id="toolbar">
+        <button class="btn btn-primary" id="new-tab">
+            <i class="fas fa-plus"></i> 新建标签页
+        </button>
+        <button class="btn" id="open-file">
+            <i class="fas fa-folder-open"></i> 打开
+        </button>
+        <button class="btn" id="save-file">
+            <i class="fas fa-save"></i> 保存
+        </button>
+        <button class="btn" id="run-code">
+            <i class="fas fa-play"></i> 运行
+        </button>
+        <button class="btn" id="toggle-console">
+            <i class="fas fa-terminal"></i> 调试控制台
+        </button>
+        <div style="flex: 1"></div>
+        <button class="btn" id="theme-toggle">
+            <i class="fas fa-moon"></i> 暗色模式
+        </button>
+    </div>
+    
+    <div id="tabs-container"></div>
+    
+    <div id="editors-container"></div>
+    
+    <div id="status-bar">
+        <div class="status-item">
+            <span>WebSocket:</span>
+            <span class="ws-status" id="ws-status"></span>
+            <span id="ws-status-text">未连接</span>
+        </div>
+        <div class="status-item">
+            <span id="cursor-position">行: 1, 列: 1</span>
+        </div>
+    </div>
+    
+    <div id="notification"></div>
+    
+    <div id="ws-console">
+        <div class="console-title">WebSocket 通信日志</div>
+        <div id="console-content"></div>
+    </div>
+
+    <!-- Monaco Editor Loader -->
+     <script src="/monaco-editor/min/vs/loader.js"></script>
+
+     <script>
+        const AppState = {
+            tabs: {},
+            activeTabId: null,
+            nextTabId: 1,
+            theme: 'vs-dark',
+            wsConnected: false,
+            wsConsoleVisible: false
+        };
+
+
+
+        
+        // 初始化函数
+        function initApp() {
+            // 设置Monaco编辑器路径
+            require.config({ paths: { 'vs': '/monaco-editor/min/vs' }});
+            
+            // 初始化Monaco环境
+            require(['vs/editor/editor.main'], () => {
+                // 添加初始标签页
+                addNewTab('script.js', '// 欢迎使用JavaScript编辑器\nconsole.log("Hello, World!");\n\nfunction example() {\n  return "This is an example function";\n}');
+                
+                // 初始化事件监听器
+                initEventListeners();
+                
+                // 模拟WebSocket连接
+                //simulateWebSocketConnection();
+
+                // 真实WebSocket连接
+                connectWebSocket();  // >>> ADDED
+
+            });
+         }
+
+         let realWS = null;  // 真正的 WebSocket 实例,全局变量,用于保持连接
+
+         function connectWebSocket() {
+             // 获取页面上的状态显示元素
+             const wsStatus = document.getElementById('ws-status');
+             const wsStatusText = document.getElementById('ws-status-text');
+
+             try {
+                 // 建立 WebSocket 连接,连接到本地服务器的 3999 端口
+                 realWS = new WebSocket("ws://localhost:3999");
+
+                 // 连接成功时触发
+                 realWS.onopen = () => {
+                     AppState.wsConnected = true;  // 更新应用状态为已连接
+                     wsStatus.className = 'ws-status connected';  // 修改状态图标样式
+                     wsStatusText.textContent = '已连接';  // 显示连接状态文本
+                     showNotification('WebSocket 连接成功');  // 弹出提示
+                     logWebSocketMessage('incoming', '连接已建立');  // 记录日志
+                 };
+
+                 // 接收到消息时触发
+                 realWS.onmessage = (event) => {
+                     logWebSocketMessage('incoming', event.data);  // 日志记录原始消息内容
+
+                     let data;
+                     try {
+                         data = JSON.parse(event.data);  // 尝试将消息解析为 JSON 对象
+                     } catch (e) {
+                         console.warn("WebSocket 消息解析失败", e);  // JSON 解析失败时的警告
+                         return;
+                     }
+
+                     // 根据消息类型处理不同逻辑
+                     if (data.type === 'open_success') {
+                         const { filename, fullpath, content } = data;
+
+                         // 调用函数创建新的标签页并填充文件内容
+                         addNewTab(filename, content);
+
+                         // 提示用户文件已成功打开
+                         showNotification(`成功打开文件 "${filename}"`);
+                     }
+                     else if (data.type === 'save_success') {
+                         // 文件保存成功,弹出提示
+                         showNotification(`成功保存 "${data.filename}" 到 "${data.fullpath}"`);
+                     }
+                 };
+
+                 // 出现连接错误时触发
+                 realWS.onerror = (err) => {
+                     showNotification('WebSocket 错误', 'error');  // 弹出错误提示
+                     console.error(err);  // 打印错误信息
+                 };
+
+                 // 连接关闭时触发
+                 realWS.onclose = () => {
+                     AppState.wsConnected = false;  // 更新状态为未连接
+                     wsStatus.className = 'ws-status disconnected';  // 修改状态图标样式
+                     wsStatusText.textContent = '未连接';  // 显示未连接状态
+                     showNotification('WebSocket 已断开', 'error');  // 弹出断开通知
+                 };
+             } catch (e) {
+                 // 整个初始化过程中发生异常
+                 console.error("WebSocket 初始化失败", e);
+             }
+         }
+
+
+        // 创建新标签页
+        function addNewTab(title = '未命名.js', content = '') {
+            const tabId = `tab-${AppState.nextTabId++}`;
+            const isActive = Object.keys(AppState.tabs).length === 0;
+            
+            // 创建标签页元素
+            const tabEl = document.createElement('div');
+            tabEl.className = `tab ${isActive ? 'active' : ''}`;
+            tabEl.dataset.tabId = tabId;
+            tabEl.innerHTML = `
+                <span class="tab-title">${title}</span>
+                <div class="tab-close"><i class="fas fa-times"></i></div>
+            `;
+            document.getElementById('tabs-container').appendChild(tabEl);
+            
+            // 创建编辑器容器
+            const editorWrapper = document.createElement('div');
+            editorWrapper.className = `editor-wrapper ${isActive ? 'active' : ''}`;
+            editorWrapper.id = `editor-${tabId}`;
+            document.getElementById('editors-container').appendChild(editorWrapper);
+            
+            // 创建Monaco编辑器实例
+            const editor = monaco.editor.create(editorWrapper, {
+                value: content,
+                language: 'javascript',
+                theme: AppState.theme,
+                automaticLayout: true,
+                minimap: { enabled: true },
+                fontSize: 14,
+                lineNumbers: 'on',
+                scrollBeyondLastLine: false,
+                roundedSelection: false,
+                padding: { top: 10 },
+                suggest: {
+                    showKeywords: true,
+                    snippetsPreventQuickSuggestions: false
+                }
+            });
+            
+            // 保存编辑器状态
+            AppState.tabs[tabId] = {
+                id: tabId,
+                title,
+                editor,
+                container: editorWrapper,
+                element: tabEl,
+                modified: false,
+                viewState: editor.saveViewState()
+            };
+            
+            // 激活标签页
+            if (isActive) {
+                setActiveTab(tabId);
+            }
+            
+            // 添加编辑器事件监听
+            editor.onDidChangeModelContent(() => {
+                setTabModified(tabId, true);
+            });
+            
+            editor.onDidChangeCursorPosition(e => {
+                if (AppState.activeTabId === tabId) {
+                    document.getElementById('cursor-position').textContent = 
+                        `行: ${e.position.lineNumber}, 列: ${e.position.column}`;
+                }
+            });
+            
+            return tabId;
+        }
+        
+        // 设置活动标签页
+        function setActiveTab(tabId) {
+            if (AppState.activeTabId === tabId) return;
+            
+            // 保存当前标签页状态
+            if (AppState.activeTabId) {
+                const prevTab = AppState.tabs[AppState.activeTabId];
+                prevTab.viewState = prevTab.editor.saveViewState();
+                prevTab.element.classList.remove('active');
+                prevTab.container.classList.remove('active');
+            }
+            
+            // 设置新活动标签页
+            const tab = AppState.tabs[tabId];
+            tab.element.classList.add('active');
+            tab.container.classList.add('active');
+            AppState.activeTabId = tabId;
+            
+            // 恢复编辑器状态
+            if (tab.viewState) {
+                tab.editor.restoreViewState(tab.viewState);
+            }
+            tab.editor.focus();
+            
+            // 更新光标位置
+            const position = tab.editor.getPosition();
+            document.getElementById('cursor-position').textContent = 
+                `行: ${position.lineNumber}, 列: ${position.column}`;
+        }
+        
+        // 关闭标签页
+        function closeTab(tabId) {
+            const tab = AppState.tabs[tabId];
+            if (!tab) return;
+            
+            // 如果是已修改的标签页,提示保存
+            if (tab.modified) {
+                if (!confirm(`"${tab.title}" 有未保存的更改。确定要关闭吗?`)) {
+                    return;
+                }
+            }
+            
+            // 销毁编辑器
+            tab.editor.dispose();
+            
+            // 移除DOM元素
+            tab.element.remove();
+            tab.container.remove();
+            
+            // 从状态中移除
+            delete AppState.tabs[tabId];
+            
+            // 如果关闭的是活动标签页,激活另一个标签页
+            if (AppState.activeTabId === tabId) {
+                const remainingTabs = Object.keys(AppState.tabs);
+                if (remainingTabs.length > 0) {
+                    setActiveTab(remainingTabs[0]);
+                } else {
+                    // 没有标签页时创建新标签页
+                    AppState.activeTabId = null;
+                    addNewTab();
+                }
+            }
+        }
+        
+        // 设置标签页修改状态
+        function setTabModified(tabId, modified) {
+            const tab = AppState.tabs[tabId];
+            if (!tab || tab.modified === modified) return;
+            
+            tab.modified = modified;
+            const titleEl = tab.element.querySelector('.tab-title');
+            if (modified) {
+                titleEl.textContent = `* ${tab.title}`;
+                titleEl.style.fontStyle = 'italic';
+            } else {
+                titleEl.textContent = tab.title;
+                titleEl.style.fontStyle = 'normal';
+            }
+        }
+        
+        // 初始化事件监听器
+        function initEventListeners() {
+            // 新建标签页按钮
+            document.getElementById('new-tab').addEventListener('click', () => {
+                addNewTab();
+            });
+
+
+            // 打开按钮
+            document.getElementById('open-file').addEventListener('click', () => {
+                // 向后端发送打开文件的请求
+                sendWebSocketMessage({
+                    type: 'open'
+                });
+            });
+            
+            // 保存按钮
+            document.getElementById('save-file').addEventListener('click', () => {
+                if (AppState.activeTabId) {
+                    const tab = AppState.tabs[AppState.activeTabId];
+                    const content = tab.editor.getValue();
+                    // 通过WebSocket发送保存请求
+                    sendWebSocketMessage({
+                        type: 'save',
+                        filename: tab.title,
+                        content: content
+                    });
+                    setTabModified(AppState.activeTabId, false);
+                    //showNotification(`"${tab.title}" 保存成功`);
+                }
+            });
+            
+            // 运行按钮
+            document.getElementById('run-code').addEventListener('click', () => {
+                if (AppState.activeTabId) {
+                    const tab = AppState.tabs[AppState.activeTabId];
+                    const content = tab.editor.getValue();
+                    // 通过WebSocket发送执行请求
+                    sendWebSocketMessage({
+                        type: 'execute',
+                        filename: tab.title,
+                        content: content
+                    });
+                    showNotification(`正在执行 "${tab.title}"...`);
+                }
+            });
+            
+            // 标签页点击事件委托
+            document.getElementById('tabs-container').addEventListener('click', (e) => {
+                const tabEl = e.target.closest('.tab');
+                if (!tabEl) return;
+                
+                const tabId = tabEl.dataset.tabId;
+                
+                // 关闭按钮点击
+                if (e.target.closest('.tab-close')) {
+                    closeTab(tabId);
+                    return;
+                }
+                
+                // 标签页点击
+                setActiveTab(tabId);
+            });
+            
+            // 主题切换
+            document.getElementById('theme-toggle').addEventListener('click', () => {
+                const newTheme = AppState.theme === 'vs' ? 'vs-dark' : 'vs';
+                AppState.theme = newTheme;
+                
+                // 更新所有编辑器的主题
+                Object.values(AppState.tabs).forEach(tab => {
+                    monaco.editor.setTheme(newTheme);
+                });
+                
+                // 更新按钮图标
+                const icon = document.querySelector('#theme-toggle i');
+                icon.className = newTheme === 'vs-dark' ? 'fas fa-sun' : 'fas fa-moon';
+                document.getElementById('theme-toggle').innerHTML = 
+                    `<i class="${icon.className}"></i> ${newTheme === 'vs-dark' ? '亮色模式' : '暗色模式'}`;
+                
+                // 更新根元素类以调整整体主题
+                document.documentElement.style.setProperty('--primary-color', newTheme === 'vs-dark' ? '#0078d7' : '#0078d7');
+                document.documentElement.style.setProperty('--tab-bg', newTheme === 'vs-dark' ? '#252526' : '#f3f3f3');
+                document.documentElement.style.setProperty('--tab-active-bg', newTheme === 'vs-dark' ? '#1e1e1e' : '#ffffff');
+                document.documentElement.style.setProperty('--tab-hover-bg', newTheme === 'vs-dark' ? '#2d2d2d' : '#eaeaea');
+                document.documentElement.style.setProperty('--toolbar-bg', newTheme === 'vs-dark' ? '#333333' : '#e0e0e0');
+                document.documentElement.style.setProperty('--border-color', newTheme === 'vs-dark' ? '#454545' : '#cccccc');
+                document.documentElement.style.setProperty('--text-color', newTheme === 'vs-dark' ? '#d4d4d4' : '#333333');
+                
+                showNotification(`已切换至${newTheme === 'vs-dark' ? '暗色' : '亮色'}主题`);
+            });
+            
+            // 调试控制台切换
+            document.getElementById('toggle-console').addEventListener('click', () => {
+                AppState.wsConsoleVisible = !AppState.wsConsoleVisible;
+                document.getElementById('ws-console').style.display = 
+                    AppState.wsConsoleVisible ? 'block' : 'none';
+            });
+        }
+        
+        // 模拟WebSocket连接
+        function simulateWebSocketConnection() {
+            const wsStatus = document.getElementById('ws-status');
+            const wsStatusText = document.getElementById('ws-status-text');
+            
+            // 初始状态为未连接
+            wsStatus.className = 'ws-status disconnected';
+            wsStatusText.textContent = '未连接';
+
+            // 模拟连接过程
+            setTimeout(() => {
+                AppState.wsConnected = true;
+                wsStatus.className = 'ws-status connected';
+                wsStatusText.textContent = '已连接';
+                showNotification('WebSocket 连接成功');
+                logWebSocketMessage('incoming', '连接已建立');
+            }, 1500);
+         }
+
+        // 发送WebSocket消息
+        function sendWebSocketMessage(message) { 
+            if (!AppState.wsConnected || !realWS || realWS.readyState !== WebSocket.OPEN) {
+                showNotification('错误:WebSocket 未连接', 'error');  // 弹出错误提示
+                return;  // 中止发送
+            }
+            // 将传入的消息对象转换为 JSON 字符串
+            const msg = JSON.stringify(message);
+            // 通过 WebSocket 发送消息
+            realWS.send(msg);
+            // 记录已发送的消息内容,用于调试或日志展示
+            logWebSocketMessage('outgoing', msg);
+        }
+
+
+        // 发送WebSocket消息(模拟)
+        function sendWebSocketMessage_false(message) {
+            if (!AppState.wsConnected) {
+                showNotification('错误:WebSocket 未连接', 'error');
+                return;
+            }
+            
+            // 记录发送的消息
+            logWebSocketMessage('outgoing', JSON.stringify(message));
+            
+            // 模拟服务器响应
+            setTimeout(() => {
+                let response;
+                if (message.type === 'save') {
+                    response = { type: 'save_success', filename: message.filename };
+                    logWebSocketMessage('incoming', JSON.stringify(response));
+                } else if (message.type === 'execute') {
+                    response = { 
+                        type: 'execute_result', 
+                        filename: message.filename,
+                        result: '执行完成(模拟结果)'
+                    };
+                    logWebSocketMessage('incoming', JSON.stringify(response));
+                }
+            }, 500);
+        }
+        
+        // 记录WebSocket消息到控制台
+        function logWebSocketMessage(direction, content) {
+            if (!AppState.wsConsoleVisible) return;
+            
+            const consoleEl = document.getElementById('console-content');
+            const entry = document.createElement('div');
+            entry.className = `console-entry ${direction}`;
+            entry.textContent = `[${new Date().toLocaleTimeString()}] ${content}`;
+            consoleEl.appendChild(entry);
+            consoleEl.scrollTop = consoleEl.scrollHeight;
+        }
+        
+        // 显示通知
+        function showNotification(message, type = 'info') {
+            const notification = document.getElementById('notification');
+            notification.textContent = message;
+            notification.style.display = 'block';
+            notification.style.backgroundColor = type === 'error' ? '#f44336' : '#333';
+            
+            setTimeout(() => {
+                notification.style.display = 'none';
+            }, 3000);
+        }
+        
+        // 启动应用
+        window.addEventListener('DOMContentLoaded', initApp);
+    </script>
+</body>
+</html>

File diff suppressed because it is too large
+ 1327 - 0
22409240张博明/homework2/monaco/public/monaco-editor/CHANGELOG.md


+ 21 - 0
22409240张博明/homework2/monaco/public/monaco-editor/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 - present Microsoft Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 97 - 0
22409240张博明/homework2/monaco/public/monaco-editor/README.md

@@ -0,0 +1,97 @@
+# Monaco Editor
+
+[![Build Status](https://dev.azure.com/ms/monaco-editor/_apis/build/status/microsoft.monaco-editor?label=website)](https://dev.azure.com/ms/monaco-editor/_build/latest?definitionId=3)
+
+The Monaco Editor is the code editor which powers [VS Code](https://github.com/Microsoft/vscode), with the features better described [here](https://code.visualstudio.com/docs/editor/editingevolved).
+
+Please note that this repository contains no source code for the code editor, it only contains the scripts to package everything together and ship the `monaco-editor` npm module.
+
+![image](https://user-images.githubusercontent.com/5047891/94183711-290c0780-fea3-11ea-90e3-c88ff9d21bd6.png)
+
+## Try it out
+
+Try the editor out [on our website](https://microsoft.github.io/monaco-editor/index.html).
+
+## Installing
+
+```
+$ npm install monaco-editor
+```
+
+You will get:
+
+- inside `esm`: ESM version of the editor (compatible with e.g. webpack)
+- inside `dev`: AMD bundled, not minified
+- inside `min`: AMD bundled, and minified
+- inside `min-maps`: source maps for `min`
+- `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
+
+It is recommended to develop against the `dev` version, and in production to use the `min` version.
+
+## Documentation
+
+- Learn how to integrate the editor with these [complete samples](https://github.com/Microsoft/monaco-editor-samples/).
+  - [Integrate the AMD version](./monaco-editor/docs/integrate-amd.md).
+  - [Integrate the AMD version cross-domain](./monaco-editor/docs/integrate-amd-cross.md)
+  - [Integrate the ESM version](./monaco-editor/docs/integrate-esm.md)
+- Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
+- Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/Microsoft/monaco-editor/blob/master/website/playground/monaco.d.ts.txt).
+- Read [this guide](https://github.com/Microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
+- Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
+- Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
+
+## Issues
+
+Create [issues](https://github.com/Microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Always mention **the version** of the editor when creating issues and **the browser** you're having trouble in. Please search for existing issues to avoid duplicates.
+
+## FAQ
+
+❓ **What is the relationship between VS Code and the Monaco Editor?**
+
+The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
+
+❓ **What is the relationship between VS Code's version and the Monaco Editor's version?**
+
+None. The Monaco Editor is a library and it reflects directly the source code.
+
+❓ **I've written an extension for VS Code, will it work on the Monaco Editor in a browser?**
+
+No.
+
+> Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible.
+
+❓ **Why all these web workers and why should I care?**
+
+Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
+
+❓ **What is this `loader.js`? Can I use `require.js`?**
+
+It is an AMD loader that we use in VS Code. Yes.
+
+❓ **I see the warning "Could not create web worker". What should I do?**
+
+HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes. Please also see the cross-domain case above.
+
+❓ **Is the editor supported in mobile browsers or mobile web app frameworks?**
+
+No.
+
+❓ **Why doesn't the editor support TextMate grammars?**
+
+- Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
+
+❓ **What about IE 11 support?**
+
+- The Monaco Editor no longer supports IE 11. The last version that was tested on IE 11 is `0.18.1`.
+
+## Development setup
+
+Please see [CONTRIBUTING](./CONTRIBUTING.md)
+
+## Code of Conduct
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+
+## License
+
+Licensed under the [MIT](https://github.com/Microsoft/monaco-editor/blob/master/LICENSE.md) License.

File diff suppressed because it is too large
+ 259 - 0
22409240张博明/homework2/monaco/public/monaco-editor/ThirdPartyNotices.txt


File diff suppressed because it is too large
+ 7117 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/bundleInfo.json


File diff suppressed because it is too large
+ 3443 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/nls.metadata.json


BIN
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/base/browser/ui/codicons/codicon/codicon.ttf


File diff suppressed because it is too large
+ 11898 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/base/worker/workerMain.js


File diff suppressed because it is too large
+ 1 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/base/worker/workerMain.js.map


File diff suppressed because it is too large
+ 1359 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/abap/abap.js


+ 339 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/apex/apex.js

@@ -0,0 +1,339 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/apex/apex',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        // the default separators except `@$`
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '<', close: '>' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))'),
+                end: new RegExp('^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))')
+            }
+        }
+    };
+    var keywords = [
+        'abstract',
+        'activate',
+        'and',
+        'any',
+        'array',
+        'as',
+        'asc',
+        'assert',
+        'autonomous',
+        'begin',
+        'bigdecimal',
+        'blob',
+        'boolean',
+        'break',
+        'bulk',
+        'by',
+        'case',
+        'cast',
+        'catch',
+        'char',
+        'class',
+        'collect',
+        'commit',
+        'const',
+        'continue',
+        'convertcurrency',
+        'decimal',
+        'default',
+        'delete',
+        'desc',
+        'do',
+        'double',
+        'else',
+        'end',
+        'enum',
+        'exception',
+        'exit',
+        'export',
+        'extends',
+        'false',
+        'final',
+        'finally',
+        'float',
+        'for',
+        'from',
+        'future',
+        'get',
+        'global',
+        'goto',
+        'group',
+        'having',
+        'hint',
+        'if',
+        'implements',
+        'import',
+        'in',
+        'inner',
+        'insert',
+        'instanceof',
+        'int',
+        'interface',
+        'into',
+        'join',
+        'last_90_days',
+        'last_month',
+        'last_n_days',
+        'last_week',
+        'like',
+        'limit',
+        'list',
+        'long',
+        'loop',
+        'map',
+        'merge',
+        'native',
+        'new',
+        'next_90_days',
+        'next_month',
+        'next_n_days',
+        'next_week',
+        'not',
+        'null',
+        'nulls',
+        'number',
+        'object',
+        'of',
+        'on',
+        'or',
+        'outer',
+        'override',
+        'package',
+        'parallel',
+        'pragma',
+        'private',
+        'protected',
+        'public',
+        'retrieve',
+        'return',
+        'returning',
+        'rollback',
+        'savepoint',
+        'search',
+        'select',
+        'set',
+        'short',
+        'sort',
+        'stat',
+        'static',
+        'strictfp',
+        'super',
+        'switch',
+        'synchronized',
+        'system',
+        'testmethod',
+        'then',
+        'this',
+        'this_month',
+        'this_week',
+        'throw',
+        'throws',
+        'today',
+        'tolabel',
+        'tomorrow',
+        'transaction',
+        'transient',
+        'trigger',
+        'true',
+        'try',
+        'type',
+        'undelete',
+        'update',
+        'upsert',
+        'using',
+        'virtual',
+        'void',
+        'volatile',
+        'webservice',
+        'when',
+        'where',
+        'while',
+        'yesterday'
+    ];
+    // create case variations of the keywords - apex is case insensitive, but we can't make the highlighter case insensitive
+    // because we use a heuristic to assume that identifiers starting with an upper case letter are types.
+    var uppercaseFirstLetter = function (lowercase) {
+        return lowercase.charAt(0).toUpperCase() + lowercase.substr(1);
+    };
+    var keywordsWithCaseVariations = [];
+    keywords.forEach(function (lowercase) {
+        keywordsWithCaseVariations.push(lowercase);
+        keywordsWithCaseVariations.push(lowercase.toUpperCase());
+        keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
+    });
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.apex',
+        keywords: keywordsWithCaseVariations,
+        operators: [
+            '=',
+            '>',
+            '<',
+            '!',
+            '~',
+            '?',
+            ':',
+            '==',
+            '<=',
+            '>=',
+            '!=',
+            '&&',
+            '||',
+            '++',
+            '--',
+            '+',
+            '-',
+            '*',
+            '/',
+            '&',
+            '|',
+            '^',
+            '%',
+            '<<',
+            '>>',
+            '>>>',
+            '+=',
+            '-=',
+            '*=',
+            '/=',
+            '&=',
+            '|=',
+            '^=',
+            '%=',
+            '<<=',
+            '>>=',
+            '>>>='
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        digits: /\d+(_+\d+)*/,
+        octaldigits: /[0-7]+(_+[0-7]+)*/,
+        binarydigits: /[0-1]+(_+[0-1]+)*/,
+        hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // assume that identifiers starting with an uppercase letter are types
+                [
+                    /[A-Z][\w\$]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // @ annotations.
+                [/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
+                // numbers
+                [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
+                [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
+                [/(@digits)[fFdD]/, 'number.float'],
+                [/(@digits)[lL]?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string."'],
+                [/'/, 'string', "@string.'"],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@apexdoc'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                // [/\/\*/, 'comment', '@push' ],    // nested comment not allowed :-(
+                // [/\/\*/,    'comment.invalid' ],    // this breaks block comments in the shape of /* //*/
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            //Identical copy of comment above, except for the addition of .doc
+            apexdoc: [
+                [/[^\/*]+/, 'comment.doc'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            string: [
+                [/[^\\"']+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ]
+        }
+    };
+});
+

+ 75 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/azcli/azcli.js

@@ -0,0 +1,75 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/azcli/azcli',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#'
+        }
+    };
+    exports.language = {
+        defaultToken: 'keyword',
+        ignoreCase: true,
+        tokenPostfix: '.azcli',
+        str: /[^#\s]/,
+        tokenizer: {
+            root: [
+                { include: '@comment' },
+                [
+                    /\s-+@str*\s*/,
+                    {
+                        cases: {
+                            '@eos': { token: 'key.identifier', next: '@popall' },
+                            '@default': { token: 'key.identifier', next: '@type' }
+                        }
+                    }
+                ],
+                [
+                    /^-+@str*\s*/,
+                    {
+                        cases: {
+                            '@eos': { token: 'key.identifier', next: '@popall' },
+                            '@default': { token: 'key.identifier', next: '@type' }
+                        }
+                    }
+                ]
+            ],
+            type: [
+                { include: '@comment' },
+                [
+                    /-+@str*\s*/,
+                    {
+                        cases: {
+                            '@eos': { token: 'key.identifier', next: '@popall' },
+                            '@default': 'key.identifier'
+                        }
+                    }
+                ],
+                [
+                    /@str+\s*/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string', next: '@popall' },
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ],
+            comment: [
+                [
+                    /#.*$/,
+                    {
+                        cases: {
+                            '@eos': { token: 'comment', next: '@popall' }
+                        }
+                    }
+                ]
+            ]
+        }
+    };
+});
+

+ 107 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/bat/bat.js

@@ -0,0 +1,107 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/bat/bat',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: 'REM'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' }
+        ],
+        surroundingPairs: [
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*(::\\s*|REM\\s+)#region'),
+                end: new RegExp('^\\s*(::\\s*|REM\\s+)#endregion')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        ignoreCase: true,
+        tokenPostfix: '.bat',
+        brackets: [
+            { token: 'delimiter.bracket', open: '{', close: '}' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' },
+            { token: 'delimiter.square', open: '[', close: ']' }
+        ],
+        keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,
+        // we include these common regular expressions
+        symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                [/^(\s*)(rem(?:\s.*|))$/, ['', 'comment']],
+                [/(\@?)(@keywords)(?!\w)/, [{ token: 'keyword' }, { token: 'keyword.$2' }]],
+                // whitespace
+                [/[ \t\r\n]+/, ''],
+                // blocks
+                [/setlocal(?!\w)/, 'keyword.tag-setlocal'],
+                [/endlocal(?!\w)/, 'keyword.tag-setlocal'],
+                // words
+                [/[a-zA-Z_]\w*/, ''],
+                // labels
+                [/:\w*/, 'metatag'],
+                // variables
+                [/%[^%]+%/, 'variable'],
+                [/%%[\w]+(?!\w)/, 'variable'],
+                // punctuations
+                [/[{}()\[\]]/, '@brackets'],
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
+                [/\d+/, 'number'],
+                // punctuation: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings:
+                [/"/, 'string', '@string."'],
+                [/'/, 'string', "@string.'"]
+            ],
+            string: [
+                [
+                    /[^\\"'%]+/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string', next: '@popall' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/%[\w ]+%/, 'variable'],
+                [/%%[\w]+(?!\w)/, 'variable'],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/$/, 'string', '@popall']
+            ]
+        }
+    };
+});
+

+ 114 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/bicep/bicep.js

@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+define('vs/basic-languages/bicep/bicep',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    var bounded = function (text) { return "\\b" + text + "\\b"; };
+    var identifierStart = '[_a-zA-Z]';
+    var identifierContinue = '[_a-zA-Z0-9]';
+    var identifier = bounded("" + identifierStart + identifierContinue + "*");
+    var keywords = [
+        'targetScope',
+        'resource',
+        'module',
+        'param',
+        'var',
+        'output',
+        'for',
+        'in',
+        'if',
+        'existing'
+    ];
+    var namedLiterals = ['true', 'false', 'null'];
+    var nonCommentWs = "[ \\t\\r\\n]";
+    var numericLiteral = "[0-9]+";
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'" },
+            { open: "'''", close: "'''" }
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: "'''", close: "'''", notIn: ['string', 'comment'] }
+        ],
+        autoCloseBefore: ":.,=}])' \n\t",
+        indentationRules: {
+            increaseIndentPattern: new RegExp('^((?!\\/\\/).)*(\\{[^}"\'`]*|\\([^)"\'`]*|\\[[^\\]"\'`]*)$'),
+            decreaseIndentPattern: new RegExp('^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$')
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.bicep',
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        symbols: /[=><!~?:&|+\-*/^%]+/,
+        keywords: keywords,
+        namedLiterals: namedLiterals,
+        escapes: "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",
+        tokenizer: {
+            root: [{ include: '@expression' }, { include: '@whitespace' }],
+            stringVerbatim: [
+                { regex: "(|'|'')[^']", action: { token: 'string' } },
+                { regex: "'''", action: { token: 'string.quote', next: '@pop' } }
+            ],
+            stringLiteral: [
+                { regex: "\\${", action: { token: 'delimiter.bracket', next: '@bracketCounting' } },
+                { regex: "[^\\\\'$]+", action: { token: 'string' } },
+                { regex: '@escapes', action: { token: 'string.escape' } },
+                { regex: "\\\\.", action: { token: 'string.escape.invalid' } },
+                { regex: "'", action: { token: 'string', next: '@pop' } }
+            ],
+            bracketCounting: [
+                { regex: "{", action: { token: 'delimiter.bracket', next: '@bracketCounting' } },
+                { regex: "}", action: { token: 'delimiter.bracket', next: '@pop' } },
+                { include: 'expression' }
+            ],
+            comment: [
+                { regex: "[^\\*]+", action: { token: 'comment' } },
+                { regex: "\\*\\/", action: { token: 'comment', next: '@pop' } },
+                { regex: "[\\/*]", action: { token: 'comment' } }
+            ],
+            whitespace: [
+                { regex: nonCommentWs },
+                { regex: "\\/\\*", action: { token: 'comment', next: '@comment' } },
+                { regex: "\\/\\/.*$", action: { token: 'comment' } }
+            ],
+            expression: [
+                { regex: "'''", action: { token: 'string.quote', next: '@stringVerbatim' } },
+                { regex: "'", action: { token: 'string.quote', next: '@stringLiteral' } },
+                { regex: numericLiteral, action: { token: 'number' } },
+                {
+                    regex: identifier,
+                    action: {
+                        cases: {
+                            '@keywords': { token: 'keyword' },
+                            '@namedLiterals': { token: 'keyword' },
+                            '@default': { token: 'identifier' }
+                        }
+                    }
+                }
+            ]
+        }
+    };
+});
+

+ 180 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/cameligo/cameligo.js

@@ -0,0 +1,180 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/cameligo/cameligo',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['(*', '*)']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')'],
+            ['<', '>']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" },
+            { open: '"', close: '"' },
+            { open: '(*', close: '*)' }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" },
+            { open: '"', close: '"' },
+            { open: '(*', close: '*)' }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.cameligo',
+        ignoreCase: true,
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        keywords: [
+            'abs',
+            'assert',
+            'block',
+            'Bytes',
+            'case',
+            'Crypto',
+            'Current',
+            'else',
+            'failwith',
+            'false',
+            'for',
+            'fun',
+            'if',
+            'in',
+            'let',
+            'let%entry',
+            'let%init',
+            'List',
+            'list',
+            'Map',
+            'map',
+            'match',
+            'match%nat',
+            'mod',
+            'not',
+            'operation',
+            'Operation',
+            'of',
+            'record',
+            'Set',
+            'set',
+            'sender',
+            'skip',
+            'source',
+            'String',
+            'then',
+            'to',
+            'true',
+            'type',
+            'with'
+        ],
+        typeKeywords: ['int', 'unit', 'string', 'tz', 'nat', 'bool'],
+        operators: [
+            '=',
+            '>',
+            '<',
+            '<=',
+            '>=',
+            '<>',
+            ':',
+            ':=',
+            'and',
+            'mod',
+            'or',
+            '+',
+            '-',
+            '*',
+            '/',
+            '@',
+            '&',
+            '^',
+            '%',
+            '->',
+            '<-',
+            '&&',
+            '||'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><:@\^&|+\-*\/\^%]+/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_][\w]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/'/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/'/, 'string.invalid'],
+                [/\#\d+/, 'string']
+            ],
+            /* */
+            comment: [
+                [/[^\(\*]+/, 'comment'],
+                //[/\(\*/,    'comment', '@push' ],    // nested comment  not allowed :-(
+                [/\*\)/, 'comment', '@pop'],
+                [/\(\*/, 'comment']
+            ],
+            string: [
+                [/[^\\']+/, 'string'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, 'white'],
+                [/\(\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ]
+        }
+    };
+});
+

+ 767 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/clojure/clojure.js

@@ -0,0 +1,767 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/clojure/clojure',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: ';;'
+        },
+        brackets: [
+            ['[', ']'],
+            ['(', ')'],
+            ['{', '}']
+        ],
+        autoClosingPairs: [
+            { open: '[', close: ']' },
+            { open: '"', close: '"' },
+            { open: '(', close: ')' },
+            { open: '{', close: '}' }
+        ],
+        surroundingPairs: [
+            { open: '[', close: ']' },
+            { open: '"', close: '"' },
+            { open: '(', close: ')' },
+            { open: '{', close: '}' }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        ignoreCase: true,
+        tokenPostfix: '.clj',
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '{', close: '}', token: 'delimiter.curly' }
+        ],
+        constants: ['true', 'false', 'nil'],
+        // delimiters: /[\\\[\]\s"#'(),;@^`{}~]|$/,
+        numbers: /^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,
+        characters: /^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,
+        escapes: /^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // simple-namespace := /^[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*/
+        // simple-symbol    := /^(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)/
+        // qualified-symbol := (<simple-namespace>(<.><simple-namespace>)*</>)?<simple-symbol>
+        qualifiedSymbols: /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,
+        specialForms: [
+            '.',
+            'catch',
+            'def',
+            'do',
+            'if',
+            'monitor-enter',
+            'monitor-exit',
+            'new',
+            'quote',
+            'recur',
+            'set!',
+            'throw',
+            'try',
+            'var'
+        ],
+        coreSymbols: [
+            '*',
+            "*'",
+            '*1',
+            '*2',
+            '*3',
+            '*agent*',
+            '*allow-unresolved-vars*',
+            '*assert*',
+            '*clojure-version*',
+            '*command-line-args*',
+            '*compile-files*',
+            '*compile-path*',
+            '*compiler-options*',
+            '*data-readers*',
+            '*default-data-reader-fn*',
+            '*e',
+            '*err*',
+            '*file*',
+            '*flush-on-newline*',
+            '*fn-loader*',
+            '*in*',
+            '*math-context*',
+            '*ns*',
+            '*out*',
+            '*print-dup*',
+            '*print-length*',
+            '*print-level*',
+            '*print-meta*',
+            '*print-namespace-maps*',
+            '*print-readably*',
+            '*read-eval*',
+            '*reader-resolver*',
+            '*source-path*',
+            '*suppress-read*',
+            '*unchecked-math*',
+            '*use-context-classloader*',
+            '*verbose-defrecords*',
+            '*warn-on-reflection*',
+            '+',
+            "+'",
+            '-',
+            "-'",
+            '->',
+            '->>',
+            '->ArrayChunk',
+            '->Eduction',
+            '->Vec',
+            '->VecNode',
+            '->VecSeq',
+            '-cache-protocol-fn',
+            '-reset-methods',
+            '..',
+            '/',
+            '<',
+            '<=',
+            '=',
+            '==',
+            '>',
+            '>=',
+            'EMPTY-NODE',
+            'Inst',
+            'StackTraceElement->vec',
+            'Throwable->map',
+            'accessor',
+            'aclone',
+            'add-classpath',
+            'add-watch',
+            'agent',
+            'agent-error',
+            'agent-errors',
+            'aget',
+            'alength',
+            'alias',
+            'all-ns',
+            'alter',
+            'alter-meta!',
+            'alter-var-root',
+            'amap',
+            'ancestors',
+            'and',
+            'any?',
+            'apply',
+            'areduce',
+            'array-map',
+            'as->',
+            'aset',
+            'aset-boolean',
+            'aset-byte',
+            'aset-char',
+            'aset-double',
+            'aset-float',
+            'aset-int',
+            'aset-long',
+            'aset-short',
+            'assert',
+            'assoc',
+            'assoc!',
+            'assoc-in',
+            'associative?',
+            'atom',
+            'await',
+            'await-for',
+            'await1',
+            'bases',
+            'bean',
+            'bigdec',
+            'bigint',
+            'biginteger',
+            'binding',
+            'bit-and',
+            'bit-and-not',
+            'bit-clear',
+            'bit-flip',
+            'bit-not',
+            'bit-or',
+            'bit-set',
+            'bit-shift-left',
+            'bit-shift-right',
+            'bit-test',
+            'bit-xor',
+            'boolean',
+            'boolean-array',
+            'boolean?',
+            'booleans',
+            'bound-fn',
+            'bound-fn*',
+            'bound?',
+            'bounded-count',
+            'butlast',
+            'byte',
+            'byte-array',
+            'bytes',
+            'bytes?',
+            'case',
+            'cast',
+            'cat',
+            'char',
+            'char-array',
+            'char-escape-string',
+            'char-name-string',
+            'char?',
+            'chars',
+            'chunk',
+            'chunk-append',
+            'chunk-buffer',
+            'chunk-cons',
+            'chunk-first',
+            'chunk-next',
+            'chunk-rest',
+            'chunked-seq?',
+            'class',
+            'class?',
+            'clear-agent-errors',
+            'clojure-version',
+            'coll?',
+            'comment',
+            'commute',
+            'comp',
+            'comparator',
+            'compare',
+            'compare-and-set!',
+            'compile',
+            'complement',
+            'completing',
+            'concat',
+            'cond',
+            'cond->',
+            'cond->>',
+            'condp',
+            'conj',
+            'conj!',
+            'cons',
+            'constantly',
+            'construct-proxy',
+            'contains?',
+            'count',
+            'counted?',
+            'create-ns',
+            'create-struct',
+            'cycle',
+            'dec',
+            "dec'",
+            'decimal?',
+            'declare',
+            'dedupe',
+            'default-data-readers',
+            'definline',
+            'definterface',
+            'defmacro',
+            'defmethod',
+            'defmulti',
+            'defn',
+            'defn-',
+            'defonce',
+            'defprotocol',
+            'defrecord',
+            'defstruct',
+            'deftype',
+            'delay',
+            'delay?',
+            'deliver',
+            'denominator',
+            'deref',
+            'derive',
+            'descendants',
+            'destructure',
+            'disj',
+            'disj!',
+            'dissoc',
+            'dissoc!',
+            'distinct',
+            'distinct?',
+            'doall',
+            'dorun',
+            'doseq',
+            'dosync',
+            'dotimes',
+            'doto',
+            'double',
+            'double-array',
+            'double?',
+            'doubles',
+            'drop',
+            'drop-last',
+            'drop-while',
+            'eduction',
+            'empty',
+            'empty?',
+            'ensure',
+            'ensure-reduced',
+            'enumeration-seq',
+            'error-handler',
+            'error-mode',
+            'eval',
+            'even?',
+            'every-pred',
+            'every?',
+            'ex-data',
+            'ex-info',
+            'extend',
+            'extend-protocol',
+            'extend-type',
+            'extenders',
+            'extends?',
+            'false?',
+            'ffirst',
+            'file-seq',
+            'filter',
+            'filterv',
+            'find',
+            'find-keyword',
+            'find-ns',
+            'find-protocol-impl',
+            'find-protocol-method',
+            'find-var',
+            'first',
+            'flatten',
+            'float',
+            'float-array',
+            'float?',
+            'floats',
+            'flush',
+            'fn',
+            'fn?',
+            'fnext',
+            'fnil',
+            'for',
+            'force',
+            'format',
+            'frequencies',
+            'future',
+            'future-call',
+            'future-cancel',
+            'future-cancelled?',
+            'future-done?',
+            'future?',
+            'gen-class',
+            'gen-interface',
+            'gensym',
+            'get',
+            'get-in',
+            'get-method',
+            'get-proxy-class',
+            'get-thread-bindings',
+            'get-validator',
+            'group-by',
+            'halt-when',
+            'hash',
+            'hash-combine',
+            'hash-map',
+            'hash-ordered-coll',
+            'hash-set',
+            'hash-unordered-coll',
+            'ident?',
+            'identical?',
+            'identity',
+            'if-let',
+            'if-not',
+            'if-some',
+            'ifn?',
+            'import',
+            'in-ns',
+            'inc',
+            "inc'",
+            'indexed?',
+            'init-proxy',
+            'inst-ms',
+            'inst-ms*',
+            'inst?',
+            'instance?',
+            'int',
+            'int-array',
+            'int?',
+            'integer?',
+            'interleave',
+            'intern',
+            'interpose',
+            'into',
+            'into-array',
+            'ints',
+            'io!',
+            'isa?',
+            'iterate',
+            'iterator-seq',
+            'juxt',
+            'keep',
+            'keep-indexed',
+            'key',
+            'keys',
+            'keyword',
+            'keyword?',
+            'last',
+            'lazy-cat',
+            'lazy-seq',
+            'let',
+            'letfn',
+            'line-seq',
+            'list',
+            'list*',
+            'list?',
+            'load',
+            'load-file',
+            'load-reader',
+            'load-string',
+            'loaded-libs',
+            'locking',
+            'long',
+            'long-array',
+            'longs',
+            'loop',
+            'macroexpand',
+            'macroexpand-1',
+            'make-array',
+            'make-hierarchy',
+            'map',
+            'map-entry?',
+            'map-indexed',
+            'map?',
+            'mapcat',
+            'mapv',
+            'max',
+            'max-key',
+            'memfn',
+            'memoize',
+            'merge',
+            'merge-with',
+            'meta',
+            'method-sig',
+            'methods',
+            'min',
+            'min-key',
+            'mix-collection-hash',
+            'mod',
+            'munge',
+            'name',
+            'namespace',
+            'namespace-munge',
+            'nat-int?',
+            'neg-int?',
+            'neg?',
+            'newline',
+            'next',
+            'nfirst',
+            'nil?',
+            'nnext',
+            'not',
+            'not-any?',
+            'not-empty',
+            'not-every?',
+            'not=',
+            'ns',
+            'ns-aliases',
+            'ns-imports',
+            'ns-interns',
+            'ns-map',
+            'ns-name',
+            'ns-publics',
+            'ns-refers',
+            'ns-resolve',
+            'ns-unalias',
+            'ns-unmap',
+            'nth',
+            'nthnext',
+            'nthrest',
+            'num',
+            'number?',
+            'numerator',
+            'object-array',
+            'odd?',
+            'or',
+            'parents',
+            'partial',
+            'partition',
+            'partition-all',
+            'partition-by',
+            'pcalls',
+            'peek',
+            'persistent!',
+            'pmap',
+            'pop',
+            'pop!',
+            'pop-thread-bindings',
+            'pos-int?',
+            'pos?',
+            'pr',
+            'pr-str',
+            'prefer-method',
+            'prefers',
+            'primitives-classnames',
+            'print',
+            'print-ctor',
+            'print-dup',
+            'print-method',
+            'print-simple',
+            'print-str',
+            'printf',
+            'println',
+            'println-str',
+            'prn',
+            'prn-str',
+            'promise',
+            'proxy',
+            'proxy-call-with-super',
+            'proxy-mappings',
+            'proxy-name',
+            'proxy-super',
+            'push-thread-bindings',
+            'pvalues',
+            'qualified-ident?',
+            'qualified-keyword?',
+            'qualified-symbol?',
+            'quot',
+            'rand',
+            'rand-int',
+            'rand-nth',
+            'random-sample',
+            'range',
+            'ratio?',
+            'rational?',
+            'rationalize',
+            're-find',
+            're-groups',
+            're-matcher',
+            're-matches',
+            're-pattern',
+            're-seq',
+            'read',
+            'read-line',
+            'read-string',
+            'reader-conditional',
+            'reader-conditional?',
+            'realized?',
+            'record?',
+            'reduce',
+            'reduce-kv',
+            'reduced',
+            'reduced?',
+            'reductions',
+            'ref',
+            'ref-history-count',
+            'ref-max-history',
+            'ref-min-history',
+            'ref-set',
+            'refer',
+            'refer-clojure',
+            'reify',
+            'release-pending-sends',
+            'rem',
+            'remove',
+            'remove-all-methods',
+            'remove-method',
+            'remove-ns',
+            'remove-watch',
+            'repeat',
+            'repeatedly',
+            'replace',
+            'replicate',
+            'require',
+            'reset!',
+            'reset-meta!',
+            'reset-vals!',
+            'resolve',
+            'rest',
+            'restart-agent',
+            'resultset-seq',
+            'reverse',
+            'reversible?',
+            'rseq',
+            'rsubseq',
+            'run!',
+            'satisfies?',
+            'second',
+            'select-keys',
+            'send',
+            'send-off',
+            'send-via',
+            'seq',
+            'seq?',
+            'seqable?',
+            'seque',
+            'sequence',
+            'sequential?',
+            'set',
+            'set-agent-send-executor!',
+            'set-agent-send-off-executor!',
+            'set-error-handler!',
+            'set-error-mode!',
+            'set-validator!',
+            'set?',
+            'short',
+            'short-array',
+            'shorts',
+            'shuffle',
+            'shutdown-agents',
+            'simple-ident?',
+            'simple-keyword?',
+            'simple-symbol?',
+            'slurp',
+            'some',
+            'some->',
+            'some->>',
+            'some-fn',
+            'some?',
+            'sort',
+            'sort-by',
+            'sorted-map',
+            'sorted-map-by',
+            'sorted-set',
+            'sorted-set-by',
+            'sorted?',
+            'special-symbol?',
+            'spit',
+            'split-at',
+            'split-with',
+            'str',
+            'string?',
+            'struct',
+            'struct-map',
+            'subs',
+            'subseq',
+            'subvec',
+            'supers',
+            'swap!',
+            'swap-vals!',
+            'symbol',
+            'symbol?',
+            'sync',
+            'tagged-literal',
+            'tagged-literal?',
+            'take',
+            'take-last',
+            'take-nth',
+            'take-while',
+            'test',
+            'the-ns',
+            'thread-bound?',
+            'time',
+            'to-array',
+            'to-array-2d',
+            'trampoline',
+            'transduce',
+            'transient',
+            'tree-seq',
+            'true?',
+            'type',
+            'unchecked-add',
+            'unchecked-add-int',
+            'unchecked-byte',
+            'unchecked-char',
+            'unchecked-dec',
+            'unchecked-dec-int',
+            'unchecked-divide-int',
+            'unchecked-double',
+            'unchecked-float',
+            'unchecked-inc',
+            'unchecked-inc-int',
+            'unchecked-int',
+            'unchecked-long',
+            'unchecked-multiply',
+            'unchecked-multiply-int',
+            'unchecked-negate',
+            'unchecked-negate-int',
+            'unchecked-remainder-int',
+            'unchecked-short',
+            'unchecked-subtract',
+            'unchecked-subtract-int',
+            'underive',
+            'unquote',
+            'unquote-splicing',
+            'unreduced',
+            'unsigned-bit-shift-right',
+            'update',
+            'update-in',
+            'update-proxy',
+            'uri?',
+            'use',
+            'uuid?',
+            'val',
+            'vals',
+            'var-get',
+            'var-set',
+            'var?',
+            'vary-meta',
+            'vec',
+            'vector',
+            'vector-of',
+            'vector?',
+            'volatile!',
+            'volatile?',
+            'vreset!',
+            'vswap!',
+            'when',
+            'when-first',
+            'when-let',
+            'when-not',
+            'when-some',
+            'while',
+            'with-bindings',
+            'with-bindings*',
+            'with-in-str',
+            'with-loading-context',
+            'with-local-vars',
+            'with-meta',
+            'with-open',
+            'with-out-str',
+            'with-precision',
+            'with-redefs',
+            'with-redefs-fn',
+            'xml-seq',
+            'zero?',
+            'zipmap'
+        ],
+        tokenizer: {
+            root: [
+                // whitespaces and comments
+                { include: '@whitespace' },
+                // numbers
+                [/@numbers/, 'number'],
+                // characters
+                [/@characters/, 'string'],
+                // strings
+                { include: '@string' },
+                // brackets
+                [/[()\[\]{}]/, '@brackets'],
+                // regular expressions
+                [/\/#"(?:\.|(?:")|[^"\n])*"\/g/, 'regexp'],
+                // reader macro characters
+                [/[#'@^`~]/, 'meta'],
+                // symbols
+                [
+                    /@qualifiedSymbols/,
+                    {
+                        cases: {
+                            '^:.+$': 'constant',
+                            '@specialForms': 'keyword',
+                            '@coreSymbols': 'keyword',
+                            '@constants': 'constant',
+                            '@default': 'identifier'
+                        }
+                    }
+                ]
+            ],
+            whitespace: [
+                [/[\s,]+/, 'white'],
+                [/;.*$/, 'comment'],
+                [/\(comment\b/, 'comment', '@comment']
+            ],
+            comment: [
+                [/\(/, 'comment', '@push'],
+                [/\)/, 'comment', '@pop'],
+                [/[^()]/, 'comment']
+            ],
+            string: [[/"/, 'string', '@multiLineString']],
+            multiLineString: [
+                [/"/, 'string', '@popall'],
+                [/@escapes/, 'string.escape'],
+                [/./, 'string']
+            ]
+        }
+    };
+});
+

+ 239 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/coffee/coffee.js

@@ -0,0 +1,239 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/coffee/coffee',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            blockComment: ['###', '###'],
+            lineComment: '#'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*#region\\b'),
+                end: new RegExp('^\\s*#endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        ignoreCase: true,
+        tokenPostfix: '.coffee',
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
+        keywords: [
+            'and',
+            'or',
+            'is',
+            'isnt',
+            'not',
+            'on',
+            'yes',
+            '@',
+            'no',
+            'off',
+            'true',
+            'false',
+            'null',
+            'this',
+            'new',
+            'delete',
+            'typeof',
+            'in',
+            'instanceof',
+            'return',
+            'throw',
+            'break',
+            'continue',
+            'debugger',
+            'if',
+            'else',
+            'switch',
+            'for',
+            'while',
+            'do',
+            'try',
+            'catch',
+            'finally',
+            'class',
+            'extends',
+            'super',
+            'undefined',
+            'then',
+            'unless',
+            'until',
+            'loop',
+            'of',
+            'by',
+            'when'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
+        escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [/\@[a-zA-Z_]\w*/, 'variable.predefined'],
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            this: 'variable.predefined',
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': ''
+                        }
+                    }
+                ],
+                // whitespace
+                [/[ \t\r\n]+/, ''],
+                // Comments
+                [/###/, 'comment', '@comment'],
+                [/#.*$/, 'comment'],
+                // regular expressions
+                ['///', { token: 'regexp', next: '@hereregexp' }],
+                [/^(\s*)(@regEx)/, ['', 'regexp']],
+                [/(\()(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
+                [/(\,)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\=)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\:)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\[)(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
+                [/(\!)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\&)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\|)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\?)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\{)(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
+                [/(\;)(\s*)(@regEx)/, ['', '', 'regexp']],
+                // delimiters
+                [
+                    /}/,
+                    {
+                        cases: {
+                            '$S2==interpolatedstring': {
+                                token: 'string',
+                                next: '@pop'
+                            },
+                            '@default': '@brackets'
+                        }
+                    }
+                ],
+                [/[{}()\[\]]/, '@brackets'],
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d+[eE]([\-+]?\d+)?/, 'number.float'],
+                [/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F]+/, 'number.hex'],
+                [/0[0-7]+(?!\d)/, 'number.octal'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[,.]/, 'delimiter'],
+                // strings:
+                [/"""/, 'string', '@herestring."""'],
+                [/'''/, 'string', "@herestring.'''"],
+                [
+                    /"/,
+                    {
+                        cases: {
+                            '@eos': 'string',
+                            '@default': { token: 'string', next: '@string."' }
+                        }
+                    }
+                ],
+                [
+                    /'/,
+                    {
+                        cases: {
+                            '@eos': 'string',
+                            '@default': { token: 'string', next: "@string.'" }
+                        }
+                    }
+                ]
+            ],
+            string: [
+                [/[^"'\#\\]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\./, 'string.escape.invalid'],
+                [/\./, 'string.escape.invalid'],
+                [
+                    /#{/,
+                    {
+                        cases: {
+                            '$S2=="': {
+                                token: 'string',
+                                next: 'root.interpolatedstring'
+                            },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/#/, 'string']
+            ],
+            herestring: [
+                [
+                    /("""|''')/,
+                    {
+                        cases: {
+                            '$1==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/[^#\\'"]+/, 'string'],
+                [/['"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\./, 'string.escape.invalid'],
+                [/#{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
+                [/#/, 'string']
+            ],
+            comment: [
+                [/[^#]+/, 'comment'],
+                [/###/, 'comment', '@pop'],
+                [/#/, 'comment']
+            ],
+            hereregexp: [
+                [/[^\\\/#]+/, 'regexp'],
+                [/\\./, 'regexp'],
+                [/#.*$/, 'comment'],
+                ['///[igm]*', { token: 'regexp', next: '@pop' }],
+                [/\//, 'regexp']
+            ]
+        }
+    };
+});
+

+ 405 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/cpp/cpp.js

@@ -0,0 +1,405 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/cpp/cpp',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '[', close: ']' },
+            { open: '{', close: '}' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*#pragma\\s+region\\b'),
+                end: new RegExp('^\\s*#pragma\\s+endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.cpp',
+        brackets: [
+            { token: 'delimiter.curly', open: '{', close: '}' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' },
+            { token: 'delimiter.square', open: '[', close: ']' },
+            { token: 'delimiter.angle', open: '<', close: '>' }
+        ],
+        keywords: [
+            'abstract',
+            'amp',
+            'array',
+            'auto',
+            'bool',
+            'break',
+            'case',
+            'catch',
+            'char',
+            'class',
+            'const',
+            'constexpr',
+            'const_cast',
+            'continue',
+            'cpu',
+            'decltype',
+            'default',
+            'delegate',
+            'delete',
+            'do',
+            'double',
+            'dynamic_cast',
+            'each',
+            'else',
+            'enum',
+            'event',
+            'explicit',
+            'export',
+            'extern',
+            'false',
+            'final',
+            'finally',
+            'float',
+            'for',
+            'friend',
+            'gcnew',
+            'generic',
+            'goto',
+            'if',
+            'in',
+            'initonly',
+            'inline',
+            'int',
+            'interface',
+            'interior_ptr',
+            'internal',
+            'literal',
+            'long',
+            'mutable',
+            'namespace',
+            'new',
+            'noexcept',
+            'nullptr',
+            '__nullptr',
+            'operator',
+            'override',
+            'partial',
+            'pascal',
+            'pin_ptr',
+            'private',
+            'property',
+            'protected',
+            'public',
+            'ref',
+            'register',
+            'reinterpret_cast',
+            'restrict',
+            'return',
+            'safe_cast',
+            'sealed',
+            'short',
+            'signed',
+            'sizeof',
+            'static',
+            'static_assert',
+            'static_cast',
+            'struct',
+            'switch',
+            'template',
+            'this',
+            'thread_local',
+            'throw',
+            'tile_static',
+            'true',
+            'try',
+            'typedef',
+            'typeid',
+            'typename',
+            'union',
+            'unsigned',
+            'using',
+            'virtual',
+            'void',
+            'volatile',
+            'wchar_t',
+            'where',
+            'while',
+            '_asm',
+            '_based',
+            '_cdecl',
+            '_declspec',
+            '_fastcall',
+            '_if_exists',
+            '_if_not_exists',
+            '_inline',
+            '_multiple_inheritance',
+            '_pascal',
+            '_single_inheritance',
+            '_stdcall',
+            '_virtual_inheritance',
+            '_w64',
+            '__abstract',
+            '__alignof',
+            '__asm',
+            '__assume',
+            '__based',
+            '__box',
+            '__builtin_alignof',
+            '__cdecl',
+            '__clrcall',
+            '__declspec',
+            '__delegate',
+            '__event',
+            '__except',
+            '__fastcall',
+            '__finally',
+            '__forceinline',
+            '__gc',
+            '__hook',
+            '__identifier',
+            '__if_exists',
+            '__if_not_exists',
+            '__inline',
+            '__int128',
+            '__int16',
+            '__int32',
+            '__int64',
+            '__int8',
+            '__interface',
+            '__leave',
+            '__m128',
+            '__m128d',
+            '__m128i',
+            '__m256',
+            '__m256d',
+            '__m256i',
+            '__m64',
+            '__multiple_inheritance',
+            '__newslot',
+            '__nogc',
+            '__noop',
+            '__nounwind',
+            '__novtordisp',
+            '__pascal',
+            '__pin',
+            '__pragma',
+            '__property',
+            '__ptr32',
+            '__ptr64',
+            '__raise',
+            '__restrict',
+            '__resume',
+            '__sealed',
+            '__single_inheritance',
+            '__stdcall',
+            '__super',
+            '__thiscall',
+            '__try',
+            '__try_cast',
+            '__typeof',
+            '__unaligned',
+            '__unhook',
+            '__uuidof',
+            '__value',
+            '__virtual_inheritance',
+            '__w64',
+            '__wchar_t'
+        ],
+        operators: [
+            '=',
+            '>',
+            '<',
+            '!',
+            '~',
+            '?',
+            ':',
+            '==',
+            '<=',
+            '>=',
+            '!=',
+            '&&',
+            '||',
+            '++',
+            '--',
+            '+',
+            '-',
+            '*',
+            '/',
+            '&',
+            '|',
+            '^',
+            '%',
+            '<<',
+            '>>',
+            '>>>',
+            '+=',
+            '-=',
+            '*=',
+            '/=',
+            '&=',
+            '|=',
+            '^=',
+            '%=',
+            '<<=',
+            '>>=',
+            '>>>='
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
+        floatsuffix: /[fFlL]?/,
+        encoding: /u|u8|U|L/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // C++ 11 Raw String
+                [/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: 'string.raw.begin', next: '@raw.$1' }],
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // The preprocessor checks must be before whitespace as they check /^\s*#/ which
+                // otherwise fails to match later after other whitespace has been removed.
+                // Inclusion
+                [/^\s*#\s*include/, { token: 'keyword.directive.include', next: '@include' }],
+                // Preprocessor directive
+                [/^\s*#\s*\w+/, 'keyword.directive'],
+                // whitespace
+                { include: '@whitespace' },
+                // [[ attributes ]].
+                [/\[\s*\[/, { token: 'annotation', next: '@annotation' }],
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
+                [/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
+                [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],
+                [/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],
+                [/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],
+                [/\d[\d']*\d(@integersuffix)/, 'number'],
+                [/\d(@integersuffix)/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*\\$/, 'comment', '@linecomment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            //For use with continuous line comments
+            linecomment: [
+                [/.*[^\\]$/, 'comment', '@pop'],
+                [/[^]+/, 'comment']
+            ],
+            //Identical copy of comment above, except for the addition of .doc
+            doccomment: [
+                [/[^\/*]+/, 'comment.doc'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop']
+            ],
+            raw: [
+                [
+                    /(.*)(\))(?:([^ ()\\\t"]*))(\")/,
+                    {
+                        cases: {
+                            '$3==$S2': [
+                                'string.raw',
+                                'string.raw.end',
+                                'string.raw.end',
+                                { token: 'string.raw.end', next: '@pop' }
+                            ],
+                            '@default': ['string.raw', 'string.raw', 'string.raw', 'string.raw']
+                        }
+                    }
+                ],
+                [/.*/, 'string.raw']
+            ],
+            annotation: [
+                { include: '@whitespace' },
+                [/using|alignas/, 'keyword'],
+                [/[a-zA-Z0-9_]+/, 'annotation'],
+                [/[,:]/, 'delimiter'],
+                [/[()]/, '@brackets'],
+                [/\]\s*\]/, { token: 'annotation', next: '@pop' }]
+            ],
+            include: [
+                [
+                    /(\s*)(<)([^<>]*)(>)/,
+                    [
+                        '',
+                        'keyword.directive.include.begin',
+                        'string.include.identifier',
+                        { token: 'keyword.directive.include.end', next: '@pop' }
+                    ]
+                ],
+                [
+                    /(\s*)(")([^"]*)(")/,
+                    [
+                        '',
+                        'keyword.directive.include.begin',
+                        'string.include.identifier',
+                        { token: 'keyword.directive.include.end', next: '@pop' }
+                    ]
+                ]
+            ]
+        }
+    };
+});
+

+ 331 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/csharp/csharp.js

@@ -0,0 +1,331 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/csharp/csharp',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" },
+            { open: '"', close: '"' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*#region\\b'),
+                end: new RegExp('^\\s*#endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.cs',
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        keywords: [
+            'extern',
+            'alias',
+            'using',
+            'bool',
+            'decimal',
+            'sbyte',
+            'byte',
+            'short',
+            'ushort',
+            'int',
+            'uint',
+            'long',
+            'ulong',
+            'char',
+            'float',
+            'double',
+            'object',
+            'dynamic',
+            'string',
+            'assembly',
+            'is',
+            'as',
+            'ref',
+            'out',
+            'this',
+            'base',
+            'new',
+            'typeof',
+            'void',
+            'checked',
+            'unchecked',
+            'default',
+            'delegate',
+            'var',
+            'const',
+            'if',
+            'else',
+            'switch',
+            'case',
+            'while',
+            'do',
+            'for',
+            'foreach',
+            'in',
+            'break',
+            'continue',
+            'goto',
+            'return',
+            'throw',
+            'try',
+            'catch',
+            'finally',
+            'lock',
+            'yield',
+            'from',
+            'let',
+            'where',
+            'join',
+            'on',
+            'equals',
+            'into',
+            'orderby',
+            'ascending',
+            'descending',
+            'select',
+            'group',
+            'by',
+            'namespace',
+            'partial',
+            'class',
+            'field',
+            'event',
+            'method',
+            'param',
+            'public',
+            'protected',
+            'internal',
+            'private',
+            'abstract',
+            'sealed',
+            'static',
+            'struct',
+            'readonly',
+            'volatile',
+            'virtual',
+            'override',
+            'params',
+            'get',
+            'set',
+            'add',
+            'remove',
+            'operator',
+            'true',
+            'false',
+            'implicit',
+            'explicit',
+            'interface',
+            'enum',
+            'null',
+            'async',
+            'await',
+            'fixed',
+            'sizeof',
+            'stackalloc',
+            'unsafe',
+            'nameof',
+            'when'
+        ],
+        namespaceFollows: ['namespace', 'using'],
+        parenFollows: ['if', 'for', 'while', 'switch', 'foreach', 'using', 'catch', 'when'],
+        operators: [
+            '=',
+            '??',
+            '||',
+            '&&',
+            '|',
+            '^',
+            '&',
+            '==',
+            '!=',
+            '<=',
+            '>=',
+            '<<',
+            '+',
+            '-',
+            '*',
+            '/',
+            '%',
+            '!',
+            '~',
+            '++',
+            '--',
+            '+=',
+            '-=',
+            '*=',
+            '/=',
+            '%=',
+            '&=',
+            '|=',
+            '^=',
+            '<<=',
+            '>>=',
+            '>>',
+            '=>'
+        ],
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        // escape sequences
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /\@?[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@namespaceFollows': {
+                                token: 'keyword.$0',
+                                next: '@namespace'
+                            },
+                            '@keywords': {
+                                token: 'keyword.$0',
+                                next: '@qualified'
+                            },
+                            '@default': { token: 'identifier', next: '@qualified' }
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [
+                    /}/,
+                    {
+                        cases: {
+                            '$S2==interpolatedstring': {
+                                token: 'string.quote',
+                                next: '@pop'
+                            },
+                            '$S2==litinterpstring': {
+                                token: 'string.quote',
+                                next: '@pop'
+                            },
+                            '@default': '@brackets'
+                        }
+                    }
+                ],
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, 'number.float'],
+                [/0[xX][0-9a-fA-F_]+/, 'number.hex'],
+                [/0[bB][01_]+/, 'number.hex'],
+                [/[0-9_]+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"/, { token: 'string.quote', next: '@string' }],
+                [/\$\@"/, { token: 'string.quote', next: '@litinterpstring' }],
+                [/\@"/, { token: 'string.quote', next: '@litstring' }],
+                [/\$"/, { token: 'string.quote', next: '@interpolatedstring' }],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            qualified: [
+                [
+                    /[a-zA-Z_][\w]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/\./, 'delimiter'],
+                ['', '', '@pop']
+            ],
+            namespace: [
+                { include: '@whitespace' },
+                [/[A-Z]\w*/, 'namespace'],
+                [/[\.=]/, 'delimiter'],
+                ['', '', '@pop']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                // [/\/\*/,    'comment', '@push' ],    // no nested comments :-(
+                ['\\*/', 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, { token: 'string.quote', next: '@pop' }]
+            ],
+            litstring: [
+                [/[^"]+/, 'string'],
+                [/""/, 'string.escape'],
+                [/"/, { token: 'string.quote', next: '@pop' }]
+            ],
+            litinterpstring: [
+                [/[^"{]+/, 'string'],
+                [/""/, 'string.escape'],
+                [/{{/, 'string.escape'],
+                [/}}/, 'string.escape'],
+                [/{/, { token: 'string.quote', next: 'root.litinterpstring' }],
+                [/"/, { token: 'string.quote', next: '@pop' }]
+            ],
+            interpolatedstring: [
+                [/[^\\"{]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/{{/, 'string.escape'],
+                [/}}/, 'string.escape'],
+                [/{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
+                [/"/, { token: 'string.quote', next: '@pop' }]
+            ],
+            whitespace: [
+                [/^[ \t\v\f]*#((r)|(load))(?=\s)/, 'directive.csx'],
+                [/^[ \t\v\f]*#\w.*$/, 'namespace.cpp'],
+                [/[ \t\v\f\r\n]+/, ''],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ]
+        }
+    };
+});
+

+ 60 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/csp/csp.js

@@ -0,0 +1,60 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/csp/csp',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        brackets: [],
+        autoClosingPairs: [],
+        surroundingPairs: []
+    };
+    exports.language = {
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        // defaultToken: 'invalid',
+        keywords: [],
+        typeKeywords: [],
+        tokenPostfix: '.csp',
+        operators: [],
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        tokenizer: {
+            root: [
+                [/child-src/, 'string.quote'],
+                [/connect-src/, 'string.quote'],
+                [/default-src/, 'string.quote'],
+                [/font-src/, 'string.quote'],
+                [/frame-src/, 'string.quote'],
+                [/img-src/, 'string.quote'],
+                [/manifest-src/, 'string.quote'],
+                [/media-src/, 'string.quote'],
+                [/object-src/, 'string.quote'],
+                [/script-src/, 'string.quote'],
+                [/style-src/, 'string.quote'],
+                [/worker-src/, 'string.quote'],
+                [/base-uri/, 'string.quote'],
+                [/plugin-types/, 'string.quote'],
+                [/sandbox/, 'string.quote'],
+                [/disown-opener/, 'string.quote'],
+                [/form-action/, 'string.quote'],
+                [/frame-ancestors/, 'string.quote'],
+                [/report-uri/, 'string.quote'],
+                [/report-to/, 'string.quote'],
+                [/upgrade-insecure-requests/, 'string.quote'],
+                [/block-all-mixed-content/, 'string.quote'],
+                [/require-sri-for/, 'string.quote'],
+                [/reflected-xss/, 'string.quote'],
+                [/referrer/, 'string.quote'],
+                [/policy-uri/, 'string.quote'],
+                [/'self'/, 'string.quote'],
+                [/'unsafe-inline'/, 'string.quote'],
+                [/'unsafe-eval'/, 'string.quote'],
+                [/'strict-dynamic'/, 'string.quote'],
+                [/'unsafe-hashed-attributes'/, 'string.quote']
+            ]
+        }
+    };
+});
+

+ 185 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/css/css.js

@@ -0,0 +1,185 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/css/css',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
+        comments: {
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}', notIn: ['string', 'comment'] },
+            { open: '[', close: ']', notIn: ['string', 'comment'] },
+            { open: '(', close: ')', notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string', 'comment'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/'),
+                end: new RegExp('^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.css',
+        ws: '[ \t\n\r\f]*',
+        identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.bracket' },
+            { open: '[', close: ']', token: 'delimiter.bracket' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        tokenizer: {
+            root: [{ include: '@selector' }],
+            selector: [
+                { include: '@comments' },
+                { include: '@import' },
+                { include: '@strings' },
+                [
+                    '[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)',
+                    { token: 'keyword', next: '@keyframedeclaration' }
+                ],
+                ['[@](page|content|font-face|-moz-document)', { token: 'keyword' }],
+                ['[@](charset|namespace)', { token: 'keyword', next: '@declarationbody' }],
+                [
+                    '(url-prefix)(\\()',
+                    ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]
+                ],
+                [
+                    '(url)(\\()',
+                    ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]
+                ],
+                { include: '@selectorname' },
+                ['[\\*]', 'tag'],
+                ['[>\\+,]', 'delimiter'],
+                ['\\[', { token: 'delimiter.bracket', next: '@selectorattribute' }],
+                ['{', { token: 'delimiter.bracket', next: '@selectorbody' }]
+            ],
+            selectorbody: [
+                { include: '@comments' },
+                ['[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'],
+                ['}', { token: 'delimiter.bracket', next: '@pop' }]
+            ],
+            selectorname: [
+                ['(\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag'] // selector (.foo, div, ...)
+            ],
+            selectorattribute: [{ include: '@term' }, [']', { token: 'delimiter.bracket', next: '@pop' }]],
+            term: [
+                { include: '@comments' },
+                [
+                    '(url-prefix)(\\()',
+                    ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]
+                ],
+                [
+                    '(url)(\\()',
+                    ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]
+                ],
+                { include: '@functioninvocation' },
+                { include: '@numbers' },
+                { include: '@name' },
+                { include: '@strings' },
+                ['([<>=\\+\\-\\*\\/\\^\\|\\~,])', 'delimiter'],
+                [',', 'delimiter']
+            ],
+            rulevalue: [
+                { include: '@comments' },
+                { include: '@strings' },
+                { include: '@term' },
+                ['!important', 'keyword'],
+                [';', 'delimiter', '@pop'],
+                ['(?=})', { token: '', next: '@pop' }] // missing semicolon
+            ],
+            warndebug: [['[@](warn|debug)', { token: 'keyword', next: '@declarationbody' }]],
+            import: [['[@](import)', { token: 'keyword', next: '@declarationbody' }]],
+            urldeclaration: [
+                { include: '@strings' },
+                ['[^)\r\n]+', 'string'],
+                ['\\)', { token: 'delimiter.parenthesis', next: '@pop' }]
+            ],
+            parenthizedterm: [
+                { include: '@term' },
+                ['\\)', { token: 'delimiter.parenthesis', next: '@pop' }]
+            ],
+            declarationbody: [
+                { include: '@term' },
+                [';', 'delimiter', '@pop'],
+                ['(?=})', { token: '', next: '@pop' }] // missing semicolon
+            ],
+            comments: [
+                ['\\/\\*', 'comment', '@comment'],
+                ['\\/\\/+.*', 'comment']
+            ],
+            comment: [
+                ['\\*\\/', 'comment', '@pop'],
+                [/[^*/]+/, 'comment'],
+                [/./, 'comment']
+            ],
+            name: [['@identifier', 'attribute.value']],
+            numbers: [
+                ['-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'attribute.value.number', next: '@units' }],
+                ['#[0-9a-fA-F_]+(?!\\w)', 'attribute.value.hex']
+            ],
+            units: [
+                [
+                    '(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?',
+                    'attribute.value.unit',
+                    '@pop'
+                ]
+            ],
+            keyframedeclaration: [
+                ['@identifier', 'attribute.value'],
+                ['{', { token: 'delimiter.bracket', switchTo: '@keyframebody' }]
+            ],
+            keyframebody: [
+                { include: '@term' },
+                ['{', { token: 'delimiter.bracket', next: '@selectorbody' }],
+                ['}', { token: 'delimiter.bracket', next: '@pop' }]
+            ],
+            functioninvocation: [
+                ['@identifier\\(', { token: 'attribute.value', next: '@functionarguments' }]
+            ],
+            functionarguments: [
+                ['\\$@identifier@ws:', 'attribute.name'],
+                ['[,]', 'delimiter'],
+                { include: '@term' },
+                ['\\)', { token: 'attribute.value', next: '@pop' }]
+            ],
+            strings: [
+                ['~?"', { token: 'string', next: '@stringenddoublequote' }],
+                ["~?'", { token: 'string', next: '@stringendquote' }]
+            ],
+            stringenddoublequote: [
+                ['\\\\.', 'string'],
+                ['"', { token: 'string', next: '@pop' }],
+                [/[^\\"]+/, 'string'],
+                ['.', 'string']
+            ],
+            stringendquote: [
+                ['\\\\.', 'string'],
+                ["'", { token: 'string', next: '@pop' }],
+                [/[^\\']+/, 'string'],
+                ['.', 'string']
+            ]
+        }
+    };
+});
+

+ 285 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/dart/dart.js

@@ -0,0 +1,285 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/dart/dart',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: '`', close: '`', notIn: ['string', 'comment'] },
+            { open: '/**', close: ' */', notIn: ['string'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: '`', close: '`' }
+        ],
+        folding: {
+            markers: {
+                start: /^\s*\s*#?region\b/,
+                end: /^\s*\s*#?endregion\b/
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: 'invalid',
+        tokenPostfix: '.dart',
+        keywords: [
+            'abstract',
+            'dynamic',
+            'implements',
+            'show',
+            'as',
+            'else',
+            'import',
+            'static',
+            'assert',
+            'enum',
+            'in',
+            'super',
+            'async',
+            'export',
+            'interface',
+            'switch',
+            'await',
+            'extends',
+            'is',
+            'sync',
+            'break',
+            'external',
+            'library',
+            'this',
+            'case',
+            'factory',
+            'mixin',
+            'throw',
+            'catch',
+            'false',
+            'new',
+            'true',
+            'class',
+            'final',
+            'null',
+            'try',
+            'const',
+            'finally',
+            'on',
+            'typedef',
+            'continue',
+            'for',
+            'operator',
+            'var',
+            'covariant',
+            'Function',
+            'part',
+            'void',
+            'default',
+            'get',
+            'rethrow',
+            'while',
+            'deferred',
+            'hide',
+            'return',
+            'with',
+            'do',
+            'if',
+            'set',
+            'yield'
+        ],
+        typeKeywords: ['int', 'double', 'String', 'bool'],
+        operators: [
+            '+',
+            '-',
+            '*',
+            '/',
+            '~/',
+            '%',
+            '++',
+            '--',
+            '==',
+            '!=',
+            '>',
+            '<',
+            '>=',
+            '<=',
+            '=',
+            '-=',
+            '/=',
+            '%=',
+            '>>=',
+            '^=',
+            '+=',
+            '*=',
+            '~/=',
+            '<<=',
+            '&=',
+            '!=',
+            '||',
+            '&&',
+            '&',
+            '|',
+            '^',
+            '~',
+            '<<',
+            '>>',
+            '!',
+            '>>>',
+            '??',
+            '?',
+            ':',
+            '|='
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        digits: /\d+(_+\d+)*/,
+        octaldigits: /[0-7]+(_+[0-7]+)*/,
+        binarydigits: /[0-1]+(_+[0-1]+)*/,
+        hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
+        regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
+        regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [[/[{}]/, 'delimiter.bracket'], { include: 'common' }],
+            common: [
+                // identifiers and keywords
+                [
+                    /[a-z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@typeKeywords': 'type.identifier',
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/[A-Z_$][\w\$]*/, 'type.identifier'],
+                // [/[A-Z][\w\$]*/, 'identifier'],
+                // whitespace
+                { include: '@whitespace' },
+                // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
+                [
+                    /\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
+                    { token: 'regexp', bracket: '@open', next: '@regexp' }
+                ],
+                // @ annotations.
+                [/@[a-zA-Z]+/, 'annotation'],
+                // variable
+                // delimiters and operators
+                [/[()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [/!(?=([^=]|$))/, 'delimiter'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
+                [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
+                [/0[xX](@hexdigits)n?/, 'number.hex'],
+                [/0[oO]?(@octaldigits)n?/, 'number.octal'],
+                [/0[bB](@binarydigits)n?/, 'number.binary'],
+                [/(@digits)n?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string_double'],
+                [/'/, 'string', '@string_single']
+                //   [/[a-zA-Z]+/, "variable"]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/\/.*$/, 'comment.doc'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            jsdoc: [
+                [/[^\/*]+/, 'comment.doc'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            // We match regular expression quite precisely
+            regexp: [
+                [
+                    /(\{)(\d+(?:,\d*)?)(\})/,
+                    ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']
+                ],
+                [
+                    /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
+                    ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]
+                ],
+                [/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
+                [/[()]/, 'regexp.escape.control'],
+                [/@regexpctl/, 'regexp.escape.control'],
+                [/[^\\\/]/, 'regexp'],
+                [/@regexpesc/, 'regexp.escape'],
+                [/\\\./, 'regexp.invalid'],
+                [/(\/)([gimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']]
+            ],
+            regexrange: [
+                [/-/, 'regexp.escape.control'],
+                [/\^/, 'regexp.invalid'],
+                [/@regexpesc/, 'regexp.escape'],
+                [/[^\]]/, 'regexp'],
+                [
+                    /\]/,
+                    {
+                        token: 'regexp.escape.control',
+                        next: '@pop',
+                        bracket: '@close'
+                    }
+                ]
+            ],
+            string_double: [
+                [/[^\\"\$]+/, 'string'],
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop'],
+                [/\$\w+/, 'identifier']
+            ],
+            string_single: [
+                [/[^\\'\$]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, 'string', '@pop'],
+                [/\$\w+/, 'identifier']
+            ]
+        }
+    };
+});
+

+ 135 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/dockerfile/dockerfile.js

@@ -0,0 +1,135 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/dockerfile/dockerfile',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.dockerfile',
+        variable: /\${?[\w]+}?/,
+        tokenizer: {
+            root: [
+                { include: '@whitespace' },
+                { include: '@comment' },
+                [/(ONBUILD)(\s+)/, ['keyword', '']],
+                [/(ENV)(\s+)([\w]+)/, ['keyword', '', { token: 'variable', next: '@arguments' }]],
+                [
+                    /(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,
+                    { token: 'keyword', next: '@arguments' }
+                ]
+            ],
+            arguments: [
+                { include: '@whitespace' },
+                { include: '@strings' },
+                [
+                    /(@variable)/,
+                    {
+                        cases: {
+                            '@eos': { token: 'variable', next: '@popall' },
+                            '@default': 'variable'
+                        }
+                    }
+                ],
+                [
+                    /\\/,
+                    {
+                        cases: {
+                            '@eos': '',
+                            '@default': ''
+                        }
+                    }
+                ],
+                [
+                    /./,
+                    {
+                        cases: {
+                            '@eos': { token: '', next: '@popall' },
+                            '@default': ''
+                        }
+                    }
+                ]
+            ],
+            // Deal with white space, including comments
+            whitespace: [
+                [
+                    /\s+/,
+                    {
+                        cases: {
+                            '@eos': { token: '', next: '@popall' },
+                            '@default': ''
+                        }
+                    }
+                ]
+            ],
+            comment: [[/(^#.*$)/, 'comment', '@popall']],
+            // Recognize strings, including those broken across lines with \ (but not without)
+            strings: [
+                [/\\'$/, '', '@popall'],
+                [/\\'/, ''],
+                [/'$/, 'string', '@popall'],
+                [/'/, 'string', '@stringBody'],
+                [/"$/, 'string', '@popall'],
+                [/"/, 'string', '@dblStringBody']
+            ],
+            stringBody: [
+                [
+                    /[^\\\$']/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string', next: '@popall' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/\\./, 'string.escape'],
+                [/'$/, 'string', '@popall'],
+                [/'/, 'string', '@pop'],
+                [/(@variable)/, 'variable'],
+                [/\\$/, 'string'],
+                [/$/, 'string', '@popall']
+            ],
+            dblStringBody: [
+                [
+                    /[^\\\$"]/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string', next: '@popall' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/\\./, 'string.escape'],
+                [/"$/, 'string', '@popall'],
+                [/"/, 'string', '@pop'],
+                [/(@variable)/, 'variable'],
+                [/\\$/, 'string'],
+                [/$/, 'string', '@popall']
+            ]
+        }
+    };
+});
+

+ 462 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/ecl/ecl.js

@@ -0,0 +1,462 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/ecl/ecl',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" },
+            { open: '"', close: '"' }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.ecl',
+        ignoreCase: true,
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        pounds: [
+            'append',
+            'break',
+            'declare',
+            'demangle',
+            'end',
+            'for',
+            'getdatatype',
+            'if',
+            'inmodule',
+            'loop',
+            'mangle',
+            'onwarning',
+            'option',
+            'set',
+            'stored',
+            'uniquename'
+        ].join('|'),
+        keywords: [
+            '__compressed__',
+            'after',
+            'all',
+            'and',
+            'any',
+            'as',
+            'atmost',
+            'before',
+            'beginc',
+            'best',
+            'between',
+            'case',
+            'cluster',
+            'compressed',
+            'compression',
+            'const',
+            'counter',
+            'csv',
+            'default',
+            'descend',
+            'embed',
+            'encoding',
+            'encrypt',
+            'end',
+            'endc',
+            'endembed',
+            'endmacro',
+            'enum',
+            'escape',
+            'except',
+            'exclusive',
+            'expire',
+            'export',
+            'extend',
+            'fail',
+            'few',
+            'fileposition',
+            'first',
+            'flat',
+            'forward',
+            'from',
+            'full',
+            'function',
+            'functionmacro',
+            'group',
+            'grouped',
+            'heading',
+            'hole',
+            'ifblock',
+            'import',
+            'in',
+            'inner',
+            'interface',
+            'internal',
+            'joined',
+            'keep',
+            'keyed',
+            'last',
+            'left',
+            'limit',
+            'linkcounted',
+            'literal',
+            'little_endian',
+            'load',
+            'local',
+            'locale',
+            'lookup',
+            'lzw',
+            'macro',
+            'many',
+            'maxcount',
+            'maxlength',
+            'min skew',
+            'module',
+            'mofn',
+            'multiple',
+            'named',
+            'namespace',
+            'nocase',
+            'noroot',
+            'noscan',
+            'nosort',
+            'not',
+            'noxpath',
+            'of',
+            'onfail',
+            'only',
+            'opt',
+            'or',
+            'outer',
+            'overwrite',
+            'packed',
+            'partition',
+            'penalty',
+            'physicallength',
+            'pipe',
+            'prefetch',
+            'quote',
+            'record',
+            'repeat',
+            'retry',
+            'return',
+            'right',
+            'right1',
+            'right2',
+            'rows',
+            'rowset',
+            'scan',
+            'scope',
+            'self',
+            'separator',
+            'service',
+            'shared',
+            'skew',
+            'skip',
+            'smart',
+            'soapaction',
+            'sql',
+            'stable',
+            'store',
+            'terminator',
+            'thor',
+            'threshold',
+            'timelimit',
+            'timeout',
+            'token',
+            'transform',
+            'trim',
+            'type',
+            'unicodeorder',
+            'unordered',
+            'unsorted',
+            'unstable',
+            'update',
+            'use',
+            'validate',
+            'virtual',
+            'whole',
+            'width',
+            'wild',
+            'within',
+            'wnotrim',
+            'xml',
+            'xpath'
+        ],
+        functions: [
+            'abs',
+            'acos',
+            'aggregate',
+            'allnodes',
+            'apply',
+            'ascii',
+            'asin',
+            'assert',
+            'asstring',
+            'atan',
+            'atan2',
+            'ave',
+            'build',
+            'buildindex',
+            'case',
+            'catch',
+            'choose',
+            'choosen',
+            'choosesets',
+            'clustersize',
+            'combine',
+            'correlation',
+            'cos',
+            'cosh',
+            'count',
+            'covariance',
+            'cron',
+            'dataset',
+            'dedup',
+            'define',
+            'denormalize',
+            'dictionary',
+            'distribute',
+            'distributed',
+            'distribution',
+            'ebcdic',
+            'enth',
+            'error',
+            'evaluate',
+            'event',
+            'eventextra',
+            'eventname',
+            'exists',
+            'exp',
+            'fail',
+            'failcode',
+            'failmessage',
+            'fetch',
+            'fromunicode',
+            'fromxml',
+            'getenv',
+            'getisvalid',
+            'global',
+            'graph',
+            'group',
+            'hash',
+            'hash32',
+            'hash64',
+            'hashcrc',
+            'hashmd5',
+            'having',
+            'httpcall',
+            'httpheader',
+            'if',
+            'iff',
+            'index',
+            'intformat',
+            'isvalid',
+            'iterate',
+            'join',
+            'keydiff',
+            'keypatch',
+            'keyunicode',
+            'length',
+            'library',
+            'limit',
+            'ln',
+            'loadxml',
+            'local',
+            'log',
+            'loop',
+            'map',
+            'matched',
+            'matchlength',
+            'matchposition',
+            'matchtext',
+            'matchunicode',
+            'max',
+            'merge',
+            'mergejoin',
+            'min',
+            'nofold',
+            'nolocal',
+            'nonempty',
+            'normalize',
+            'nothor',
+            'notify',
+            'output',
+            'parallel',
+            'parse',
+            'pipe',
+            'power',
+            'preload',
+            'process',
+            'project',
+            'pull',
+            'random',
+            'range',
+            'rank',
+            'ranked',
+            'realformat',
+            'recordof',
+            'regexfind',
+            'regexreplace',
+            'regroup',
+            'rejected',
+            'rollup',
+            'round',
+            'roundup',
+            'row',
+            'rowdiff',
+            'sample',
+            'sequential',
+            'set',
+            'sin',
+            'sinh',
+            'sizeof',
+            'soapcall',
+            'sort',
+            'sorted',
+            'sqrt',
+            'stepped',
+            'stored',
+            'sum',
+            'table',
+            'tan',
+            'tanh',
+            'thisnode',
+            'topn',
+            'tounicode',
+            'toxml',
+            'transfer',
+            'transform',
+            'trim',
+            'truncate',
+            'typeof',
+            'ungroup',
+            'unicodeorder',
+            'variance',
+            'wait',
+            'which',
+            'workunit',
+            'xmldecode',
+            'xmlencode',
+            'xmltext',
+            'xmlunicode'
+        ],
+        typesint: ['integer', 'unsigned'].join('|'),
+        typesnum: ['data', 'qstring', 'string', 'unicode', 'utf8', 'varstring', 'varunicode'],
+        typesone: [
+            'ascii',
+            'big_endian',
+            'boolean',
+            'data',
+            'decimal',
+            'ebcdic',
+            'grouped',
+            'integer',
+            'linkcounted',
+            'pattern',
+            'qstring',
+            'real',
+            'record',
+            'rule',
+            'set of',
+            'streamed',
+            'string',
+            'token',
+            'udecimal',
+            'unicode',
+            'unsigned',
+            'utf8',
+            'varstring',
+            'varunicode'
+        ].join('|'),
+        operators: ['+', '-', '/', ':=', '<', '<>', '=', '>', '\\', 'and', 'in', 'not', 'or'],
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        // escape sequences
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                [/@typesint[4|8]/, 'type'],
+                [/#(@pounds)/, 'type'],
+                [/@typesone/, 'type'],
+                [
+                    /[a-zA-Z_$][\w-$]*/,
+                    {
+                        cases: {
+                            '@functions': 'keyword.function',
+                            '@keywords': 'keyword',
+                            '@operators': 'operator'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F_]+/, 'number.hex'],
+                [/0[bB][01]+/, 'number.hex'],
+                [/[0-9_]+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\v\f\r\n]+/, ''],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            string: [
+                [/[^\\']+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, 'string', '@pop']
+            ]
+        }
+    };
+});
+

+ 562 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/elixir/elixir.js

@@ -0,0 +1,562 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/elixir/elixir',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: "'", close: "'" },
+            { open: '"', close: '"' }
+        ],
+        autoClosingPairs: [
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['comment'] },
+            { open: '"""', close: '"""' },
+            { open: '`', close: '`', notIn: ['string', 'comment'] },
+            { open: '(', close: ')' },
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '<<', close: '>>' }
+        ],
+        indentationRules: {
+            increaseIndentPattern: /^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,
+            decreaseIndentPattern: /^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/
+        }
+    };
+    /**
+     * A Monarch lexer for the Elixir language.
+     *
+     * References:
+     *
+     * * Monarch documentation - https://microsoft.github.io/monaco-editor/monarch.html
+     * * Elixir lexer - https://github.com/elixir-makeup/makeup_elixir/blob/master/lib/makeup/lexers/elixir_lexer.ex
+     * * TextMate lexer (elixir-tmbundle) - https://github.com/elixir-editors/elixir-tmbundle/blob/master/Syntaxes/Elixir.tmLanguage
+     * * TextMate lexer (vscode-elixir-ls) - https://github.com/elixir-lsp/vscode-elixir-ls/blob/master/syntaxes/elixir.json
+     */
+    exports.language = {
+        defaultToken: 'source',
+        tokenPostfix: '.elixir',
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '<<', close: '>>', token: 'delimiter.angle.special' }
+        ],
+        // Below are lists/regexps to which we reference later.
+        declarationKeywords: [
+            'def',
+            'defp',
+            'defn',
+            'defnp',
+            'defguard',
+            'defguardp',
+            'defmacro',
+            'defmacrop',
+            'defdelegate',
+            'defcallback',
+            'defmacrocallback',
+            'defmodule',
+            'defprotocol',
+            'defexception',
+            'defimpl',
+            'defstruct'
+        ],
+        operatorKeywords: ['and', 'in', 'not', 'or', 'when'],
+        namespaceKeywords: ['alias', 'import', 'require', 'use'],
+        otherKeywords: [
+            'after',
+            'case',
+            'catch',
+            'cond',
+            'do',
+            'else',
+            'end',
+            'fn',
+            'for',
+            'if',
+            'quote',
+            'raise',
+            'receive',
+            'rescue',
+            'super',
+            'throw',
+            'try',
+            'unless',
+            'unquote_splicing',
+            'unquote',
+            'with'
+        ],
+        constants: ['true', 'false', 'nil'],
+        nameBuiltin: ['__MODULE__', '__DIR__', '__ENV__', '__CALLER__', '__STACKTRACE__'],
+        // Matches any of the operator names:
+        // <<< >>> ||| &&& ^^^ ~~~ === !== ~>> <~> |~> <|> == != <= >= && || \\ <> ++ -- |> =~ -> <- ~> <~ :: .. = < > + - * / | . ^ & !
+        operator: /-[->]?|!={0,2}|\*|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,
+        // See https://hexdocs.pm/elixir/syntax-reference.html#variables
+        variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/,
+        // See https://hexdocs.pm/elixir/syntax-reference.html#atoms
+        atomName: /[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,
+        specialAtomName: /\.\.\.|<<>>|%\{\}|%|\{\}/,
+        aliasPart: /[A-Z][a-zA-Z0-9_]*/,
+        moduleName: /@aliasPart(?:\.@aliasPart)*/,
+        // Sigil pairs are: """ """, ''' ''', " ", ' ', / /, | |, < >, { }, [ ], ( )
+        sigilSymmetricDelimiter: /"""|'''|"|'|\/|\|/,
+        sigilStartDelimiter: /@sigilSymmetricDelimiter|<|\{|\[|\(/,
+        sigilEndDelimiter: /@sigilSymmetricDelimiter|>|\}|\]|\)/,
+        decimal: /\d(?:_?\d)*/,
+        hex: /[0-9a-fA-F](_?[0-9a-fA-F])*/,
+        octal: /[0-7](_?[0-7])*/,
+        binary: /[01](_?[01])*/,
+        // See https://hexdocs.pm/elixir/master/String.html#module-escape-characters
+        escape: /\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,
+        // The keys below correspond to tokenizer states.
+        // We start from the root state and match against its rules
+        // until we explicitly transition into another state.
+        // The `include` simply brings in all operations from the given state
+        // and is useful for improving readability.
+        tokenizer: {
+            root: [
+                { include: '@whitespace' },
+                { include: '@comments' },
+                // Keywords start as either an identifier or a string,
+                // but end with a : so it's important to match this first.
+                { include: '@keywordsShorthand' },
+                { include: '@numbers' },
+                { include: '@identifiers' },
+                { include: '@strings' },
+                { include: '@atoms' },
+                { include: '@sigils' },
+                { include: '@attributes' },
+                { include: '@symbols' }
+            ],
+            // Whitespace
+            whitespace: [[/\s+/, 'white']],
+            // Comments
+            comments: [[/(#)(.*)/, ['comment.punctuation', 'comment']]],
+            // Keyword list shorthand
+            keywordsShorthand: [
+                [/(@atomName)(:)/, ['constant', 'constant.punctuation']],
+                // Use positive look-ahead to ensure the string is followed by :
+                // and should be considered a keyword.
+                [
+                    /"(?=([^"]|#\{.*?\}|\\")*":)/,
+                    { token: 'constant.delimiter', next: '@doubleQuotedStringKeyword' }
+                ],
+                [
+                    /'(?=([^']|#\{.*?\}|\\')*':)/,
+                    { token: 'constant.delimiter', next: '@singleQuotedStringKeyword' }
+                ]
+            ],
+            doubleQuotedStringKeyword: [
+                [/":/, { token: 'constant.delimiter', next: '@pop' }],
+                { include: '@stringConstantContentInterpol' }
+            ],
+            singleQuotedStringKeyword: [
+                [/':/, { token: 'constant.delimiter', next: '@pop' }],
+                { include: '@stringConstantContentInterpol' }
+            ],
+            // Numbers
+            numbers: [
+                [/0b@binary/, 'number.binary'],
+                [/0o@octal/, 'number.octal'],
+                [/0x@hex/, 'number.hex'],
+                [/@decimal\.@decimal([eE]-?@decimal)?/, 'number.float'],
+                [/@decimal/, 'number']
+            ],
+            // Identifiers
+            identifiers: [
+                // Tokenize identifier name in function-like definitions.
+                // Note: given `def a + b, do: nil`, `a` is not a function name,
+                // so we use negative look-ahead to ensure there's no operator.
+                [
+                    /\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,
+                    [
+                        'keyword.declaration',
+                        'white',
+                        {
+                            cases: {
+                                unquote: 'keyword',
+                                '@default': 'function'
+                            }
+                        }
+                    ]
+                ],
+                // Tokenize function calls
+                [
+                    // In-scope call - an identifier followed by ( or .(
+                    /(@variableName)(?=\s*\.?\s*\()/,
+                    {
+                        cases: {
+                            // Tokenize as keyword in cases like `if(..., do: ..., else: ...)`
+                            '@declarationKeywords': 'keyword.declaration',
+                            '@namespaceKeywords': 'keyword',
+                            '@otherKeywords': 'keyword',
+                            '@default': 'function.call'
+                        }
+                    }
+                ],
+                [
+                    // Referencing function in a module
+                    /(@moduleName)(\s*)(\.)(\s*)(@variableName)/,
+                    ['type.identifier', 'white', 'operator', 'white', 'function.call']
+                ],
+                [
+                    // Referencing function in an Erlang module
+                    /(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,
+                    ['constant.punctuation', 'constant', 'white', 'operator', 'white', 'function.call']
+                ],
+                [
+                    // Piping into a function (tokenized separately as it may not have parentheses)
+                    /(\|>)(\s*)(@variableName)/,
+                    [
+                        'operator',
+                        'white',
+                        {
+                            cases: {
+                                '@otherKeywords': 'keyword',
+                                '@default': 'function.call'
+                            }
+                        }
+                    ]
+                ],
+                [
+                    // Function reference passed to another function
+                    /(&)(\s*)(@variableName)/,
+                    ['operator', 'white', 'function.call']
+                ],
+                // Language keywords, builtins, constants and variables
+                [
+                    /@variableName/,
+                    {
+                        cases: {
+                            '@declarationKeywords': 'keyword.declaration',
+                            '@operatorKeywords': 'keyword.operator',
+                            '@namespaceKeywords': 'keyword',
+                            '@otherKeywords': 'keyword',
+                            '@constants': 'constant.language',
+                            '@nameBuiltin': 'variable.language',
+                            '_.*': 'comment.unused',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // Module names
+                [/@moduleName/, 'type.identifier']
+            ],
+            // Strings
+            strings: [
+                [/"""/, { token: 'string.delimiter', next: '@doubleQuotedHeredoc' }],
+                [/'''/, { token: 'string.delimiter', next: '@singleQuotedHeredoc' }],
+                [/"/, { token: 'string.delimiter', next: '@doubleQuotedString' }],
+                [/'/, { token: 'string.delimiter', next: '@singleQuotedString' }]
+            ],
+            doubleQuotedHeredoc: [
+                [/"""/, { token: 'string.delimiter', next: '@pop' }],
+                { include: '@stringContentInterpol' }
+            ],
+            singleQuotedHeredoc: [
+                [/'''/, { token: 'string.delimiter', next: '@pop' }],
+                { include: '@stringContentInterpol' }
+            ],
+            doubleQuotedString: [
+                [/"/, { token: 'string.delimiter', next: '@pop' }],
+                { include: '@stringContentInterpol' }
+            ],
+            singleQuotedString: [
+                [/'/, { token: 'string.delimiter', next: '@pop' }],
+                { include: '@stringContentInterpol' }
+            ],
+            // Atoms
+            atoms: [
+                [/(:)(@atomName)/, ['constant.punctuation', 'constant']],
+                [/:"/, { token: 'constant.delimiter', next: '@doubleQuotedStringAtom' }],
+                [/:'/, { token: 'constant.delimiter', next: '@singleQuotedStringAtom' }]
+            ],
+            doubleQuotedStringAtom: [
+                [/"/, { token: 'constant.delimiter', next: '@pop' }],
+                { include: '@stringConstantContentInterpol' }
+            ],
+            singleQuotedStringAtom: [
+                [/'/, { token: 'constant.delimiter', next: '@pop' }],
+                { include: '@stringConstantContentInterpol' }
+            ],
+            // Sigils
+            // See https://elixir-lang.org/getting-started/sigils.html
+            // Sigils allow for typing values using their textual representation.
+            // All sigils start with ~ followed by a letter indicating sigil type
+            // and then a delimiter pair enclosing the textual representation.
+            // Optional modifiers are allowed after the closing delimiter.
+            // For instance a regular expressions can be written as:
+            // ~r/foo|bar/ ~r{foo|bar} ~r/foo|bar/g
+            //
+            // In general lowercase sigils allow for interpolation
+            // and escaped characters, whereas uppercase sigils don't
+            //
+            // During tokenization we want to distinguish some
+            // specific sigil types, namely string and regexp,
+            // so that they cen be themed separately.
+            //
+            // To reasonably handle all those combinations we leverage
+            // dot-separated states, so if we transition to @sigilStart.interpol.s.{.}
+            // then "sigilStart.interpol.s" state will match and also all
+            // the individual dot-separated parameters can be accessed.
+            sigils: [
+                [/~[a-z]@sigilStartDelimiter/, { token: '@rematch', next: '@sigil.interpol' }],
+                [/~[A-Z]@sigilStartDelimiter/, { token: '@rematch', next: '@sigil.noInterpol' }]
+            ],
+            sigil: [
+                [/~([a-zA-Z])\{/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.{.}' }],
+                [/~([a-zA-Z])\[/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.[.]' }],
+                [/~([a-zA-Z])\(/, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.(.)' }],
+                [/~([a-zA-Z])\</, { token: '@rematch', switchTo: '@sigilStart.$S2.$1.<.>' }],
+                [
+                    /~([a-zA-Z])(@sigilSymmetricDelimiter)/,
+                    { token: '@rematch', switchTo: '@sigilStart.$S2.$1.$2.$2' }
+                ]
+            ],
+            // The definitions below expect states to be of the form:
+            //
+            // sigilStart.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
+            // sigilContinue.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
+            //
+            // The sigilStart state is used only to properly classify the token (as string/regex/sigil)
+            // and immediately switches to the sigilContinue sate, which handles the actual content
+            // and waits for the corresponding end delimiter.
+            'sigilStart.interpol.s': [
+                [
+                    /~s@sigilStartDelimiter/,
+                    {
+                        token: 'string.delimiter',
+                        switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
+                    }
+                ]
+            ],
+            'sigilContinue.interpol.s': [
+                [
+                    /(@sigilEndDelimiter)[a-zA-Z]*/,
+                    {
+                        cases: {
+                            '$1==$S5': { token: 'string.delimiter', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                { include: '@stringContentInterpol' }
+            ],
+            'sigilStart.noInterpol.S': [
+                [
+                    /~S@sigilStartDelimiter/,
+                    {
+                        token: 'string.delimiter',
+                        switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
+                    }
+                ]
+            ],
+            'sigilContinue.noInterpol.S': [
+                // Ignore escaped sigil end
+                [/(^|[^\\])\\@sigilEndDelimiter/, 'string'],
+                [
+                    /(@sigilEndDelimiter)[a-zA-Z]*/,
+                    {
+                        cases: {
+                            '$1==$S5': { token: 'string.delimiter', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                { include: '@stringContent' }
+            ],
+            'sigilStart.interpol.r': [
+                [
+                    /~r@sigilStartDelimiter/,
+                    {
+                        token: 'regexp.delimiter',
+                        switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
+                    }
+                ]
+            ],
+            'sigilContinue.interpol.r': [
+                [
+                    /(@sigilEndDelimiter)[a-zA-Z]*/,
+                    {
+                        cases: {
+                            '$1==$S5': { token: 'regexp.delimiter', next: '@pop' },
+                            '@default': 'regexp'
+                        }
+                    }
+                ],
+                { include: '@regexpContentInterpol' }
+            ],
+            'sigilStart.noInterpol.R': [
+                [
+                    /~R@sigilStartDelimiter/,
+                    {
+                        token: 'regexp.delimiter',
+                        switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
+                    }
+                ]
+            ],
+            'sigilContinue.noInterpol.R': [
+                // Ignore escaped sigil end
+                [/(^|[^\\])\\@sigilEndDelimiter/, 'regexp'],
+                [
+                    /(@sigilEndDelimiter)[a-zA-Z]*/,
+                    {
+                        cases: {
+                            '$1==$S5': { token: 'regexp.delimiter', next: '@pop' },
+                            '@default': 'regexp'
+                        }
+                    }
+                ],
+                { include: '@regexpContent' }
+            ],
+            // Fallback to the generic sigil by default
+            'sigilStart.interpol': [
+                [
+                    /~([a-zA-Z])@sigilStartDelimiter/,
+                    {
+                        token: 'sigil.delimiter',
+                        switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
+                    }
+                ]
+            ],
+            'sigilContinue.interpol': [
+                [
+                    /(@sigilEndDelimiter)[a-zA-Z]*/,
+                    {
+                        cases: {
+                            '$1==$S5': { token: 'sigil.delimiter', next: '@pop' },
+                            '@default': 'sigil'
+                        }
+                    }
+                ],
+                { include: '@sigilContentInterpol' }
+            ],
+            'sigilStart.noInterpol': [
+                [
+                    /~([a-zA-Z])@sigilStartDelimiter/,
+                    {
+                        token: 'sigil.delimiter',
+                        switchTo: '@sigilContinue.$S2.$S3.$S4.$S5'
+                    }
+                ]
+            ],
+            'sigilContinue.noInterpol': [
+                // Ignore escaped sigil end
+                [/(^|[^\\])\\@sigilEndDelimiter/, 'sigil'],
+                [
+                    /(@sigilEndDelimiter)[a-zA-Z]*/,
+                    {
+                        cases: {
+                            '$1==$S5': { token: 'sigil.delimiter', next: '@pop' },
+                            '@default': 'sigil'
+                        }
+                    }
+                ],
+                { include: '@sigilContent' }
+            ],
+            // Attributes
+            attributes: [
+                // Module @doc* attributes - tokenized as comments
+                [
+                    /\@(module|type)?doc (~[sS])?"""/,
+                    {
+                        token: 'comment.block.documentation',
+                        next: '@doubleQuotedHeredocDocstring'
+                    }
+                ],
+                [
+                    /\@(module|type)?doc (~[sS])?"/,
+                    {
+                        token: 'comment.block.documentation',
+                        next: '@doubleQuotedStringDocstring'
+                    }
+                ],
+                [/\@(module|type)?doc false/, 'comment.block.documentation'],
+                // Module attributes
+                [/\@(@variableName)/, 'variable']
+            ],
+            doubleQuotedHeredocDocstring: [
+                [/"""/, { token: 'comment.block.documentation', next: '@pop' }],
+                { include: '@docstringContent' }
+            ],
+            doubleQuotedStringDocstring: [
+                [/"/, { token: 'comment.block.documentation', next: '@pop' }],
+                { include: '@docstringContent' }
+            ],
+            // Operators, punctuation, brackets
+            symbols: [
+                // Code point operator (either with regular character ?a or an escaped one ?\n)
+                [/\?(\\.|[^\\\s])/, 'number.constant'],
+                // Anonymous function arguments
+                [/&\d+/, 'operator'],
+                // Bitshift operators (must go before delimiters, so that << >> don't match first)
+                [/<<<|>>>/, 'operator'],
+                // Delimiter pairs
+                [/[()\[\]\{\}]|<<|>>/, '@brackets'],
+                // Triple dot is a valid name (must go before operators, so that .. doesn't match instead)
+                [/\.\.\./, 'identifier'],
+                // Punctuation => (must go before operators, so it's not tokenized as = then >)
+                [/=>/, 'punctuation'],
+                // Operators
+                [/@operator/, 'operator'],
+                // Punctuation
+                [/[:;,.%]/, 'punctuation']
+            ],
+            // Generic helpers
+            stringContentInterpol: [
+                { include: '@interpolation' },
+                { include: '@escapeChar' },
+                { include: '@stringContent' }
+            ],
+            stringContent: [[/./, 'string']],
+            stringConstantContentInterpol: [
+                { include: '@interpolation' },
+                { include: '@escapeChar' },
+                { include: '@stringConstantContent' }
+            ],
+            stringConstantContent: [[/./, 'constant']],
+            regexpContentInterpol: [
+                { include: '@interpolation' },
+                { include: '@escapeChar' },
+                { include: '@regexpContent' }
+            ],
+            regexpContent: [
+                // # may be a regular regexp char, so we use a heuristic
+                // assuming a # surrounded by whitespace is actually a comment.
+                [/(\s)(#)(\s.*)$/, ['white', 'comment.punctuation', 'comment']],
+                [/./, 'regexp']
+            ],
+            sigilContentInterpol: [
+                { include: '@interpolation' },
+                { include: '@escapeChar' },
+                { include: '@sigilContent' }
+            ],
+            sigilContent: [[/./, 'sigil']],
+            docstringContent: [[/./, 'comment.block.documentation']],
+            escapeChar: [[/@escape/, 'constant.character.escape']],
+            interpolation: [[/#{/, { token: 'delimiter.bracket.embed', next: '@interpolationContinue' }]],
+            interpolationContinue: [
+                [/}/, { token: 'delimiter.bracket.embed', next: '@pop' }],
+                // Interpolation brackets may contain arbitrary code,
+                // so we simply match against all the root rules,
+                // until we reach interpolation end (the above matches).
+                { include: '@root' }
+            ]
+        }
+    };
+});
+

+ 149 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/flow9/flow9.js

@@ -0,0 +1,149 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/flow9/flow9',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            blockComment: ['/*', '*/'],
+            lineComment: '//'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}', notIn: ['string'] },
+            { open: '[', close: ']', notIn: ['string'] },
+            { open: '(', close: ')', notIn: ['string'] },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '<', close: '>' }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.flow',
+        keywords: [
+            'import',
+            'require',
+            'export',
+            'forbid',
+            'native',
+            'if',
+            'else',
+            'cast',
+            'unsafe',
+            'switch',
+            'default'
+        ],
+        types: [
+            'io',
+            'mutable',
+            'bool',
+            'int',
+            'double',
+            'string',
+            'flow',
+            'void',
+            'ref',
+            'true',
+            'false',
+            'with'
+        ],
+        operators: [
+            '=',
+            '>',
+            '<',
+            '<=',
+            '>=',
+            '==',
+            '!',
+            '!=',
+            ':=',
+            '::=',
+            '&&',
+            '||',
+            '+',
+            '-',
+            '*',
+            '/',
+            '@',
+            '&',
+            '%',
+            ':',
+            '->',
+            '\\',
+            '$',
+            '??',
+            '^'
+        ],
+        symbols: /[@$=><!~?:&|+\-*\\\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@types': 'type',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, 'delimiter'],
+                [/[<>](?!@symbols)/, 'delimiter'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop']
+            ]
+        }
+    };
+});
+

+ 223 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/fsharp/fsharp.js

@@ -0,0 +1,223 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/fsharp/fsharp',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['(*', '*)']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)'),
+                end: new RegExp('^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.fs',
+        keywords: [
+            'abstract',
+            'and',
+            'atomic',
+            'as',
+            'assert',
+            'asr',
+            'base',
+            'begin',
+            'break',
+            'checked',
+            'component',
+            'const',
+            'constraint',
+            'constructor',
+            'continue',
+            'class',
+            'default',
+            'delegate',
+            'do',
+            'done',
+            'downcast',
+            'downto',
+            'elif',
+            'else',
+            'end',
+            'exception',
+            'eager',
+            'event',
+            'external',
+            'extern',
+            'false',
+            'finally',
+            'for',
+            'fun',
+            'function',
+            'fixed',
+            'functor',
+            'global',
+            'if',
+            'in',
+            'include',
+            'inherit',
+            'inline',
+            'interface',
+            'internal',
+            'land',
+            'lor',
+            'lsl',
+            'lsr',
+            'lxor',
+            'lazy',
+            'let',
+            'match',
+            'member',
+            'mod',
+            'module',
+            'mutable',
+            'namespace',
+            'method',
+            'mixin',
+            'new',
+            'not',
+            'null',
+            'of',
+            'open',
+            'or',
+            'object',
+            'override',
+            'private',
+            'parallel',
+            'process',
+            'protected',
+            'pure',
+            'public',
+            'rec',
+            'return',
+            'static',
+            'sealed',
+            'struct',
+            'sig',
+            'then',
+            'to',
+            'true',
+            'tailcall',
+            'trait',
+            'try',
+            'type',
+            'upcast',
+            'use',
+            'val',
+            'void',
+            'virtual',
+            'volatile',
+            'when',
+            'while',
+            'with',
+            'yield'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\^%;\.,\/]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        integersuffix: /[uU]?[yslnLI]?/,
+        floatsuffix: /[fFmM]?/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // [< attributes >].
+                [/\[<.*>\]/, 'annotation'],
+                // Preprocessor directive
+                [/^#(if|else|endif)/, 'keyword'],
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
+                [/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
+                [/0x[0-9a-fA-F]+LF/, 'number.float'],
+                [/0x[0-9a-fA-F]+(@integersuffix)/, 'number.hex'],
+                [/0b[0-1]+(@integersuffix)/, 'number.bin'],
+                [/\d+(@integersuffix)/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"""/, 'string', '@string."""'],
+                [/"/, 'string', '@string."'],
+                // literal string
+                [/\@"/, { token: 'string.quote', next: '@litstring' }],
+                // characters
+                [/'[^\\']'B?/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\(\*(?!\))/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^*(]+/, 'comment'],
+                [/\*\)/, 'comment', '@pop'],
+                [/\*/, 'comment'],
+                [/\(\*\)/, 'comment'],
+                [/\(/, 'comment']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [
+                    /("""|"B?)/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ],
+            litstring: [
+                [/[^"]+/, 'string'],
+                [/""/, 'string.escape'],
+                [/"/, { token: 'string.quote', next: '@pop' }]
+            ]
+        }
+    };
+});
+

+ 224 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/go/go.js

@@ -0,0 +1,224 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/go/go',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '`', close: '`', notIn: ['string'] },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '`', close: '`' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.go',
+        keywords: [
+            'break',
+            'case',
+            'chan',
+            'const',
+            'continue',
+            'default',
+            'defer',
+            'else',
+            'fallthrough',
+            'for',
+            'func',
+            'go',
+            'goto',
+            'if',
+            'import',
+            'interface',
+            'map',
+            'package',
+            'range',
+            'return',
+            'select',
+            'struct',
+            'switch',
+            'type',
+            'var',
+            'bool',
+            'true',
+            'false',
+            'uint8',
+            'uint16',
+            'uint32',
+            'uint64',
+            'int8',
+            'int16',
+            'int32',
+            'int64',
+            'float32',
+            'float64',
+            'complex64',
+            'complex128',
+            'byte',
+            'rune',
+            'uint',
+            'int',
+            'uintptr',
+            'string',
+            'nil'
+        ],
+        operators: [
+            '+',
+            '-',
+            '*',
+            '/',
+            '%',
+            '&',
+            '|',
+            '^',
+            '<<',
+            '>>',
+            '&^',
+            '+=',
+            '-=',
+            '*=',
+            '/=',
+            '%=',
+            '&=',
+            '|=',
+            '^=',
+            '<<=',
+            '>>=',
+            '&^=',
+            '&&',
+            '||',
+            '<-',
+            '++',
+            '--',
+            '==',
+            '<',
+            '>',
+            '=',
+            '!',
+            '!=',
+            '<=',
+            '>=',
+            ':=',
+            '...',
+            '(',
+            ')',
+            '',
+            ']',
+            '{',
+            '}',
+            ',',
+            ';',
+            '.',
+            ':'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // [[ attributes ]].
+                [/\[\[.*\]\]/, 'annotation'],
+                // Preprocessor directive
+                [/^\s*#\w+/, 'keyword'],
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/\d*\d+[eE]([\-+]?\d+)?/, 'number.float'],
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex'],
+                [/0[0-7']*[0-7]/, 'number.octal'],
+                [/0[bB][0-1']*[0-1]/, 'number.binary'],
+                [/\d[\d']*/, 'number'],
+                [/\d/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string'],
+                [/`/, 'string', '@rawstring'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                // [/\/\*/, 'comment', '@push' ],    // nested comment not allowed :-(
+                // [/\/\*/,    'comment.invalid' ],    // this breaks block comments in the shape of /* //*/
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            //Identical copy of comment above, except for the addition of .doc
+            doccomment: [
+                [/[^\/*]+/, 'comment.doc'],
+                // [/\/\*/, 'comment.doc', '@push' ],    // nested comment not allowed :-(
+                [/\/\*/, 'comment.doc.invalid'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop']
+            ],
+            rawstring: [
+                [/[^\`]/, 'string'],
+                [/`/, 'string', '@pop']
+            ]
+        }
+    };
+});
+

+ 157 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/graphql/graphql.js

@@ -0,0 +1,157 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/graphql/graphql',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"""', close: '"""', notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"""', close: '"""' },
+            { open: '"', close: '"' }
+        ],
+        folding: {
+            offSide: true
+        }
+    };
+    exports.language = {
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        defaultToken: 'invalid',
+        tokenPostfix: '.gql',
+        keywords: [
+            'null',
+            'true',
+            'false',
+            'query',
+            'mutation',
+            'subscription',
+            'extend',
+            'schema',
+            'directive',
+            'scalar',
+            'type',
+            'interface',
+            'union',
+            'enum',
+            'input',
+            'implements',
+            'fragment',
+            'on'
+        ],
+        typeKeywords: ['Int', 'Float', 'String', 'Boolean', 'ID'],
+        directiveLocations: [
+            'SCHEMA',
+            'SCALAR',
+            'OBJECT',
+            'FIELD_DEFINITION',
+            'ARGUMENT_DEFINITION',
+            'INTERFACE',
+            'UNION',
+            'ENUM',
+            'ENUM_VALUE',
+            'INPUT_OBJECT',
+            'INPUT_FIELD_DEFINITION',
+            'QUERY',
+            'MUTATION',
+            'SUBSCRIPTION',
+            'FIELD',
+            'FRAGMENT_DEFINITION',
+            'FRAGMENT_SPREAD',
+            'INLINE_FRAGMENT',
+            'VARIABLE_DEFINITION'
+        ],
+        operators: ['=', '!', '?', ':', '&', '|'],
+        // we include these common regular expressions
+        symbols: /[=!?:&|]+/,
+        // https://facebook.github.io/graphql/draft/#sec-String-Value
+        escapes: /\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // fields and argument names
+                [
+                    /[a-z_][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@default': 'key.identifier'
+                        }
+                    }
+                ],
+                // identify typed input variables
+                [
+                    /[$][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@default': 'argument.identifier'
+                        }
+                    }
+                ],
+                // to show class names nicely
+                [
+                    /[A-Z][\w\$]*/,
+                    {
+                        cases: {
+                            '@typeKeywords': 'keyword',
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
+                // @ annotations.
+                // As an example, we emit a debugging log message on these tokens.
+                // Note: message are supressed during the first load -- change some lines to see them.
+                [/@\s*[a-zA-Z_\$][\w\$]*/, { token: 'annotation', log: 'annotation token: $0' }],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F]+/, 'number.hex'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                [/"""/, { token: 'string', next: '@mlstring', nextEmbedded: 'markdown' }],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"/, { token: 'string.quote', bracket: '@open', next: '@string' }]
+            ],
+            mlstring: [
+                [/[^"]+/, 'string'],
+                ['"""', { token: 'string', next: '@pop', nextEmbedded: '@pop' }]
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/#.*$/, 'comment']
+            ]
+        }
+    };
+});
+

+ 399 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/handlebars/handlebars.js

@@ -0,0 +1,399 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/handlebars/handlebars',["require", "exports", "../fillers/monaco-editor-core"], function (require, exports, monaco_editor_core_1) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    var EMPTY_ELEMENTS = [
+        'area',
+        'base',
+        'br',
+        'col',
+        'embed',
+        'hr',
+        'img',
+        'input',
+        'keygen',
+        'link',
+        'menuitem',
+        'meta',
+        'param',
+        'source',
+        'track',
+        'wbr'
+    ];
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
+        comments: {
+            blockComment: ['{{!--', '--}}']
+        },
+        brackets: [
+            ['<!--', '-->'],
+            ['<', '>'],
+            ['{{', '}}'],
+            ['{', '}'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '<', close: '>' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        onEnterRules: [
+            {
+                beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
+                afterText: /^<\/(\w[\w\d]*)\s*>$/i,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.IndentOutdent
+                }
+            },
+            {
+                beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
+                action: { indentAction: monaco_editor_core_1.languages.IndentAction.Indent }
+            }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '',
+        // ignoreCase: true,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                [/\{\{!--/, 'comment.block.start.handlebars', '@commentBlock'],
+                [/\{\{!/, 'comment.start.handlebars', '@comment'],
+                [/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.root' }],
+                [/<!DOCTYPE/, 'metatag.html', '@doctype'],
+                [/<!--/, 'comment.html', '@commentHtml'],
+                [/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
+                [/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
+                [/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
+                [/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
+                [/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
+                [/</, 'delimiter.html'],
+                [/\{/, 'delimiter.html'],
+                [/[^<{]+/] // text
+            ],
+            doctype: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.comment'
+                    }
+                ],
+                [/[^>]+/, 'metatag.content.html'],
+                [/>/, 'metatag.html', '@pop']
+            ],
+            comment: [
+                [/\}\}/, 'comment.end.handlebars', '@pop'],
+                [/./, 'comment.content.handlebars']
+            ],
+            commentBlock: [
+                [/--\}\}/, 'comment.block.end.handlebars', '@pop'],
+                [/./, 'comment.content.handlebars']
+            ],
+            commentHtml: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.comment'
+                    }
+                ],
+                [/-->/, 'comment.html', '@pop'],
+                [/[^-]+/, 'comment.content.html'],
+                [/./, 'comment.content.html']
+            ],
+            otherTag: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.otherTag'
+                    }
+                ],
+                [/\/?>/, 'delimiter.html', '@pop'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/] // whitespace
+            ],
+            // -- BEGIN <script> tags handling
+            // After <script
+            script: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.script'
+                    }
+                ],
+                [/type/, 'attribute.name', '@scriptAfterType'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.text/javascript',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [
+                    /(<\/)(script\s*)(>)/,
+                    ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]
+                ]
+            ],
+            // After <script ... type
+            scriptAfterType: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.scriptAfterType'
+                    }
+                ],
+                [/=/, 'delimiter', '@scriptAfterTypeEquals'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.text/javascript',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <script ... type =
+            scriptAfterTypeEquals: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.scriptAfterTypeEquals'
+                    }
+                ],
+                [
+                    /"([^"]*)"/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@scriptWithCustomType.$1'
+                    }
+                ],
+                [
+                    /'([^']*)'/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@scriptWithCustomType.$1'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.text/javascript',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <script ... type = $S2
+            scriptWithCustomType: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.scriptWithCustomType.$S2'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.$S2',
+                        nextEmbedded: '$S2'
+                    }
+                ],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            scriptEmbedded: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInEmbeddedState.scriptEmbedded.$S2',
+                        nextEmbedded: '@pop'
+                    }
+                ],
+                [/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
+            ],
+            // -- END <script> tags handling
+            // -- BEGIN <style> tags handling
+            // After <style
+            style: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.style'
+                    }
+                ],
+                [/type/, 'attribute.name', '@styleAfterType'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.text/css',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [
+                    /(<\/)(style\s*)(>)/,
+                    ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]
+                ]
+            ],
+            // After <style ... type
+            styleAfterType: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.styleAfterType'
+                    }
+                ],
+                [/=/, 'delimiter', '@styleAfterTypeEquals'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.text/css',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <style ... type =
+            styleAfterTypeEquals: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.styleAfterTypeEquals'
+                    }
+                ],
+                [
+                    /"([^"]*)"/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@styleWithCustomType.$1'
+                    }
+                ],
+                [
+                    /'([^']*)'/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@styleWithCustomType.$1'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.text/css',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <style ... type = $S2
+            styleWithCustomType: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInSimpleState.styleWithCustomType.$S2'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.$S2',
+                        nextEmbedded: '$S2'
+                    }
+                ],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            styleEmbedded: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@handlebarsInEmbeddedState.styleEmbedded.$S2',
+                        nextEmbedded: '@pop'
+                    }
+                ],
+                [/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
+            ],
+            // -- END <style> tags handling
+            handlebarsInSimpleState: [
+                [/\{\{\{?/, 'delimiter.handlebars'],
+                [/\}\}\}?/, { token: 'delimiter.handlebars', switchTo: '@$S2.$S3' }],
+                { include: 'handlebarsRoot' }
+            ],
+            handlebarsInEmbeddedState: [
+                [/\{\{\{?/, 'delimiter.handlebars'],
+                [
+                    /\}\}\}?/,
+                    {
+                        token: 'delimiter.handlebars',
+                        switchTo: '@$S2.$S3',
+                        nextEmbedded: '$S3'
+                    }
+                ],
+                { include: 'handlebarsRoot' }
+            ],
+            handlebarsRoot: [
+                [/"[^"]*"/, 'string.handlebars'],
+                [/[#/][^\s}]+/, 'keyword.helper.handlebars'],
+                [/else\b/, 'keyword.helper.handlebars'],
+                [/[\s]+/],
+                [/[^}]/, 'variable.parameter.handlebars']
+            ]
+        }
+    };
+});
+

File diff suppressed because it is too large
+ 187 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/hcl/hcl.js


+ 310 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/html/html.js

@@ -0,0 +1,310 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/html/html',["require", "exports", "../fillers/monaco-editor-core"], function (require, exports, monaco_editor_core_1) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    var EMPTY_ELEMENTS = [
+        'area',
+        'base',
+        'br',
+        'col',
+        'embed',
+        'hr',
+        'img',
+        'input',
+        'keygen',
+        'link',
+        'menuitem',
+        'meta',
+        'param',
+        'source',
+        'track',
+        'wbr'
+    ];
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
+        comments: {
+            blockComment: ['<!--', '-->']
+        },
+        brackets: [
+            ['<!--', '-->'],
+            ['<', '>'],
+            ['{', '}'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' }
+        ],
+        onEnterRules: [
+            {
+                beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
+                afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.IndentOutdent
+                }
+            },
+            {
+                beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
+                action: { indentAction: monaco_editor_core_1.languages.IndentAction.Indent }
+            }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*<!--\\s*#region\\b.*-->'),
+                end: new RegExp('^\\s*<!--\\s*#endregion\\b.*-->')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.html',
+        ignoreCase: true,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                [/<!DOCTYPE/, 'metatag', '@doctype'],
+                [/<!--/, 'comment', '@comment'],
+                [/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ['delimiter', 'tag', '', 'delimiter']],
+                [/(<)(script)/, ['delimiter', { token: 'tag', next: '@script' }]],
+                [/(<)(style)/, ['delimiter', { token: 'tag', next: '@style' }]],
+                [/(<)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
+                [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
+                [/</, 'delimiter'],
+                [/[^<]+/] // text
+            ],
+            doctype: [
+                [/[^>]+/, 'metatag.content'],
+                [/>/, 'metatag', '@pop']
+            ],
+            comment: [
+                [/-->/, 'comment', '@pop'],
+                [/[^-]+/, 'comment.content'],
+                [/./, 'comment.content']
+            ],
+            otherTag: [
+                [/\/?>/, 'delimiter', '@pop'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/] // whitespace
+            ],
+            // -- BEGIN <script> tags handling
+            // After <script
+            script: [
+                [/type/, 'attribute.name', '@scriptAfterType'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@scriptEmbedded',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/(<\/)(script\s*)(>)/, ['delimiter', 'tag', { token: 'delimiter', next: '@pop' }]]
+            ],
+            // After <script ... type
+            scriptAfterType: [
+                [/=/, 'delimiter', '@scriptAfterTypeEquals'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@scriptEmbedded',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <script ... type =
+            scriptAfterTypeEquals: [
+                [
+                    /"([^"]*)"/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@scriptWithCustomType.$1'
+                    }
+                ],
+                [
+                    /'([^']*)'/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@scriptWithCustomType.$1'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@scriptEmbedded',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <script ... type = $S2
+            scriptWithCustomType: [
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@scriptEmbedded.$S2',
+                        nextEmbedded: '$S2'
+                    }
+                ],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            scriptEmbedded: [
+                [/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
+                [/[^<]+/, '']
+            ],
+            // -- END <script> tags handling
+            // -- BEGIN <style> tags handling
+            // After <style
+            style: [
+                [/type/, 'attribute.name', '@styleAfterType'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@styleEmbedded',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/(<\/)(style\s*)(>)/, ['delimiter', 'tag', { token: 'delimiter', next: '@pop' }]]
+            ],
+            // After <style ... type
+            styleAfterType: [
+                [/=/, 'delimiter', '@styleAfterTypeEquals'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@styleEmbedded',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <style ... type =
+            styleAfterTypeEquals: [
+                [
+                    /"([^"]*)"/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@styleWithCustomType.$1'
+                    }
+                ],
+                [
+                    /'([^']*)'/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@styleWithCustomType.$1'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@styleEmbedded',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <style ... type = $S2
+            styleWithCustomType: [
+                [
+                    />/,
+                    {
+                        token: 'delimiter',
+                        next: '@styleEmbedded.$S2',
+                        nextEmbedded: '$S2'
+                    }
+                ],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            styleEmbedded: [
+                [/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
+                [/[^<]+/, '']
+            ]
+            // -- END <style> tags handling
+        }
+    };
+});
+// TESTED WITH:
+// <!DOCTYPE html>
+// <html>
+// <head>
+//   <title>Monarch Workbench</title>
+//   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+//   <!----
+//   -- -- -- a comment -- -- --
+//   ---->
+//   <style bah="bah">
+//     body { font-family: Consolas; } /* nice */
+//   </style>
+// </head
+// >
+// a = "asd"
+// <body>
+//   <br/>
+//   <div
+//   class
+//   =
+//   "test"
+//   >
+//     <script>
+//       function() {
+//         alert("hi </ script>"); // javascript
+//       };
+//     </script>
+//     <script
+// 	bah="asdfg"
+// 	type="text/css"
+// 	>
+//   .bar { text-decoration: underline; }
+//     </script>
+//   </div>
+// </body>
+// </html>
+;

+ 76 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/ini/ini.js

@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/ini/ini',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.ini',
+        // we include these common regular expressions
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // sections
+                [/^\[[^\]]*\]/, 'metatag'],
+                // keys
+                [/(^\w+)(\s*)(\=)/, ['key', '', 'delimiter']],
+                // whitespace
+                { include: '@whitespace' },
+                // numbers
+                [/\d+/, 'number'],
+                // strings: recover on non-terminated strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string."'],
+                [/'/, 'string', "@string.'"]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/^\s*[#;].*$/, 'comment']
+            ],
+            string: [
+                [/[^\\"']+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ]
+        }
+    };
+});
+

+ 238 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/java/java.js

@@ -0,0 +1,238 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/java/java',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        // the default separators except `@$`
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '<', close: '>' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))'),
+                end: new RegExp('^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.java',
+        keywords: [
+            'abstract',
+            'continue',
+            'for',
+            'new',
+            'switch',
+            'assert',
+            'default',
+            'goto',
+            'package',
+            'synchronized',
+            'boolean',
+            'do',
+            'if',
+            'private',
+            'this',
+            'break',
+            'double',
+            'implements',
+            'protected',
+            'throw',
+            'byte',
+            'else',
+            'import',
+            'public',
+            'throws',
+            'case',
+            'enum',
+            'instanceof',
+            'return',
+            'transient',
+            'catch',
+            'extends',
+            'int',
+            'short',
+            'try',
+            'char',
+            'final',
+            'interface',
+            'static',
+            'void',
+            'class',
+            'finally',
+            'long',
+            'strictfp',
+            'volatile',
+            'const',
+            'float',
+            'native',
+            'super',
+            'while',
+            'true',
+            'false',
+            'yield',
+            'record',
+            'sealed',
+            'non-sealed',
+            'permits'
+        ],
+        operators: [
+            '=',
+            '>',
+            '<',
+            '!',
+            '~',
+            '?',
+            ':',
+            '==',
+            '<=',
+            '>=',
+            '!=',
+            '&&',
+            '||',
+            '++',
+            '--',
+            '+',
+            '-',
+            '*',
+            '/',
+            '&',
+            '|',
+            '^',
+            '%',
+            '<<',
+            '>>',
+            '>>>',
+            '+=',
+            '-=',
+            '*=',
+            '/=',
+            '&=',
+            '|=',
+            '^=',
+            '%=',
+            '<<=',
+            '>>=',
+            '>>>='
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        digits: /\d+(_+\d+)*/,
+        octaldigits: /[0-7]+(_+[0-7]+)*/,
+        binarydigits: /[0-1]+(_+[0-1]+)*/,
+        hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // Special keyword with a dash
+                ['non-sealed', 'keyword.non-sealed'],
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // @ annotations.
+                [/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
+                // numbers
+                [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
+                [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
+                [/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
+                [/0(@octaldigits)[Ll]?/, 'number.octal'],
+                [/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
+                [/(@digits)[fFdD]/, 'number.float'],
+                [/(@digits)[lL]?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"""/, 'string', '@multistring'],
+                [/"/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@javadoc'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                // [/\/\*/, 'comment', '@push' ],    // nested comment not allowed :-(
+                // [/\/\*/,    'comment.invalid' ],    // this breaks block comments in the shape of /* //*/
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            //Identical copy of comment above, except for the addition of .doc
+            javadoc: [
+                [/[^\/*]+/, 'comment.doc'],
+                // [/\/\*/, 'comment.doc', '@push' ],    // nested comment not allowed :-(
+                [/\/\*/, 'comment.doc.invalid'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop']
+            ],
+            multistring: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"""/, 'string', '@pop'],
+                [/./, 'string']
+            ]
+        }
+    };
+});
+

+ 412 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/javascript/javascript.js

@@ -0,0 +1,412 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/typescript/typescript',["require", "exports", "../fillers/monaco-editor-core"], function (require, exports, monaco_editor_core_1) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        onEnterRules: [
+            {
+                // e.g. /** | */
+                beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
+                afterText: /^\s*\*\/$/,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.IndentOutdent,
+                    appendText: ' * '
+                }
+            },
+            {
+                // e.g. /** ...|
+                beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.None,
+                    appendText: ' * '
+                }
+            },
+            {
+                // e.g.  * ...|
+                beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.None,
+                    appendText: '* '
+                }
+            },
+            {
+                // e.g.  */|
+                beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.None,
+                    removeText: 1
+                }
+            }
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '`', close: '`', notIn: ['string', 'comment'] },
+            { open: '/**', close: ' */', notIn: ['string'] }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*//\\s*#?region\\b'),
+                end: new RegExp('^\\s*//\\s*#?endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        defaultToken: 'invalid',
+        tokenPostfix: '.ts',
+        keywords: [
+            // Should match the keys of textToKeywordObj in
+            // https://github.com/microsoft/TypeScript/blob/master/src/compiler/scanner.ts
+            'abstract',
+            'any',
+            'as',
+            'asserts',
+            'bigint',
+            'boolean',
+            'break',
+            'case',
+            'catch',
+            'class',
+            'continue',
+            'const',
+            'constructor',
+            'debugger',
+            'declare',
+            'default',
+            'delete',
+            'do',
+            'else',
+            'enum',
+            'export',
+            'extends',
+            'false',
+            'finally',
+            'for',
+            'from',
+            'function',
+            'get',
+            'if',
+            'implements',
+            'import',
+            'in',
+            'infer',
+            'instanceof',
+            'interface',
+            'is',
+            'keyof',
+            'let',
+            'module',
+            'namespace',
+            'never',
+            'new',
+            'null',
+            'number',
+            'object',
+            'package',
+            'private',
+            'protected',
+            'public',
+            'override',
+            'readonly',
+            'require',
+            'global',
+            'return',
+            'set',
+            'static',
+            'string',
+            'super',
+            'switch',
+            'symbol',
+            'this',
+            'throw',
+            'true',
+            'try',
+            'type',
+            'typeof',
+            'undefined',
+            'unique',
+            'unknown',
+            'var',
+            'void',
+            'while',
+            'with',
+            'yield',
+            'async',
+            'await',
+            'of'
+        ],
+        operators: [
+            '<=',
+            '>=',
+            '==',
+            '!=',
+            '===',
+            '!==',
+            '=>',
+            '+',
+            '-',
+            '**',
+            '*',
+            '/',
+            '%',
+            '++',
+            '--',
+            '<<',
+            '</',
+            '>>',
+            '>>>',
+            '&',
+            '|',
+            '^',
+            '!',
+            '~',
+            '&&',
+            '||',
+            '??',
+            '?',
+            ':',
+            '=',
+            '+=',
+            '-=',
+            '*=',
+            '**=',
+            '/=',
+            '%=',
+            '<<=',
+            '>>=',
+            '>>>=',
+            '&=',
+            '|=',
+            '^=',
+            '@'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        digits: /\d+(_+\d+)*/,
+        octaldigits: /[0-7]+(_+[0-7]+)*/,
+        binarydigits: /[0-1]+(_+[0-1]+)*/,
+        hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
+        regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
+        regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [[/[{}]/, 'delimiter.bracket'], { include: 'common' }],
+            common: [
+                // identifiers and keywords
+                [
+                    /[a-z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/[A-Z][\w\$]*/, 'type.identifier'],
+                // [/[A-Z][\w\$]*/, 'identifier'],
+                // whitespace
+                { include: '@whitespace' },
+                // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
+                [
+                    /\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
+                    { token: 'regexp', bracket: '@open', next: '@regexp' }
+                ],
+                // delimiters and operators
+                [/[()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [/!(?=([^=]|$))/, 'delimiter'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
+                [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
+                [/0[xX](@hexdigits)n?/, 'number.hex'],
+                [/0[oO]?(@octaldigits)n?/, 'number.octal'],
+                [/0[bB](@binarydigits)n?/, 'number.binary'],
+                [/(@digits)n?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string_double'],
+                [/'/, 'string', '@string_single'],
+                [/`/, 'string', '@string_backtick']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            jsdoc: [
+                [/[^\/*]+/, 'comment.doc'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            // We match regular expression quite precisely
+            regexp: [
+                [
+                    /(\{)(\d+(?:,\d*)?)(\})/,
+                    ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']
+                ],
+                [
+                    /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
+                    ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]
+                ],
+                [/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
+                [/[()]/, 'regexp.escape.control'],
+                [/@regexpctl/, 'regexp.escape.control'],
+                [/[^\\\/]/, 'regexp'],
+                [/@regexpesc/, 'regexp.escape'],
+                [/\\\./, 'regexp.invalid'],
+                [/(\/)([dgimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']]
+            ],
+            regexrange: [
+                [/-/, 'regexp.escape.control'],
+                [/\^/, 'regexp.invalid'],
+                [/@regexpesc/, 'regexp.escape'],
+                [/[^\]]/, 'regexp'],
+                [
+                    /\]/,
+                    {
+                        token: 'regexp.escape.control',
+                        next: '@pop',
+                        bracket: '@close'
+                    }
+                ]
+            ],
+            string_double: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop']
+            ],
+            string_single: [
+                [/[^\\']+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, 'string', '@pop']
+            ],
+            string_backtick: [
+                [/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
+                [/[^\\`$]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/`/, 'string', '@pop']
+            ],
+            bracketCounting: [
+                [/\{/, 'delimiter.bracket', '@bracketCounting'],
+                [/\}/, 'delimiter.bracket', '@pop'],
+                { include: 'common' }
+            ]
+        }
+    };
+});
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/javascript/javascript',["require", "exports", "../typescript/typescript"], function (require, exports, typescript_1) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = typescript_1.conf;
+    exports.language = {
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        defaultToken: 'invalid',
+        tokenPostfix: '.js',
+        keywords: [
+            'break',
+            'case',
+            'catch',
+            'class',
+            'continue',
+            'const',
+            'constructor',
+            'debugger',
+            'default',
+            'delete',
+            'do',
+            'else',
+            'export',
+            'extends',
+            'false',
+            'finally',
+            'for',
+            'from',
+            'function',
+            'get',
+            'if',
+            'import',
+            'in',
+            'instanceof',
+            'let',
+            'new',
+            'null',
+            'return',
+            'set',
+            'super',
+            'switch',
+            'symbol',
+            'this',
+            'throw',
+            'true',
+            'try',
+            'typeof',
+            'undefined',
+            'var',
+            'void',
+            'while',
+            'with',
+            'yield',
+            'async',
+            'await',
+            'of'
+        ],
+        typeKeywords: [],
+        operators: typescript_1.language.operators,
+        symbols: typescript_1.language.symbols,
+        escapes: typescript_1.language.escapes,
+        digits: typescript_1.language.digits,
+        octaldigits: typescript_1.language.octaldigits,
+        binarydigits: typescript_1.language.binarydigits,
+        hexdigits: typescript_1.language.hexdigits,
+        regexpctl: typescript_1.language.regexpctl,
+        regexpesc: typescript_1.language.regexpesc,
+        tokenizer: typescript_1.language.tokenizer
+    };
+});
+

+ 517 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/julia/julia.js

@@ -0,0 +1,517 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/julia/julia',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        tokenPostfix: '.julia',
+        keywords: [
+            'begin',
+            'while',
+            'if',
+            'for',
+            'try',
+            'return',
+            'break',
+            'continue',
+            'function',
+            'macro',
+            'quote',
+            'let',
+            'local',
+            'global',
+            'const',
+            'do',
+            'struct',
+            'module',
+            'baremodule',
+            'using',
+            'import',
+            'export',
+            'end',
+            'else',
+            'elseif',
+            'catch',
+            'finally',
+            'mutable',
+            'primitive',
+            'abstract',
+            'type',
+            'in',
+            'isa',
+            'where',
+            'new'
+        ],
+        types: [
+            'LinRange',
+            'LineNumberNode',
+            'LinearIndices',
+            'LoadError',
+            'MIME',
+            'Matrix',
+            'Method',
+            'MethodError',
+            'Missing',
+            'MissingException',
+            'Module',
+            'NTuple',
+            'NamedTuple',
+            'Nothing',
+            'Number',
+            'OrdinalRange',
+            'OutOfMemoryError',
+            'OverflowError',
+            'Pair',
+            'PartialQuickSort',
+            'PermutedDimsArray',
+            'Pipe',
+            'Ptr',
+            'QuoteNode',
+            'Rational',
+            'RawFD',
+            'ReadOnlyMemoryError',
+            'Real',
+            'ReentrantLock',
+            'Ref',
+            'Regex',
+            'RegexMatch',
+            'RoundingMode',
+            'SegmentationFault',
+            'Set',
+            'Signed',
+            'Some',
+            'StackOverflowError',
+            'StepRange',
+            'StepRangeLen',
+            'StridedArray',
+            'StridedMatrix',
+            'StridedVecOrMat',
+            'StridedVector',
+            'String',
+            'StringIndexError',
+            'SubArray',
+            'SubString',
+            'SubstitutionString',
+            'Symbol',
+            'SystemError',
+            'Task',
+            'Text',
+            'TextDisplay',
+            'Timer',
+            'Tuple',
+            'Type',
+            'TypeError',
+            'TypeVar',
+            'UInt',
+            'UInt128',
+            'UInt16',
+            'UInt32',
+            'UInt64',
+            'UInt8',
+            'UndefInitializer',
+            'AbstractArray',
+            'UndefKeywordError',
+            'AbstractChannel',
+            'UndefRefError',
+            'AbstractChar',
+            'UndefVarError',
+            'AbstractDict',
+            'Union',
+            'AbstractDisplay',
+            'UnionAll',
+            'AbstractFloat',
+            'UnitRange',
+            'AbstractIrrational',
+            'Unsigned',
+            'AbstractMatrix',
+            'AbstractRange',
+            'Val',
+            'AbstractSet',
+            'Vararg',
+            'AbstractString',
+            'VecElement',
+            'AbstractUnitRange',
+            'VecOrMat',
+            'AbstractVecOrMat',
+            'Vector',
+            'AbstractVector',
+            'VersionNumber',
+            'Any',
+            'WeakKeyDict',
+            'ArgumentError',
+            'WeakRef',
+            'Array',
+            'AssertionError',
+            'BigFloat',
+            'BigInt',
+            'BitArray',
+            'BitMatrix',
+            'BitSet',
+            'BitVector',
+            'Bool',
+            'BoundsError',
+            'CapturedException',
+            'CartesianIndex',
+            'CartesianIndices',
+            'Cchar',
+            'Cdouble',
+            'Cfloat',
+            'Channel',
+            'Char',
+            'Cint',
+            'Cintmax_t',
+            'Clong',
+            'Clonglong',
+            'Cmd',
+            'Colon',
+            'Complex',
+            'ComplexF16',
+            'ComplexF32',
+            'ComplexF64',
+            'CompositeException',
+            'Condition',
+            'Cptrdiff_t',
+            'Cshort',
+            'Csize_t',
+            'Cssize_t',
+            'Cstring',
+            'Cuchar',
+            'Cuint',
+            'Cuintmax_t',
+            'Culong',
+            'Culonglong',
+            'Cushort',
+            'Cvoid',
+            'Cwchar_t',
+            'Cwstring',
+            'DataType',
+            'DenseArray',
+            'DenseMatrix',
+            'DenseVecOrMat',
+            'DenseVector',
+            'Dict',
+            'DimensionMismatch',
+            'Dims',
+            'DivideError',
+            'DomainError',
+            'EOFError',
+            'Enum',
+            'ErrorException',
+            'Exception',
+            'ExponentialBackOff',
+            'Expr',
+            'Float16',
+            'Float32',
+            'Float64',
+            'Function',
+            'GlobalRef',
+            'HTML',
+            'IO',
+            'IOBuffer',
+            'IOContext',
+            'IOStream',
+            'IdDict',
+            'IndexCartesian',
+            'IndexLinear',
+            'IndexStyle',
+            'InexactError',
+            'InitError',
+            'Int',
+            'Int128',
+            'Int16',
+            'Int32',
+            'Int64',
+            'Int8',
+            'Integer',
+            'InterruptException',
+            'InvalidStateException',
+            'Irrational',
+            'KeyError'
+        ],
+        keywordops: ['<:', '>:', ':', '=>', '...', '.', '->', '?'],
+        allops: /[^\w\d\s()\[\]{}"'#]+/,
+        constants: [
+            'true',
+            'false',
+            'nothing',
+            'missing',
+            'undef',
+            'Inf',
+            'pi',
+            'NaN',
+            'π',
+            'ℯ',
+            'ans',
+            'PROGRAM_FILE',
+            'ARGS',
+            'C_NULL',
+            'VERSION',
+            'DEPOT_PATH',
+            'LOAD_PATH'
+        ],
+        operators: [
+            '!',
+            '!=',
+            '!==',
+            '%',
+            '&',
+            '*',
+            '+',
+            '-',
+            '/',
+            '//',
+            '<',
+            '<<',
+            '<=',
+            '==',
+            '===',
+            '=>',
+            '>',
+            '>=',
+            '>>',
+            '>>>',
+            '\\',
+            '^',
+            '|',
+            '|>',
+            '~',
+            '÷',
+            '∈',
+            '∉',
+            '∋',
+            '∌',
+            '∘',
+            '√',
+            '∛',
+            '∩',
+            '∪',
+            '≈',
+            '≉',
+            '≠',
+            '≡',
+            '≢',
+            '≤',
+            '≥',
+            '⊆',
+            '⊇',
+            '⊈',
+            '⊉',
+            '⊊',
+            '⊋',
+            '⊻'
+        ],
+        brackets: [
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' }
+        ],
+        ident: /π|ℯ|\b(?!\d)\w+\b/,
+        // escape sequences
+        escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
+        escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                [/(::)\s*|\b(isa)\s+/, 'keyword', '@typeanno'],
+                [/\b(isa)(\s*\(@ident\s*,\s*)/, ['keyword', { token: '', next: '@typeanno' }]],
+                [/\b(type|struct)[ \t]+/, 'keyword', '@typeanno'],
+                // symbols
+                [/^\s*:@ident[!?]?/, 'metatag'],
+                [/(return)(\s*:@ident[!?]?)/, ['keyword', 'metatag']],
+                [/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/, ['', 'metatag']],
+                [/:\(/, 'metatag', '@quote'],
+                // regular expressions
+                [/r"""/, 'regexp.delim', '@tregexp'],
+                [/r"/, 'regexp.delim', '@sregexp'],
+                // strings
+                [/raw"""/, 'string.delim', '@rtstring'],
+                [/[bv]?"""/, 'string.delim', '@dtstring'],
+                [/raw"/, 'string.delim', '@rsstring'],
+                [/[bv]?"/, 'string.delim', '@dsstring'],
+                [
+                    /(@ident)\{/,
+                    {
+                        cases: {
+                            '$1@types': { token: 'type', next: '@gen' },
+                            '@default': { token: 'type', next: '@gen' }
+                        }
+                    }
+                ],
+                [
+                    /@ident[!?'']?(?=\.?\()/,
+                    {
+                        cases: {
+                            '@types': 'type',
+                            '@keywords': 'keyword',
+                            '@constants': 'variable',
+                            '@default': 'keyword.flow'
+                        }
+                    }
+                ],
+                [
+                    /@ident[!?']?/,
+                    {
+                        cases: {
+                            '@types': 'type',
+                            '@keywords': 'keyword',
+                            '@constants': 'variable',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/\$\w+/, 'key'],
+                [/\$\(/, 'key', '@paste'],
+                [/@@@ident/, 'annotation'],
+                // whitespace
+                { include: '@whitespace' },
+                // characters
+                [/'(?:@escapes|.)'/, 'string.character'],
+                // delimiters and operators
+                [/[()\[\]{}]/, '@brackets'],
+                [
+                    /@allops/,
+                    {
+                        cases: {
+                            '@keywordops': 'keyword',
+                            '@operators': 'operator'
+                        }
+                    }
+                ],
+                [/[;,]/, 'delimiter'],
+                // numbers
+                [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, 'number.hex'],
+                [/0[_oO][0-7](_?[0-7])*/, 'number.octal'],
+                [/0[bB][01](_?[01])*/, 'number.binary'],
+                [/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/, 'number']
+            ],
+            // type
+            typeanno: [
+                [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/, 'type', '@gen'],
+                [/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/, ['type', 'keyword']],
+                [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/, 'type', '@pop'],
+                ['', '', '@pop']
+            ],
+            // generic type
+            gen: [
+                [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/, 'type', '@push'],
+                [/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/, 'type'],
+                [/<:/, 'keyword'],
+                [/(\})(\s*<:\s*)/, ['type', { token: 'keyword', next: '@pop' }]],
+                [/\}/, 'type', '@pop'],
+                { include: '@root' }
+            ],
+            // $(...)
+            quote: [
+                [/\$\(/, 'key', '@paste'],
+                [/\(/, '@brackets', '@paren'],
+                [/\)/, 'metatag', '@pop'],
+                { include: '@root' }
+            ],
+            // :(...)
+            paste: [
+                [/:\(/, 'metatag', '@quote'],
+                [/\(/, '@brackets', '@paren'],
+                [/\)/, 'key', '@pop'],
+                { include: '@root' }
+            ],
+            // (...)
+            paren: [
+                [/\$\(/, 'key', '@paste'],
+                [/:\(/, 'metatag', '@quote'],
+                [/\(/, '@brackets', '@push'],
+                [/\)/, '@brackets', '@pop'],
+                { include: '@root' }
+            ],
+            // r"egex string"
+            sregexp: [
+                [/^.*/, 'invalid'],
+                [/[^\\"()\[\]{}]/, 'regexp'],
+                [/[()\[\]{}]/, '@brackets'],
+                [/\\./, 'operator.scss'],
+                [/"[imsx]*/, 'regexp.delim', '@pop']
+            ],
+            tregexp: [
+                [/[^\\"()\[\]{}]/, 'regexp'],
+                [/[()\[\]{}]/, '@brackets'],
+                [/\\./, 'operator.scss'],
+                [/"(?!"")/, 'string'],
+                [/"""[imsx]*/, 'regexp.delim', '@pop']
+            ],
+            // raw"string"
+            rsstring: [
+                [/^.*/, 'invalid'],
+                [/[^\\"]/, 'string'],
+                [/\\./, 'string.escape'],
+                [/"/, 'string.delim', '@pop']
+            ],
+            rtstring: [
+                [/[^\\"]/, 'string'],
+                [/\\./, 'string.escape'],
+                [/"(?!"")/, 'string'],
+                [/"""/, 'string.delim', '@pop']
+            ],
+            // "string".
+            dsstring: [
+                [/^.*/, 'invalid'],
+                [/[^\\"\$]/, 'string'],
+                [/\$/, '', '@interpolated'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string.delim', '@pop']
+            ],
+            dtstring: [
+                [/[^\\"\$]/, 'string'],
+                [/\$/, '', '@interpolated'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"(?!"")/, 'string'],
+                [/"""/, 'string.delim', '@pop']
+            ],
+            // interpolated sequence
+            interpolated: [
+                [/\(/, { token: '', switchTo: '@interpolated_compound' }],
+                [/[a-zA-Z_]\w*/, 'identifier'],
+                ['', '', '@pop'] // just a $ is interpreted as a $
+            ],
+            // any code
+            interpolated_compound: [[/\)/, '', '@pop'], { include: '@root' }],
+            // whitespace & comments
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/#=/, 'comment', '@multi_comment'],
+                [/#.*$/, 'comment']
+            ],
+            multi_comment: [
+                [/#=/, 'comment', '@push'],
+                [/=#/, 'comment', '@pop'],
+                [/=(?!#)|#(?!=)/, 'comment'],
+                [/[^#=]+/, 'comment']
+            ]
+        }
+    };
+});
+

+ 259 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/kotlin/kotlin.js

@@ -0,0 +1,259 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/kotlin/kotlin',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        // the default separators except `@$`
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '<', close: '>' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))'),
+                end: new RegExp('^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.kt',
+        keywords: [
+            'as',
+            'as?',
+            'break',
+            'class',
+            'continue',
+            'do',
+            'else',
+            'false',
+            'for',
+            'fun',
+            'if',
+            'in',
+            '!in',
+            'interface',
+            'is',
+            '!is',
+            'null',
+            'object',
+            'package',
+            'return',
+            'super',
+            'this',
+            'throw',
+            'true',
+            'try',
+            'typealias',
+            'val',
+            'var',
+            'when',
+            'while',
+            'by',
+            'catch',
+            'constructor',
+            'delegate',
+            'dynamic',
+            'field',
+            'file',
+            'finally',
+            'get',
+            'import',
+            'init',
+            'param',
+            'property',
+            'receiver',
+            'set',
+            'setparam',
+            'where',
+            'actual',
+            'abstract',
+            'annotation',
+            'companion',
+            'const',
+            'crossinline',
+            'data',
+            'enum',
+            'expect',
+            'external',
+            'final',
+            'infix',
+            'inline',
+            'inner',
+            'internal',
+            'lateinit',
+            'noinline',
+            'open',
+            'operator',
+            'out',
+            'override',
+            'private',
+            'protected',
+            'public',
+            'reified',
+            'sealed',
+            'suspend',
+            'tailrec',
+            'vararg',
+            'field',
+            'it'
+        ],
+        operators: [
+            '+',
+            '-',
+            '*',
+            '/',
+            '%',
+            '=',
+            '+=',
+            '-=',
+            '*=',
+            '/=',
+            '%=',
+            '++',
+            '--',
+            '&&',
+            '||',
+            '!',
+            '==',
+            '!=',
+            '===',
+            '!==',
+            '>',
+            '<',
+            '<=',
+            '>=',
+            '[',
+            ']',
+            '!!',
+            '?.',
+            '?:',
+            '::',
+            '..',
+            ':',
+            '?',
+            '->',
+            '@',
+            ';',
+            '$',
+            '_'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        digits: /\d+(_+\d+)*/,
+        octaldigits: /[0-7]+(_+[0-7]+)*/,
+        binarydigits: /[0-1]+(_+[0-1]+)*/,
+        hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // class name highlighting
+                [/[A-Z][\w\$]*/, 'type.identifier'],
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // @ annotations.
+                [/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
+                // numbers
+                [/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
+                [/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
+                [/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
+                [/0(@octaldigits)[Ll]?/, 'number.octal'],
+                [/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
+                [/(@digits)[fFdD]/, 'number.float'],
+                [/(@digits)[lL]?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/"""/, 'string', '@multistring'],
+                [/"/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
+                [/'/, 'string.invalid']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/\/\*\*(?!\/)/, 'comment.doc', '@javadoc'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            //Identical copy of comment above, except for the addition of .doc
+            javadoc: [
+                [/[^\/*]+/, 'comment.doc'],
+                [/\/\*/, 'comment.doc', '@push'],
+                [/\/\*/, 'comment.doc.invalid'],
+                [/\*\//, 'comment.doc', '@pop'],
+                [/[\/*]/, 'comment.doc']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, 'string', '@pop']
+            ],
+            multistring: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"""/, 'string', '@pop'],
+                [/./, 'string']
+            ]
+        }
+    };
+});
+

+ 168 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/less/less.js

@@ -0,0 +1,168 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/less/less',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,
+        comments: {
+            blockComment: ['/*', '*/'],
+            lineComment: '//'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}', notIn: ['string', 'comment'] },
+            { open: '[', close: ']', notIn: ['string', 'comment'] },
+            { open: '(', close: ')', notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string', 'comment'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/'),
+                end: new RegExp('^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.less',
+        identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
+        identifierPlus: '-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.bracket' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        tokenizer: {
+            root: [
+                { include: '@nestedJSBegin' },
+                ['[ \\t\\r\\n]+', ''],
+                { include: '@comments' },
+                { include: '@keyword' },
+                { include: '@strings' },
+                { include: '@numbers' },
+                ['[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))', 'attribute.name', '@attribute'],
+                ['url(\\-prefix)?\\(', { token: 'tag', next: '@urldeclaration' }],
+                ['[{}()\\[\\]]', '@brackets'],
+                ['[,:;]', 'delimiter'],
+                ['#@identifierPlus', 'tag.id'],
+                ['&', 'tag'],
+                ['\\.@identifierPlus(?=\\()', 'tag.class', '@attribute'],
+                ['\\.@identifierPlus', 'tag.class'],
+                ['@identifierPlus', 'tag'],
+                { include: '@operators' },
+                ['@(@identifier(?=[:,\\)]))', 'variable', '@attribute'],
+                ['@(@identifier)', 'variable'],
+                ['@', 'key', '@atRules']
+            ],
+            nestedJSBegin: [
+                ['``', 'delimiter.backtick'],
+                [
+                    '`',
+                    {
+                        token: 'delimiter.backtick',
+                        next: '@nestedJSEnd',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ]
+            ],
+            nestedJSEnd: [
+                [
+                    '`',
+                    {
+                        token: 'delimiter.backtick',
+                        next: '@pop',
+                        nextEmbedded: '@pop'
+                    }
+                ]
+            ],
+            operators: [['[<>=\\+\\-\\*\\/\\^\\|\\~]', 'operator']],
+            keyword: [
+                [
+                    '(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b',
+                    'keyword'
+                ]
+            ],
+            urldeclaration: [
+                { include: '@strings' },
+                ['[^)\r\n]+', 'string'],
+                ['\\)', { token: 'tag', next: '@pop' }]
+            ],
+            attribute: [
+                { include: '@nestedJSBegin' },
+                { include: '@comments' },
+                { include: '@strings' },
+                { include: '@numbers' },
+                { include: '@keyword' },
+                ['[a-zA-Z\\-]+(?=\\()', 'attribute.value', '@attribute'],
+                ['>', 'operator', '@pop'],
+                ['@identifier', 'attribute.value'],
+                { include: '@operators' },
+                ['@(@identifier)', 'variable'],
+                ['[)\\}]', '@brackets', '@pop'],
+                ['[{}()\\[\\]>]', '@brackets'],
+                ['[;]', 'delimiter', '@pop'],
+                ['[,=:]', 'delimiter'],
+                ['\\s', ''],
+                ['.', 'attribute.value']
+            ],
+            comments: [
+                ['\\/\\*', 'comment', '@comment'],
+                ['\\/\\/+.*', 'comment']
+            ],
+            comment: [
+                ['\\*\\/', 'comment', '@pop'],
+                ['.', 'comment']
+            ],
+            numbers: [
+                ['(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'attribute.value.number', next: '@units' }],
+                ['#[0-9a-fA-F_]+(?!\\w)', 'attribute.value.hex']
+            ],
+            units: [
+                [
+                    '(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?',
+                    'attribute.value.unit',
+                    '@pop'
+                ]
+            ],
+            strings: [
+                ['~?"', { token: 'string.delimiter', next: '@stringsEndDoubleQuote' }],
+                ["~?'", { token: 'string.delimiter', next: '@stringsEndQuote' }]
+            ],
+            stringsEndDoubleQuote: [
+                ['\\\\"', 'string'],
+                ['"', { token: 'string.delimiter', next: '@popall' }],
+                ['.', 'string']
+            ],
+            stringsEndQuote: [
+                ["\\\\'", 'string'],
+                ["'", { token: 'string.delimiter', next: '@popall' }],
+                ['.', 'string']
+            ],
+            atRules: [
+                { include: '@comments' },
+                { include: '@strings' },
+                ['[()]', 'delimiter'],
+                ['[\\{;]', 'delimiter', '@pop'],
+                ['.', 'key']
+            ]
+        }
+    };
+});
+

+ 164 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/lexon/lexon.js

@@ -0,0 +1,164 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/lexon/lexon',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: 'COMMENT'
+            // blockComment: ['COMMENT', '.'],
+        },
+        brackets: [['(', ')']],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: ':', close: '.' }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '`', close: '`' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: ':', close: '.' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*(::\\s*|COMMENT\\s+)#region'),
+                end: new RegExp('^\\s*(::\\s*|COMMENT\\s+)#endregion')
+            }
+        }
+    };
+    exports.language = {
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        // defaultToken: 'invalid',
+        tokenPostfix: '.lexon',
+        ignoreCase: true,
+        keywords: [
+            'lexon',
+            'lex',
+            'clause',
+            'terms',
+            'contracts',
+            'may',
+            'pay',
+            'pays',
+            'appoints',
+            'into',
+            'to'
+        ],
+        typeKeywords: ['amount', 'person', 'key', 'time', 'date', 'asset', 'text'],
+        operators: [
+            'less',
+            'greater',
+            'equal',
+            'le',
+            'gt',
+            'or',
+            'and',
+            'add',
+            'added',
+            'subtract',
+            'subtracted',
+            'multiply',
+            'multiplied',
+            'times',
+            'divide',
+            'divided',
+            'is',
+            'be',
+            'certified'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // comment
+                [/^(\s*)(comment:?(?:\s.*|))$/, ['', 'comment']],
+                // special identifier cases
+                [
+                    /"/,
+                    {
+                        token: 'identifier.quote',
+                        bracket: '@open',
+                        next: '@quoted_identifier'
+                    }
+                ],
+                [
+                    'LEX$',
+                    {
+                        token: 'keyword',
+                        bracket: '@open',
+                        next: '@identifier_until_period'
+                    }
+                ],
+                ['LEXON', { token: 'keyword', bracket: '@open', next: '@semver' }],
+                [
+                    ':',
+                    {
+                        token: 'delimiter',
+                        bracket: '@open',
+                        next: '@identifier_until_period'
+                    }
+                ],
+                // identifiers and keywords
+                [
+                    /[a-z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@operators': 'operator',
+                            '@typeKeywords': 'keyword.type',
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d*\.\d*\.\d*/, 'number.semver'],
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F]+/, 'number.hex'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter']
+            ],
+            quoted_identifier: [
+                [/[^\\"]+/, 'identifier'],
+                [/"/, { token: 'identifier.quote', bracket: '@close', next: '@pop' }]
+            ],
+            space_identifier_until_period: [
+                [':', 'delimiter'],
+                [' ', { token: 'white', next: '@identifier_rest' }]
+            ],
+            identifier_until_period: [
+                { include: '@whitespace' },
+                [':', { token: 'delimiter', next: '@identifier_rest' }],
+                [/[^\\.]+/, 'identifier'],
+                [/\./, { token: 'delimiter', bracket: '@close', next: '@pop' }]
+            ],
+            identifier_rest: [
+                [/[^\\.]+/, 'identifier'],
+                [/\./, { token: 'delimiter', bracket: '@close', next: '@pop' }]
+            ],
+            semver: [
+                { include: '@whitespace' },
+                [':', 'delimiter'],
+                [/\d*\.\d*\.\d*/, { token: 'number.semver', bracket: '@close', next: '@pop' }]
+            ],
+            whitespace: [[/[ \t\r\n]+/, 'white']]
+        }
+    };
+});
+

+ 232 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/liquid/liquid.js

@@ -0,0 +1,232 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/liquid/liquid',["require", "exports", "../fillers/monaco-editor-core"], function (require, exports, monaco_editor_core_1) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    var EMPTY_ELEMENTS = [
+        'area',
+        'base',
+        'br',
+        'col',
+        'embed',
+        'hr',
+        'img',
+        'input',
+        'keygen',
+        'link',
+        'menuitem',
+        'meta',
+        'param',
+        'source',
+        'track',
+        'wbr'
+    ];
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
+        brackets: [
+            ['<!--', '-->'],
+            ['<', '>'],
+            ['{{', '}}'],
+            ['{%', '%}'],
+            ['{', '}'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '%', close: '%' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '<', close: '>' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        onEnterRules: [
+            {
+                beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
+                afterText: /^<\/(\w[\w\d]*)\s*>$/i,
+                action: {
+                    indentAction: monaco_editor_core_1.languages.IndentAction.IndentOutdent
+                }
+            },
+            {
+                beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
+                action: { indentAction: monaco_editor_core_1.languages.IndentAction.Indent }
+            }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '',
+        builtinTags: [
+            'if',
+            'else',
+            'elseif',
+            'endif',
+            'render',
+            'assign',
+            'capture',
+            'endcapture',
+            'case',
+            'endcase',
+            'comment',
+            'endcomment',
+            'cycle',
+            'decrement',
+            'for',
+            'endfor',
+            'include',
+            'increment',
+            'layout',
+            'raw',
+            'endraw',
+            'render',
+            'tablerow',
+            'endtablerow',
+            'unless',
+            'endunless'
+        ],
+        builtinFilters: [
+            'abs',
+            'append',
+            'at_least',
+            'at_most',
+            'capitalize',
+            'ceil',
+            'compact',
+            'date',
+            'default',
+            'divided_by',
+            'downcase',
+            'escape',
+            'escape_once',
+            'first',
+            'floor',
+            'join',
+            'json',
+            'last',
+            'lstrip',
+            'map',
+            'minus',
+            'modulo',
+            'newline_to_br',
+            'plus',
+            'prepend',
+            'remove',
+            'remove_first',
+            'replace',
+            'replace_first',
+            'reverse',
+            'round',
+            'rstrip',
+            'size',
+            'slice',
+            'sort',
+            'sort_natural',
+            'split',
+            'strip',
+            'strip_html',
+            'strip_newlines',
+            'times',
+            'truncate',
+            'truncatewords',
+            'uniq',
+            'upcase',
+            'url_decode',
+            'url_encode',
+            'where'
+        ],
+        constants: ['true', 'false'],
+        operators: ['==', '!=', '>', '<', '>=', '<='],
+        symbol: /[=><!]+/,
+        identifier: /[a-zA-Z_][\w]*/,
+        tokenizer: {
+            root: [
+                [/\{\%\s*comment\s*\%\}/, 'comment.start.liquid', '@comment'],
+                [/\{\{/, { token: '@rematch', switchTo: '@liquidState.root' }],
+                [/\{\%/, { token: '@rematch', switchTo: '@liquidState.root' }],
+                [/(<)([\w\-]+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
+                [/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
+                [/(<\/)([\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
+                [/</, 'delimiter.html'],
+                [/\{/, 'delimiter.html'],
+                [/[^<{]+/] // text
+            ],
+            comment: [
+                [/\{\%\s*endcomment\s*\%\}/, 'comment.end.liquid', '@pop'],
+                [/./, 'comment.content.liquid']
+            ],
+            otherTag: [
+                [
+                    /\{\{/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@liquidState.otherTag'
+                    }
+                ],
+                [
+                    /\{\%/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@liquidState.otherTag'
+                    }
+                ],
+                [/\/?>/, 'delimiter.html', '@pop'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/] // whitespace
+            ],
+            liquidState: [
+                [/\{\{/, 'delimiter.output.liquid'],
+                [/\}\}/, { token: 'delimiter.output.liquid', switchTo: '@$S2.$S3' }],
+                [/\{\%/, 'delimiter.tag.liquid'],
+                [/raw\s*\%\}/, 'delimiter.tag.liquid', '@liquidRaw'],
+                [/\%\}/, { token: 'delimiter.tag.liquid', switchTo: '@$S2.$S3' }],
+                { include: 'liquidRoot' }
+            ],
+            liquidRaw: [
+                [/^(?!\{\%\s*endraw\s*\%\}).+/],
+                [/\{\%/, 'delimiter.tag.liquid'],
+                [/@identifier/],
+                [/\%\}/, { token: 'delimiter.tag.liquid', next: '@root' }]
+            ],
+            liquidRoot: [
+                [/\d+(\.\d+)?/, 'number.liquid'],
+                [/"[^"]*"/, 'string.liquid'],
+                [/'[^']*'/, 'string.liquid'],
+                [/\s+/],
+                [
+                    /@symbol/,
+                    {
+                        cases: {
+                            '@operators': 'operator.liquid',
+                            '@default': ''
+                        }
+                    }
+                ],
+                [/\./],
+                [
+                    /@identifier/,
+                    {
+                        cases: {
+                            '@constants': 'keyword.liquid',
+                            '@builtinFilters': 'predefined.liquid',
+                            '@builtinTags': 'predefined.liquid',
+                            '@default': 'variable.liquid'
+                        }
+                    }
+                ],
+                [/[^}|%]/, 'variable.liquid']
+            ]
+        }
+    };
+});
+

+ 167 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/lua/lua.js

@@ -0,0 +1,167 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/lua/lua',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '--',
+            blockComment: ['--[[', ']]']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.lua',
+        keywords: [
+            'and',
+            'break',
+            'do',
+            'else',
+            'elseif',
+            'end',
+            'false',
+            'for',
+            'function',
+            'goto',
+            'if',
+            'in',
+            'local',
+            'nil',
+            'not',
+            'or',
+            'repeat',
+            'return',
+            'then',
+            'true',
+            'until',
+            'while'
+        ],
+        brackets: [
+            { token: 'delimiter.bracket', open: '{', close: '}' },
+            { token: 'delimiter.array', open: '[', close: ']' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' }
+        ],
+        operators: [
+            '+',
+            '-',
+            '*',
+            '/',
+            '%',
+            '^',
+            '#',
+            '==',
+            '~=',
+            '<=',
+            '>=',
+            '<',
+            '>',
+            '=',
+            ';',
+            ':',
+            ',',
+            '.',
+            '..',
+            '...'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // keys
+                [/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ['delimiter', '', 'key', '', 'delimiter']],
+                [/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ['@brackets', '', 'key', '', 'delimiter']],
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
+                [/\d+?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings: recover on non-terminated strings
+                [/"([^"\\]|\\.)*$/, 'string.invalid'],
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/"/, 'string', '@string."'],
+                [/'/, 'string', "@string.'"]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, ''],
+                [/--\[([=]*)\[/, 'comment', '@comment.$1'],
+                [/--.*$/, 'comment']
+            ],
+            comment: [
+                [/[^\]]+/, 'comment'],
+                [
+                    /\]([=]*)\]/,
+                    {
+                        cases: {
+                            '$1==$S2': { token: 'comment', next: '@pop' },
+                            '@default': 'comment'
+                        }
+                    }
+                ],
+                [/./, 'comment']
+            ],
+            string: [
+                [/[^\\"']+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ]
+        }
+    };
+});
+

+ 217 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/m3/m3.js

@@ -0,0 +1,217 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/m3/m3',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            blockComment: ['(*', '*)']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '[', close: ']' },
+            { open: '{', close: '}' },
+            { open: '(', close: ')' },
+            { open: '(*', close: '*)' },
+            { open: '<*', close: '*>' },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '"', close: '"', notIn: ['string', 'comment'] }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.m3',
+        brackets: [
+            { token: 'delimiter.curly', open: '{', close: '}' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' },
+            { token: 'delimiter.square', open: '[', close: ']' }
+        ],
+        keywords: [
+            'AND',
+            'ANY',
+            'ARRAY',
+            'AS',
+            'BEGIN',
+            'BITS',
+            'BRANDED',
+            'BY',
+            'CASE',
+            'CONST',
+            'DIV',
+            'DO',
+            'ELSE',
+            'ELSIF',
+            'END',
+            'EVAL',
+            'EXCEPT',
+            'EXCEPTION',
+            'EXIT',
+            'EXPORTS',
+            'FINALLY',
+            'FOR',
+            'FROM',
+            'GENERIC',
+            'IF',
+            'IMPORT',
+            'IN',
+            'INTERFACE',
+            'LOCK',
+            'LOOP',
+            'METHODS',
+            'MOD',
+            'MODULE',
+            'NOT',
+            'OBJECT',
+            'OF',
+            'OR',
+            'OVERRIDES',
+            'PROCEDURE',
+            'RAISE',
+            'RAISES',
+            'READONLY',
+            'RECORD',
+            'REF',
+            'REPEAT',
+            'RETURN',
+            'REVEAL',
+            'SET',
+            'THEN',
+            'TO',
+            'TRY',
+            'TYPE',
+            'TYPECASE',
+            'UNSAFE',
+            'UNTIL',
+            'UNTRACED',
+            'VALUE',
+            'VAR',
+            'WHILE',
+            'WITH'
+        ],
+        reservedConstNames: [
+            'ABS',
+            'ADR',
+            'ADRSIZE',
+            'BITSIZE',
+            'BYTESIZE',
+            'CEILING',
+            'DEC',
+            'DISPOSE',
+            'FALSE',
+            'FIRST',
+            'FLOAT',
+            'FLOOR',
+            'INC',
+            'ISTYPE',
+            'LAST',
+            'LOOPHOLE',
+            'MAX',
+            'MIN',
+            'NARROW',
+            'NEW',
+            'NIL',
+            'NUMBER',
+            'ORD',
+            'ROUND',
+            'SUBARRAY',
+            'TRUE',
+            'TRUNC',
+            'TYPECODE',
+            'VAL'
+        ],
+        reservedTypeNames: [
+            'ADDRESS',
+            'ANY',
+            'BOOLEAN',
+            'CARDINAL',
+            'CHAR',
+            'EXTENDED',
+            'INTEGER',
+            'LONGCARD',
+            'LONGINT',
+            'LONGREAL',
+            'MUTEX',
+            'NULL',
+            'REAL',
+            'REFANY',
+            'ROOT',
+            'TEXT'
+        ],
+        operators: ['+', '-', '*', '/', '&', '^', '.'],
+        relations: ['=', '#', '<', '<=', '>', '>=', '<:', ':'],
+        delimiters: ['|', '..', '=>', ',', ';', ':='],
+        symbols: /[>=<#.,:;+\-*/&^]+/,
+        escapes: /\\(?:[\\fnrt"']|[0-7]{3})/,
+        tokenizer: {
+            root: [
+                // Identifiers and keywords
+                [/_\w*/, 'invalid'],
+                [
+                    /[a-zA-Z][a-zA-Z0-9_]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@reservedConstNames': { token: 'constant.reserved.$0' },
+                            '@reservedTypeNames': { token: 'type.reserved.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // Whitespace
+                { include: '@whitespace' },
+                [/[{}()\[\]]/, '@brackets'],
+                // Integer- and real literals
+                [/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/, 'number.float'],
+                [/[0-9]+(?:\_[0-9a-fA-F]+)?L?/, 'number'],
+                // Operators, relations, and delimiters
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'operators',
+                            '@relations': 'operators',
+                            '@delimiters': 'delimiter',
+                            '@default': 'invalid'
+                        }
+                    }
+                ],
+                // Character literals
+                [/'[^\\']'/, 'string.char'],
+                [/(')(@escapes)(')/, ['string.char', 'string.escape', 'string.char']],
+                [/'/, 'invalid'],
+                // Text literals
+                [/"([^"\\]|\\.)*$/, 'invalid'],
+                [/"/, 'string.text', '@text']
+            ],
+            text: [
+                [/[^\\"]+/, 'string.text'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'invalid'],
+                [/"/, 'string.text', '@pop']
+            ],
+            comment: [
+                [/\(\*/, 'comment', '@push'],
+                [/\*\)/, 'comment', '@pop'],
+                [/./, 'comment']
+            ],
+            pragma: [
+                [/<\*/, 'keyword.pragma', '@push'],
+                [/\*>/, 'keyword.pragma', '@pop'],
+                [/./, 'keyword.pragma']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, 'white'],
+                [/\(\*/, 'comment', '@comment'],
+                [/<\*/, 'keyword.pragma', '@pragma']
+            ]
+        }
+    };
+});
+

+ 229 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/markdown/markdown.js

@@ -0,0 +1,229 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/markdown/markdown',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            blockComment: ['<!--', '-->']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>', notIn: ['string'] }
+        ],
+        surroundingPairs: [
+            { open: '(', close: ')' },
+            { open: '[', close: ']' },
+            { open: '`', close: '`' }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*<!--\\s*#?region\\b.*-->'),
+                end: new RegExp('^\\s*<!--\\s*#?endregion\\b.*-->')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.md',
+        // escape codes
+        control: /[\\`*_\[\]{}()#+\-\.!]/,
+        noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
+        escapes: /\\(?:@control)/,
+        // escape codes for javascript/CSS strings
+        jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
+        // non matched elements
+        empty: [
+            'area',
+            'base',
+            'basefont',
+            'br',
+            'col',
+            'frame',
+            'hr',
+            'img',
+            'input',
+            'isindex',
+            'link',
+            'meta',
+            'param'
+        ],
+        tokenizer: {
+            root: [
+                // markdown tables
+                [/^\s*\|/, '@rematch', '@table_header'],
+                // headers (with #)
+                [/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ['white', 'keyword', 'keyword', 'keyword']],
+                // headers (with =)
+                [/^\s*(=+|\-+)\s*$/, 'keyword'],
+                // headers (with ***)
+                [/^\s*((\*[ ]?)+)\s*$/, 'meta.separator'],
+                // quote
+                [/^\s*>+/, 'comment'],
+                // list (starting with * or number)
+                [/^\s*([\*\-+:]|\d+\.)\s/, 'keyword'],
+                // code block (4 spaces indent)
+                [/^(\t|[ ]{4})[^ ].*$/, 'string'],
+                // code block (3 tilde)
+                [/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: 'string', next: '@codeblock' }],
+                // github style code blocks (with backticks and language)
+                [
+                    /^\s*```\s*((?:\w|[\/\-#])+).*$/,
+                    { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }
+                ],
+                // github style code blocks (with backticks but no language)
+                [/^\s*```\s*$/, { token: 'string', next: '@codeblock' }],
+                // markup within lines
+                { include: '@linecontent' }
+            ],
+            table_header: [
+                { include: '@table_common' },
+                [/[^\|]+/, 'keyword.table.header'] // table header
+            ],
+            table_body: [{ include: '@table_common' }, { include: '@linecontent' }],
+            table_common: [
+                [/\s*[\-:]+\s*/, { token: 'keyword', switchTo: 'table_body' }],
+                [/^\s*\|/, 'keyword.table.left'],
+                [/^\s*[^\|]/, '@rematch', '@pop'],
+                [/^\s*$/, '@rematch', '@pop'],
+                [
+                    /\|/,
+                    {
+                        cases: {
+                            '@eos': 'keyword.table.right',
+                            '@default': 'keyword.table.middle' // inner |
+                        }
+                    }
+                ]
+            ],
+            codeblock: [
+                [/^\s*~~~\s*$/, { token: 'string', next: '@pop' }],
+                [/^\s*```\s*$/, { token: 'string', next: '@pop' }],
+                [/.*$/, 'variable.source']
+            ],
+            // github style code blocks
+            codeblockgh: [
+                [/```\s*$/, { token: 'string', next: '@pop', nextEmbedded: '@pop' }],
+                [/[^`]+/, 'variable.source']
+            ],
+            linecontent: [
+                // escapes
+                [/&\w+;/, 'string.escape'],
+                [/@escapes/, 'escape'],
+                // various markup
+                [/\b__([^\\_]|@escapes|_(?!_))+__\b/, 'strong'],
+                [/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/, 'strong'],
+                [/\b_[^_]+_\b/, 'emphasis'],
+                [/\*([^\\*]|@escapes)+\*/, 'emphasis'],
+                [/`([^\\`]|@escapes)+`/, 'variable'],
+                // links
+                [/\{+[^}]+\}+/, 'string.target'],
+                [/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ['string.link', '', 'string.link']],
+                [/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, 'string.link'],
+                // or html
+                { include: 'html' }
+            ],
+            // Note: it is tempting to rather switch to the real HTML mode instead of building our own here
+            // but currently there is a limitation in Monarch that prevents us from doing it: The opening
+            // '<' would start the HTML mode, however there is no way to jump 1 character back to let the
+            // HTML mode also tokenize the opening angle bracket. Thus, even though we could jump to HTML,
+            // we cannot correctly tokenize it in that mode yet.
+            html: [
+                // html tags
+                [/<(\w+)\/>/, 'tag'],
+                [
+                    /<(\w+)/,
+                    {
+                        cases: {
+                            '@empty': { token: 'tag', next: '@tag.$1' },
+                            '@default': { token: 'tag', next: '@tag.$1' }
+                        }
+                    }
+                ],
+                [/<\/(\w+)\s*>/, { token: 'tag' }],
+                [/<!--/, 'comment', '@comment']
+            ],
+            comment: [
+                [/[^<\-]+/, 'comment.content'],
+                [/-->/, 'comment', '@pop'],
+                [/<!--/, 'comment.content.invalid'],
+                [/[<\-]/, 'comment.content']
+            ],
+            // Almost full HTML tag matching, complete with embedded scripts & styles
+            tag: [
+                [/[ \t\r\n]+/, 'white'],
+                [
+                    /(type)(\s*=\s*)(")([^"]+)(")/,
+                    [
+                        'attribute.name.html',
+                        'delimiter.html',
+                        'string.html',
+                        { token: 'string.html', switchTo: '@tag.$S2.$4' },
+                        'string.html'
+                    ]
+                ],
+                [
+                    /(type)(\s*=\s*)(')([^']+)(')/,
+                    [
+                        'attribute.name.html',
+                        'delimiter.html',
+                        'string.html',
+                        { token: 'string.html', switchTo: '@tag.$S2.$4' },
+                        'string.html'
+                    ]
+                ],
+                [/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name.html', 'delimiter.html', 'string.html']],
+                [/\w+/, 'attribute.name.html'],
+                [/\/>/, 'tag', '@pop'],
+                [
+                    />/,
+                    {
+                        cases: {
+                            '$S2==style': {
+                                token: 'tag',
+                                switchTo: 'embeddedStyle',
+                                nextEmbedded: 'text/css'
+                            },
+                            '$S2==script': {
+                                cases: {
+                                    $S3: {
+                                        token: 'tag',
+                                        switchTo: 'embeddedScript',
+                                        nextEmbedded: '$S3'
+                                    },
+                                    '@default': {
+                                        token: 'tag',
+                                        switchTo: 'embeddedScript',
+                                        nextEmbedded: 'text/javascript'
+                                    }
+                                }
+                            },
+                            '@default': { token: 'tag', next: '@pop' }
+                        }
+                    }
+                ]
+            ],
+            embeddedStyle: [
+                [/[^<]+/, ''],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
+                [/</, '']
+            ],
+            embeddedScript: [
+                [/[^<]+/, ''],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
+                [/</, '']
+            ]
+        }
+    };
+});
+

+ 205 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/mips/mips.js

@@ -0,0 +1,205 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/mips/mips',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            blockComment: ['###', '###'],
+            lineComment: '#'
+        },
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*#region\\b'),
+                end: new RegExp('^\\s*#endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        ignoreCase: false,
+        tokenPostfix: '.mips',
+        regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
+        keywords: [
+            '.data',
+            '.text',
+            'syscall',
+            'trap',
+            'add',
+            'addu',
+            'addi',
+            'addiu',
+            'and',
+            'andi',
+            'div',
+            'divu',
+            'mult',
+            'multu',
+            'nor',
+            'or',
+            'ori',
+            'sll',
+            'slv',
+            'sra',
+            'srav',
+            'srl',
+            'srlv',
+            'sub',
+            'subu',
+            'xor',
+            'xori',
+            'lhi',
+            'lho',
+            'lhi',
+            'llo',
+            'slt',
+            'slti',
+            'sltu',
+            'sltiu',
+            'beq',
+            'bgtz',
+            'blez',
+            'bne',
+            'j',
+            'jal',
+            'jalr',
+            'jr',
+            'lb',
+            'lbu',
+            'lh',
+            'lhu',
+            'lw',
+            'li',
+            'la',
+            'sb',
+            'sh',
+            'sw',
+            'mfhi',
+            'mflo',
+            'mthi',
+            'mtlo',
+            'move'
+        ],
+        // we include these common regular expressions
+        symbols: /[\.,\:]+/,
+        escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [/\$[a-zA-Z_]\w*/, 'variable.predefined'],
+                [
+                    /[.a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            this: 'variable.predefined',
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': ''
+                        }
+                    }
+                ],
+                // whitespace
+                [/[ \t\r\n]+/, ''],
+                // Comments
+                [/#.*$/, 'comment'],
+                // regular expressions
+                ['///', { token: 'regexp', next: '@hereregexp' }],
+                [/^(\s*)(@regEx)/, ['', 'regexp']],
+                [/(\,)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                [/(\:)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
+                // delimiters
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d+[eE]([\-+]?\d+)?/, 'number.float'],
+                [/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F]+/, 'number.hex'],
+                [/0[0-7]+(?!\d)/, 'number.octal'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[,.]/, 'delimiter'],
+                // strings:
+                [/"""/, 'string', '@herestring."""'],
+                [/'''/, 'string', "@herestring.'''"],
+                [
+                    /"/,
+                    {
+                        cases: {
+                            '@eos': 'string',
+                            '@default': { token: 'string', next: '@string."' }
+                        }
+                    }
+                ],
+                [
+                    /'/,
+                    {
+                        cases: {
+                            '@eos': 'string',
+                            '@default': { token: 'string', next: "@string.'" }
+                        }
+                    }
+                ]
+            ],
+            string: [
+                [/[^"'\#\\]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\./, 'string.escape.invalid'],
+                [/\./, 'string.escape.invalid'],
+                [
+                    /#{/,
+                    {
+                        cases: {
+                            '$S2=="': {
+                                token: 'string',
+                                next: 'root.interpolatedstring'
+                            },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/#/, 'string']
+            ],
+            herestring: [
+                [
+                    /("""|''')/,
+                    {
+                        cases: {
+                            '$1==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/[^#\\'"]+/, 'string'],
+                [/['"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\./, 'string.escape.invalid'],
+                [/#{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
+                [/#/, 'string']
+            ],
+            comment: [
+                [/[^#]+/, 'comment'],
+                [/#/, 'comment']
+            ],
+            hereregexp: [
+                [/[^\\\/#]+/, 'regexp'],
+                [/\\./, 'regexp'],
+                [/#.*$/, 'comment'],
+                ['///[igm]*', { token: 'regexp', next: '@pop' }],
+                [/\//, 'regexp']
+            ]
+        }
+    };
+});
+

+ 382 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/msdax/msdax.js

@@ -0,0 +1,382 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/msdax/msdax',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['[', ']'],
+            ['(', ')'],
+            ['{', '}']
+        ],
+        autoClosingPairs: [
+            { open: '"', close: '"', notIn: ['string', 'comment'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '[', close: ']', notIn: ['string', 'comment'] },
+            { open: '(', close: ')', notIn: ['string', 'comment'] },
+            { open: '{', close: '}', notIn: ['string', 'comment'] }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.msdax',
+        ignoreCase: true,
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '{', close: '}', token: 'delimiter.brackets' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        keywords: [
+            // Query keywords
+            'VAR',
+            'RETURN',
+            'NOT',
+            'EVALUATE',
+            'DATATABLE',
+            'ORDER',
+            'BY',
+            'START',
+            'AT',
+            'DEFINE',
+            'MEASURE',
+            'ASC',
+            'DESC',
+            'IN',
+            // Datatable types
+            'BOOLEAN',
+            'DOUBLE',
+            'INTEGER',
+            'DATETIME',
+            'CURRENCY',
+            'STRING'
+        ],
+        functions: [
+            // Relational
+            'CLOSINGBALANCEMONTH',
+            'CLOSINGBALANCEQUARTER',
+            'CLOSINGBALANCEYEAR',
+            'DATEADD',
+            'DATESBETWEEN',
+            'DATESINPERIOD',
+            'DATESMTD',
+            'DATESQTD',
+            'DATESYTD',
+            'ENDOFMONTH',
+            'ENDOFQUARTER',
+            'ENDOFYEAR',
+            'FIRSTDATE',
+            'FIRSTNONBLANK',
+            'LASTDATE',
+            'LASTNONBLANK',
+            'NEXTDAY',
+            'NEXTMONTH',
+            'NEXTQUARTER',
+            'NEXTYEAR',
+            'OPENINGBALANCEMONTH',
+            'OPENINGBALANCEQUARTER',
+            'OPENINGBALANCEYEAR',
+            'PARALLELPERIOD',
+            'PREVIOUSDAY',
+            'PREVIOUSMONTH',
+            'PREVIOUSQUARTER',
+            'PREVIOUSYEAR',
+            'SAMEPERIODLASTYEAR',
+            'STARTOFMONTH',
+            'STARTOFQUARTER',
+            'STARTOFYEAR',
+            'TOTALMTD',
+            'TOTALQTD',
+            'TOTALYTD',
+            'ADDCOLUMNS',
+            'ADDMISSINGITEMS',
+            'ALL',
+            'ALLEXCEPT',
+            'ALLNOBLANKROW',
+            'ALLSELECTED',
+            'CALCULATE',
+            'CALCULATETABLE',
+            'CALENDAR',
+            'CALENDARAUTO',
+            'CROSSFILTER',
+            'CROSSJOIN',
+            'CURRENTGROUP',
+            'DATATABLE',
+            'DETAILROWS',
+            'DISTINCT',
+            'EARLIER',
+            'EARLIEST',
+            'EXCEPT',
+            'FILTER',
+            'FILTERS',
+            'GENERATE',
+            'GENERATEALL',
+            'GROUPBY',
+            'IGNORE',
+            'INTERSECT',
+            'ISONORAFTER',
+            'KEEPFILTERS',
+            'LOOKUPVALUE',
+            'NATURALINNERJOIN',
+            'NATURALLEFTOUTERJOIN',
+            'RELATED',
+            'RELATEDTABLE',
+            'ROLLUP',
+            'ROLLUPADDISSUBTOTAL',
+            'ROLLUPGROUP',
+            'ROLLUPISSUBTOTAL',
+            'ROW',
+            'SAMPLE',
+            'SELECTCOLUMNS',
+            'SUBSTITUTEWITHINDEX',
+            'SUMMARIZE',
+            'SUMMARIZECOLUMNS',
+            'TOPN',
+            'TREATAS',
+            'UNION',
+            'USERELATIONSHIP',
+            'VALUES',
+            'SUM',
+            'SUMX',
+            'PATH',
+            'PATHCONTAINS',
+            'PATHITEM',
+            'PATHITEMREVERSE',
+            'PATHLENGTH',
+            'AVERAGE',
+            'AVERAGEA',
+            'AVERAGEX',
+            'COUNT',
+            'COUNTA',
+            'COUNTAX',
+            'COUNTBLANK',
+            'COUNTROWS',
+            'COUNTX',
+            'DISTINCTCOUNT',
+            'DIVIDE',
+            'GEOMEAN',
+            'GEOMEANX',
+            'MAX',
+            'MAXA',
+            'MAXX',
+            'MEDIAN',
+            'MEDIANX',
+            'MIN',
+            'MINA',
+            'MINX',
+            'PERCENTILE.EXC',
+            'PERCENTILE.INC',
+            'PERCENTILEX.EXC',
+            'PERCENTILEX.INC',
+            'PRODUCT',
+            'PRODUCTX',
+            'RANK.EQ',
+            'RANKX',
+            'STDEV.P',
+            'STDEV.S',
+            'STDEVX.P',
+            'STDEVX.S',
+            'VAR.P',
+            'VAR.S',
+            'VARX.P',
+            'VARX.S',
+            'XIRR',
+            'XNPV',
+            // Scalar
+            'DATE',
+            'DATEDIFF',
+            'DATEVALUE',
+            'DAY',
+            'EDATE',
+            'EOMONTH',
+            'HOUR',
+            'MINUTE',
+            'MONTH',
+            'NOW',
+            'SECOND',
+            'TIME',
+            'TIMEVALUE',
+            'TODAY',
+            'WEEKDAY',
+            'WEEKNUM',
+            'YEAR',
+            'YEARFRAC',
+            'CONTAINS',
+            'CONTAINSROW',
+            'CUSTOMDATA',
+            'ERROR',
+            'HASONEFILTER',
+            'HASONEVALUE',
+            'ISBLANK',
+            'ISCROSSFILTERED',
+            'ISEMPTY',
+            'ISERROR',
+            'ISEVEN',
+            'ISFILTERED',
+            'ISLOGICAL',
+            'ISNONTEXT',
+            'ISNUMBER',
+            'ISODD',
+            'ISSUBTOTAL',
+            'ISTEXT',
+            'USERNAME',
+            'USERPRINCIPALNAME',
+            'AND',
+            'FALSE',
+            'IF',
+            'IFERROR',
+            'NOT',
+            'OR',
+            'SWITCH',
+            'TRUE',
+            'ABS',
+            'ACOS',
+            'ACOSH',
+            'ACOT',
+            'ACOTH',
+            'ASIN',
+            'ASINH',
+            'ATAN',
+            'ATANH',
+            'BETA.DIST',
+            'BETA.INV',
+            'CEILING',
+            'CHISQ.DIST',
+            'CHISQ.DIST.RT',
+            'CHISQ.INV',
+            'CHISQ.INV.RT',
+            'COMBIN',
+            'COMBINA',
+            'CONFIDENCE.NORM',
+            'CONFIDENCE.T',
+            'COS',
+            'COSH',
+            'COT',
+            'COTH',
+            'CURRENCY',
+            'DEGREES',
+            'EVEN',
+            'EXP',
+            'EXPON.DIST',
+            'FACT',
+            'FLOOR',
+            'GCD',
+            'INT',
+            'ISO.CEILING',
+            'LCM',
+            'LN',
+            'LOG',
+            'LOG10',
+            'MOD',
+            'MROUND',
+            'ODD',
+            'PERMUT',
+            'PI',
+            'POISSON.DIST',
+            'POWER',
+            'QUOTIENT',
+            'RADIANS',
+            'RAND',
+            'RANDBETWEEN',
+            'ROUND',
+            'ROUNDDOWN',
+            'ROUNDUP',
+            'SIGN',
+            'SIN',
+            'SINH',
+            'SQRT',
+            'SQRTPI',
+            'TAN',
+            'TANH',
+            'TRUNC',
+            'BLANK',
+            'CONCATENATE',
+            'CONCATENATEX',
+            'EXACT',
+            'FIND',
+            'FIXED',
+            'FORMAT',
+            'LEFT',
+            'LEN',
+            'LOWER',
+            'MID',
+            'REPLACE',
+            'REPT',
+            'RIGHT',
+            'SEARCH',
+            'SUBSTITUTE',
+            'TRIM',
+            'UNICHAR',
+            'UNICODE',
+            'UPPER',
+            'VALUE'
+        ],
+        tokenizer: {
+            root: [
+                { include: '@comments' },
+                { include: '@whitespace' },
+                { include: '@numbers' },
+                { include: '@strings' },
+                { include: '@complexIdentifiers' },
+                [/[;,.]/, 'delimiter'],
+                [/[({})]/, '@brackets'],
+                [
+                    /[a-z_][a-zA-Z0-9_]*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@functions': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/[<>=!%&+\-*/|~^]/, 'operator']
+            ],
+            whitespace: [[/\s+/, 'white']],
+            comments: [
+                [/\/\/+.*/, 'comment'],
+                [/\/\*/, { token: 'comment.quote', next: '@comment' }]
+            ],
+            comment: [
+                [/[^*/]+/, 'comment'],
+                [/\*\//, { token: 'comment.quote', next: '@pop' }],
+                [/./, 'comment']
+            ],
+            numbers: [
+                [/0[xX][0-9a-fA-F]*/, 'number'],
+                [/[$][+-]*\d*(\.\d*)?/, 'number'],
+                [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
+            ],
+            strings: [
+                [/N"/, { token: 'string', next: '@string' }],
+                [/"/, { token: 'string', next: '@string' }]
+            ],
+            string: [
+                [/[^"]+/, 'string'],
+                [/""/, 'string'],
+                [/"/, { token: 'string', next: '@pop' }]
+            ],
+            complexIdentifiers: [
+                [/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],
+                [/'/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
+            ],
+            bracketedIdentifier: [
+                [/[^\]]+/, 'identifier'],
+                [/]]/, 'identifier'],
+                [/]/, { token: 'identifier.quote', next: '@pop' }]
+            ],
+            quotedIdentifier: [
+                [/[^']+/, 'identifier'],
+                [/''/, 'identifier'],
+                [/'/, { token: 'identifier.quote', next: '@pop' }]
+            ]
+        }
+    };
+});
+

+ 824 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/mysql/mysql.js

@@ -0,0 +1,824 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/mysql/mysql',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '--',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.sql',
+        ignoreCase: true,
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        keywords: [
+            // This list is generated using `keywords.js`
+            'ACCESSIBLE',
+            'ADD',
+            'ALL',
+            'ALTER',
+            'ANALYZE',
+            'AND',
+            'AS',
+            'ASC',
+            'ASENSITIVE',
+            'BEFORE',
+            'BETWEEN',
+            'BIGINT',
+            'BINARY',
+            'BLOB',
+            'BOTH',
+            'BY',
+            'CALL',
+            'CASCADE',
+            'CASE',
+            'CHANGE',
+            'CHAR',
+            'CHARACTER',
+            'CHECK',
+            'COLLATE',
+            'COLUMN',
+            'CONDITION',
+            'CONSTRAINT',
+            'CONTINUE',
+            'CONVERT',
+            'CREATE',
+            'CROSS',
+            'CUBE',
+            'CUME_DIST',
+            'CURRENT_DATE',
+            'CURRENT_TIME',
+            'CURRENT_TIMESTAMP',
+            'CURRENT_USER',
+            'CURSOR',
+            'DATABASE',
+            'DATABASES',
+            'DAY_HOUR',
+            'DAY_MICROSECOND',
+            'DAY_MINUTE',
+            'DAY_SECOND',
+            'DEC',
+            'DECIMAL',
+            'DECLARE',
+            'DEFAULT',
+            'DELAYED',
+            'DELETE',
+            'DENSE_RANK',
+            'DESC',
+            'DESCRIBE',
+            'DETERMINISTIC',
+            'DISTINCT',
+            'DISTINCTROW',
+            'DIV',
+            'DOUBLE',
+            'DROP',
+            'DUAL',
+            'EACH',
+            'ELSE',
+            'ELSEIF',
+            'EMPTY',
+            'ENCLOSED',
+            'ESCAPED',
+            'EXCEPT',
+            'EXISTS',
+            'EXIT',
+            'EXPLAIN',
+            'FALSE',
+            'FETCH',
+            'FIRST_VALUE',
+            'FLOAT',
+            'FLOAT4',
+            'FLOAT8',
+            'FOR',
+            'FORCE',
+            'FOREIGN',
+            'FROM',
+            'FULLTEXT',
+            'FUNCTION',
+            'GENERATED',
+            'GET',
+            'GRANT',
+            'GROUP',
+            'GROUPING',
+            'GROUPS',
+            'HAVING',
+            'HIGH_PRIORITY',
+            'HOUR_MICROSECOND',
+            'HOUR_MINUTE',
+            'HOUR_SECOND',
+            'IF',
+            'IGNORE',
+            'IN',
+            'INDEX',
+            'INFILE',
+            'INNER',
+            'INOUT',
+            'INSENSITIVE',
+            'INSERT',
+            'INT',
+            'INT1',
+            'INT2',
+            'INT3',
+            'INT4',
+            'INT8',
+            'INTEGER',
+            'INTERVAL',
+            'INTO',
+            'IO_AFTER_GTIDS',
+            'IO_BEFORE_GTIDS',
+            'IS',
+            'ITERATE',
+            'JOIN',
+            'JSON_TABLE',
+            'KEY',
+            'KEYS',
+            'KILL',
+            'LAG',
+            'LAST_VALUE',
+            'LATERAL',
+            'LEAD',
+            'LEADING',
+            'LEAVE',
+            'LEFT',
+            'LIKE',
+            'LIMIT',
+            'LINEAR',
+            'LINES',
+            'LOAD',
+            'LOCALTIME',
+            'LOCALTIMESTAMP',
+            'LOCK',
+            'LONG',
+            'LONGBLOB',
+            'LONGTEXT',
+            'LOOP',
+            'LOW_PRIORITY',
+            'MASTER_BIND',
+            'MASTER_SSL_VERIFY_SERVER_CERT',
+            'MATCH',
+            'MAXVALUE',
+            'MEDIUMBLOB',
+            'MEDIUMINT',
+            'MEDIUMTEXT',
+            'MIDDLEINT',
+            'MINUTE_MICROSECOND',
+            'MINUTE_SECOND',
+            'MOD',
+            'MODIFIES',
+            'NATURAL',
+            'NOT',
+            'NO_WRITE_TO_BINLOG',
+            'NTH_VALUE',
+            'NTILE',
+            'NULL',
+            'NUMERIC',
+            'OF',
+            'ON',
+            'OPTIMIZE',
+            'OPTIMIZER_COSTS',
+            'OPTION',
+            'OPTIONALLY',
+            'OR',
+            'ORDER',
+            'OUT',
+            'OUTER',
+            'OUTFILE',
+            'OVER',
+            'PARTITION',
+            'PERCENT_RANK',
+            'PRECISION',
+            'PRIMARY',
+            'PROCEDURE',
+            'PURGE',
+            'RANGE',
+            'RANK',
+            'READ',
+            'READS',
+            'READ_WRITE',
+            'REAL',
+            'RECURSIVE',
+            'REFERENCES',
+            'REGEXP',
+            'RELEASE',
+            'RENAME',
+            'REPEAT',
+            'REPLACE',
+            'REQUIRE',
+            'RESIGNAL',
+            'RESTRICT',
+            'RETURN',
+            'REVOKE',
+            'RIGHT',
+            'RLIKE',
+            'ROW',
+            'ROWS',
+            'ROW_NUMBER',
+            'SCHEMA',
+            'SCHEMAS',
+            'SECOND_MICROSECOND',
+            'SELECT',
+            'SENSITIVE',
+            'SEPARATOR',
+            'SET',
+            'SHOW',
+            'SIGNAL',
+            'SMALLINT',
+            'SPATIAL',
+            'SPECIFIC',
+            'SQL',
+            'SQLEXCEPTION',
+            'SQLSTATE',
+            'SQLWARNING',
+            'SQL_BIG_RESULT',
+            'SQL_CALC_FOUND_ROWS',
+            'SQL_SMALL_RESULT',
+            'SSL',
+            'STARTING',
+            'STORED',
+            'STRAIGHT_JOIN',
+            'SYSTEM',
+            'TABLE',
+            'TERMINATED',
+            'THEN',
+            'TINYBLOB',
+            'TINYINT',
+            'TINYTEXT',
+            'TO',
+            'TRAILING',
+            'TRIGGER',
+            'TRUE',
+            'UNDO',
+            'UNION',
+            'UNIQUE',
+            'UNLOCK',
+            'UNSIGNED',
+            'UPDATE',
+            'USAGE',
+            'USE',
+            'USING',
+            'UTC_DATE',
+            'UTC_TIME',
+            'UTC_TIMESTAMP',
+            'VALUES',
+            'VARBINARY',
+            'VARCHAR',
+            'VARCHARACTER',
+            'VARYING',
+            'VIRTUAL',
+            'WHEN',
+            'WHERE',
+            'WHILE',
+            'WINDOW',
+            'WITH',
+            'WRITE',
+            'XOR',
+            'YEAR_MONTH',
+            'ZEROFILL'
+        ],
+        operators: [
+            'AND',
+            'BETWEEN',
+            'IN',
+            'LIKE',
+            'NOT',
+            'OR',
+            'IS',
+            'NULL',
+            'INTERSECT',
+            'UNION',
+            'INNER',
+            'JOIN',
+            'LEFT',
+            'OUTER',
+            'RIGHT'
+        ],
+        builtinFunctions: [
+            'ABS',
+            'ACOS',
+            'ADDDATE',
+            'ADDTIME',
+            'AES_DECRYPT',
+            'AES_ENCRYPT',
+            'ANY_VALUE',
+            'Area',
+            'AsBinary',
+            'AsWKB',
+            'ASCII',
+            'ASIN',
+            'AsText',
+            'AsWKT',
+            'ASYMMETRIC_DECRYPT',
+            'ASYMMETRIC_DERIVE',
+            'ASYMMETRIC_ENCRYPT',
+            'ASYMMETRIC_SIGN',
+            'ASYMMETRIC_VERIFY',
+            'ATAN',
+            'ATAN2',
+            'ATAN',
+            'AVG',
+            'BENCHMARK',
+            'BIN',
+            'BIT_AND',
+            'BIT_COUNT',
+            'BIT_LENGTH',
+            'BIT_OR',
+            'BIT_XOR',
+            'Buffer',
+            'CAST',
+            'CEIL',
+            'CEILING',
+            'Centroid',
+            'CHAR',
+            'CHAR_LENGTH',
+            'CHARACTER_LENGTH',
+            'CHARSET',
+            'COALESCE',
+            'COERCIBILITY',
+            'COLLATION',
+            'COMPRESS',
+            'CONCAT',
+            'CONCAT_WS',
+            'CONNECTION_ID',
+            'Contains',
+            'CONV',
+            'CONVERT',
+            'CONVERT_TZ',
+            'ConvexHull',
+            'COS',
+            'COT',
+            'COUNT',
+            'CRC32',
+            'CREATE_ASYMMETRIC_PRIV_KEY',
+            'CREATE_ASYMMETRIC_PUB_KEY',
+            'CREATE_DH_PARAMETERS',
+            'CREATE_DIGEST',
+            'Crosses',
+            'CURDATE',
+            'CURRENT_DATE',
+            'CURRENT_TIME',
+            'CURRENT_TIMESTAMP',
+            'CURRENT_USER',
+            'CURTIME',
+            'DATABASE',
+            'DATE',
+            'DATE_ADD',
+            'DATE_FORMAT',
+            'DATE_SUB',
+            'DATEDIFF',
+            'DAY',
+            'DAYNAME',
+            'DAYOFMONTH',
+            'DAYOFWEEK',
+            'DAYOFYEAR',
+            'DECODE',
+            'DEFAULT',
+            'DEGREES',
+            'DES_DECRYPT',
+            'DES_ENCRYPT',
+            'Dimension',
+            'Disjoint',
+            'Distance',
+            'ELT',
+            'ENCODE',
+            'ENCRYPT',
+            'EndPoint',
+            'Envelope',
+            'Equals',
+            'EXP',
+            'EXPORT_SET',
+            'ExteriorRing',
+            'EXTRACT',
+            'ExtractValue',
+            'FIELD',
+            'FIND_IN_SET',
+            'FLOOR',
+            'FORMAT',
+            'FOUND_ROWS',
+            'FROM_BASE64',
+            'FROM_DAYS',
+            'FROM_UNIXTIME',
+            'GeomCollFromText',
+            'GeometryCollectionFromText',
+            'GeomCollFromWKB',
+            'GeometryCollectionFromWKB',
+            'GeometryCollection',
+            'GeometryN',
+            'GeometryType',
+            'GeomFromText',
+            'GeometryFromText',
+            'GeomFromWKB',
+            'GeometryFromWKB',
+            'GET_FORMAT',
+            'GET_LOCK',
+            'GLength',
+            'GREATEST',
+            'GROUP_CONCAT',
+            'GTID_SUBSET',
+            'GTID_SUBTRACT',
+            'HEX',
+            'HOUR',
+            'IF',
+            'IFNULL',
+            'INET_ATON',
+            'INET_NTOA',
+            'INET6_ATON',
+            'INET6_NTOA',
+            'INSERT',
+            'INSTR',
+            'InteriorRingN',
+            'Intersects',
+            'INTERVAL',
+            'IS_FREE_LOCK',
+            'IS_IPV4',
+            'IS_IPV4_COMPAT',
+            'IS_IPV4_MAPPED',
+            'IS_IPV6',
+            'IS_USED_LOCK',
+            'IsClosed',
+            'IsEmpty',
+            'ISNULL',
+            'IsSimple',
+            'JSON_APPEND',
+            'JSON_ARRAY',
+            'JSON_ARRAY_APPEND',
+            'JSON_ARRAY_INSERT',
+            'JSON_CONTAINS',
+            'JSON_CONTAINS_PATH',
+            'JSON_DEPTH',
+            'JSON_EXTRACT',
+            'JSON_INSERT',
+            'JSON_KEYS',
+            'JSON_LENGTH',
+            'JSON_MERGE',
+            'JSON_MERGE_PRESERVE',
+            'JSON_OBJECT',
+            'JSON_QUOTE',
+            'JSON_REMOVE',
+            'JSON_REPLACE',
+            'JSON_SEARCH',
+            'JSON_SET',
+            'JSON_TYPE',
+            'JSON_UNQUOTE',
+            'JSON_VALID',
+            'LAST_INSERT_ID',
+            'LCASE',
+            'LEAST',
+            'LEFT',
+            'LENGTH',
+            'LineFromText',
+            'LineStringFromText',
+            'LineFromWKB',
+            'LineStringFromWKB',
+            'LineString',
+            'LN',
+            'LOAD_FILE',
+            'LOCALTIME',
+            'LOCALTIMESTAMP',
+            'LOCATE',
+            'LOG',
+            'LOG10',
+            'LOG2',
+            'LOWER',
+            'LPAD',
+            'LTRIM',
+            'MAKE_SET',
+            'MAKEDATE',
+            'MAKETIME',
+            'MASTER_POS_WAIT',
+            'MAX',
+            'MBRContains',
+            'MBRCoveredBy',
+            'MBRCovers',
+            'MBRDisjoint',
+            'MBREqual',
+            'MBREquals',
+            'MBRIntersects',
+            'MBROverlaps',
+            'MBRTouches',
+            'MBRWithin',
+            'MD5',
+            'MICROSECOND',
+            'MID',
+            'MIN',
+            'MINUTE',
+            'MLineFromText',
+            'MultiLineStringFromText',
+            'MLineFromWKB',
+            'MultiLineStringFromWKB',
+            'MOD',
+            'MONTH',
+            'MONTHNAME',
+            'MPointFromText',
+            'MultiPointFromText',
+            'MPointFromWKB',
+            'MultiPointFromWKB',
+            'MPolyFromText',
+            'MultiPolygonFromText',
+            'MPolyFromWKB',
+            'MultiPolygonFromWKB',
+            'MultiLineString',
+            'MultiPoint',
+            'MultiPolygon',
+            'NAME_CONST',
+            'NOT IN',
+            'NOW',
+            'NULLIF',
+            'NumGeometries',
+            'NumInteriorRings',
+            'NumPoints',
+            'OCT',
+            'OCTET_LENGTH',
+            'OLD_PASSWORD',
+            'ORD',
+            'Overlaps',
+            'PASSWORD',
+            'PERIOD_ADD',
+            'PERIOD_DIFF',
+            'PI',
+            'Point',
+            'PointFromText',
+            'PointFromWKB',
+            'PointN',
+            'PolyFromText',
+            'PolygonFromText',
+            'PolyFromWKB',
+            'PolygonFromWKB',
+            'Polygon',
+            'POSITION',
+            'POW',
+            'POWER',
+            'PROCEDURE ANALYSE',
+            'QUARTER',
+            'QUOTE',
+            'RADIANS',
+            'RAND',
+            'RANDOM_BYTES',
+            'RELEASE_ALL_LOCKS',
+            'RELEASE_LOCK',
+            'REPEAT',
+            'REPLACE',
+            'REVERSE',
+            'RIGHT',
+            'ROUND',
+            'ROW_COUNT',
+            'RPAD',
+            'RTRIM',
+            'SCHEMA',
+            'SEC_TO_TIME',
+            'SECOND',
+            'SESSION_USER',
+            'SHA1',
+            'SHA',
+            'SHA2',
+            'SIGN',
+            'SIN',
+            'SLEEP',
+            'SOUNDEX',
+            'SPACE',
+            'SQRT',
+            'SRID',
+            'ST_Area',
+            'ST_AsBinary',
+            'ST_AsWKB',
+            'ST_AsGeoJSON',
+            'ST_AsText',
+            'ST_AsWKT',
+            'ST_Buffer',
+            'ST_Buffer_Strategy',
+            'ST_Centroid',
+            'ST_Contains',
+            'ST_ConvexHull',
+            'ST_Crosses',
+            'ST_Difference',
+            'ST_Dimension',
+            'ST_Disjoint',
+            'ST_Distance',
+            'ST_Distance_Sphere',
+            'ST_EndPoint',
+            'ST_Envelope',
+            'ST_Equals',
+            'ST_ExteriorRing',
+            'ST_GeoHash',
+            'ST_GeomCollFromText',
+            'ST_GeometryCollectionFromText',
+            'ST_GeomCollFromTxt',
+            'ST_GeomCollFromWKB',
+            'ST_GeometryCollectionFromWKB',
+            'ST_GeometryN',
+            'ST_GeometryType',
+            'ST_GeomFromGeoJSON',
+            'ST_GeomFromText',
+            'ST_GeometryFromText',
+            'ST_GeomFromWKB',
+            'ST_GeometryFromWKB',
+            'ST_InteriorRingN',
+            'ST_Intersection',
+            'ST_Intersects',
+            'ST_IsClosed',
+            'ST_IsEmpty',
+            'ST_IsSimple',
+            'ST_IsValid',
+            'ST_LatFromGeoHash',
+            'ST_Length',
+            'ST_LineFromText',
+            'ST_LineStringFromText',
+            'ST_LineFromWKB',
+            'ST_LineStringFromWKB',
+            'ST_LongFromGeoHash',
+            'ST_MakeEnvelope',
+            'ST_MLineFromText',
+            'ST_MultiLineStringFromText',
+            'ST_MLineFromWKB',
+            'ST_MultiLineStringFromWKB',
+            'ST_MPointFromText',
+            'ST_MultiPointFromText',
+            'ST_MPointFromWKB',
+            'ST_MultiPointFromWKB',
+            'ST_MPolyFromText',
+            'ST_MultiPolygonFromText',
+            'ST_MPolyFromWKB',
+            'ST_MultiPolygonFromWKB',
+            'ST_NumGeometries',
+            'ST_NumInteriorRing',
+            'ST_NumInteriorRings',
+            'ST_NumPoints',
+            'ST_Overlaps',
+            'ST_PointFromGeoHash',
+            'ST_PointFromText',
+            'ST_PointFromWKB',
+            'ST_PointN',
+            'ST_PolyFromText',
+            'ST_PolygonFromText',
+            'ST_PolyFromWKB',
+            'ST_PolygonFromWKB',
+            'ST_Simplify',
+            'ST_SRID',
+            'ST_StartPoint',
+            'ST_SymDifference',
+            'ST_Touches',
+            'ST_Union',
+            'ST_Validate',
+            'ST_Within',
+            'ST_X',
+            'ST_Y',
+            'StartPoint',
+            'STD',
+            'STDDEV',
+            'STDDEV_POP',
+            'STDDEV_SAMP',
+            'STR_TO_DATE',
+            'STRCMP',
+            'SUBDATE',
+            'SUBSTR',
+            'SUBSTRING',
+            'SUBSTRING_INDEX',
+            'SUBTIME',
+            'SUM',
+            'SYSDATE',
+            'SYSTEM_USER',
+            'TAN',
+            'TIME',
+            'TIME_FORMAT',
+            'TIME_TO_SEC',
+            'TIMEDIFF',
+            'TIMESTAMP',
+            'TIMESTAMPADD',
+            'TIMESTAMPDIFF',
+            'TO_BASE64',
+            'TO_DAYS',
+            'TO_SECONDS',
+            'Touches',
+            'TRIM',
+            'TRUNCATE',
+            'UCASE',
+            'UNCOMPRESS',
+            'UNCOMPRESSED_LENGTH',
+            'UNHEX',
+            'UNIX_TIMESTAMP',
+            'UpdateXML',
+            'UPPER',
+            'USER',
+            'UTC_DATE',
+            'UTC_TIME',
+            'UTC_TIMESTAMP',
+            'UUID',
+            'UUID_SHORT',
+            'VALIDATE_PASSWORD_STRENGTH',
+            'VALUES',
+            'VAR_POP',
+            'VAR_SAMP',
+            'VARIANCE',
+            'VERSION',
+            'WAIT_FOR_EXECUTED_GTID_SET',
+            'WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS',
+            'WEEK',
+            'WEEKDAY',
+            'WEEKOFYEAR',
+            'WEIGHT_STRING',
+            'Within',
+            'X',
+            'Y',
+            'YEAR',
+            'YEARWEEK'
+        ],
+        builtinVariables: [
+        // NOT SUPPORTED
+        ],
+        tokenizer: {
+            root: [
+                { include: '@comments' },
+                { include: '@whitespace' },
+                { include: '@numbers' },
+                { include: '@strings' },
+                { include: '@complexIdentifiers' },
+                { include: '@scopes' },
+                [/[;,.]/, 'delimiter'],
+                [/[()]/, '@brackets'],
+                [
+                    /[\w@]+/,
+                    {
+                        cases: {
+                            '@operators': 'operator',
+                            '@builtinVariables': 'predefined',
+                            '@builtinFunctions': 'predefined',
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/[<>=!%&+\-*/|~^]/, 'operator']
+            ],
+            whitespace: [[/\s+/, 'white']],
+            comments: [
+                [/--+.*/, 'comment'],
+                [/#+.*/, 'comment'],
+                [/\/\*/, { token: 'comment.quote', next: '@comment' }]
+            ],
+            comment: [
+                [/[^*/]+/, 'comment'],
+                // Not supporting nested comments, as nested comments seem to not be standard?
+                // i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
+                // [/\/\*/, { token: 'comment.quote', next: '@push' }],    // nested comment not allowed :-(
+                [/\*\//, { token: 'comment.quote', next: '@pop' }],
+                [/./, 'comment']
+            ],
+            numbers: [
+                [/0[xX][0-9a-fA-F]*/, 'number'],
+                [/[$][+-]*\d*(\.\d*)?/, 'number'],
+                [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
+            ],
+            strings: [
+                [/'/, { token: 'string', next: '@string' }],
+                [/"/, { token: 'string.double', next: '@stringDouble' }]
+            ],
+            string: [
+                [/[^']+/, 'string'],
+                [/''/, 'string'],
+                [/'/, { token: 'string', next: '@pop' }]
+            ],
+            stringDouble: [
+                [/[^"]+/, 'string.double'],
+                [/""/, 'string.double'],
+                [/"/, { token: 'string.double', next: '@pop' }]
+            ],
+            complexIdentifiers: [[/`/, { token: 'identifier.quote', next: '@quotedIdentifier' }]],
+            quotedIdentifier: [
+                [/[^`]+/, 'identifier'],
+                [/``/, 'identifier'],
+                [/`/, { token: 'identifier.quote', next: '@pop' }]
+            ],
+            scopes: [
+            // NOT SUPPORTED
+            ]
+        }
+    };
+});
+

+ 190 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/objective-c/objective-c.js

@@ -0,0 +1,190 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/objective-c/objective-c',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.objective-c',
+        keywords: [
+            '#import',
+            '#include',
+            '#define',
+            '#else',
+            '#endif',
+            '#if',
+            '#ifdef',
+            '#ifndef',
+            '#ident',
+            '#undef',
+            '@class',
+            '@defs',
+            '@dynamic',
+            '@encode',
+            '@end',
+            '@implementation',
+            '@interface',
+            '@package',
+            '@private',
+            '@protected',
+            '@property',
+            '@protocol',
+            '@public',
+            '@selector',
+            '@synthesize',
+            '__declspec',
+            'assign',
+            'auto',
+            'BOOL',
+            'break',
+            'bycopy',
+            'byref',
+            'case',
+            'char',
+            'Class',
+            'const',
+            'copy',
+            'continue',
+            'default',
+            'do',
+            'double',
+            'else',
+            'enum',
+            'extern',
+            'FALSE',
+            'false',
+            'float',
+            'for',
+            'goto',
+            'if',
+            'in',
+            'int',
+            'id',
+            'inout',
+            'IMP',
+            'long',
+            'nil',
+            'nonatomic',
+            'NULL',
+            'oneway',
+            'out',
+            'private',
+            'public',
+            'protected',
+            'readwrite',
+            'readonly',
+            'register',
+            'return',
+            'SEL',
+            'self',
+            'short',
+            'signed',
+            'sizeof',
+            'static',
+            'struct',
+            'super',
+            'switch',
+            'typedef',
+            'TRUE',
+            'true',
+            'union',
+            'unsigned',
+            'volatile',
+            'void',
+            'while'
+        ],
+        decpart: /\d(_?\d)*/,
+        decimal: /0|@decpart/,
+        tokenizer: {
+            root: [
+                { include: '@comments' },
+                { include: '@whitespace' },
+                { include: '@numbers' },
+                { include: '@strings' },
+                [/[,:;]/, 'delimiter'],
+                [/[{}\[\]()<>]/, '@brackets'],
+                [
+                    /[a-zA-Z@#]\w*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/[<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b]/, 'operator']
+            ],
+            whitespace: [[/\s+/, 'white']],
+            comments: [
+                ['\\/\\*', 'comment', '@comment'],
+                ['\\/\\/+.*', 'comment']
+            ],
+            comment: [
+                ['\\*\\/', 'comment', '@pop'],
+                ['.', 'comment']
+            ],
+            numbers: [
+                [/0[xX][0-9a-fA-F]*(_?[0-9a-fA-F])*/, 'number.hex'],
+                [
+                    /@decimal((\.@decpart)?([eE][\-+]?@decpart)?)[fF]*/,
+                    {
+                        cases: {
+                            '(\\d)*': 'number',
+                            $0: 'number.float'
+                        }
+                    }
+                ]
+            ],
+            // Recognize strings, including those broken across lines with \ (but not without)
+            strings: [
+                [/'$/, 'string.escape', '@popall'],
+                [/'/, 'string.escape', '@stringBody'],
+                [/"$/, 'string.escape', '@popall'],
+                [/"/, 'string.escape', '@dblStringBody']
+            ],
+            stringBody: [
+                [/[^\\']+$/, 'string', '@popall'],
+                [/[^\\']+/, 'string'],
+                [/\\./, 'string'],
+                [/'/, 'string.escape', '@popall'],
+                [/\\$/, 'string']
+            ],
+            dblStringBody: [
+                [/[^\\"]+$/, 'string', '@popall'],
+                [/[^\\"]+/, 'string'],
+                [/\\./, 'string'],
+                [/"/, 'string.escape', '@popall'],
+                [/\\$/, 'string']
+            ]
+        }
+    };
+});
+

+ 257 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pascal/pascal.js

@@ -0,0 +1,257 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/pascal/pascal',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        // the default separators except `@$`
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['{', '}']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')'],
+            ['<', '>']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp("^\\s*\\{\\$REGION(\\s\\'.*\\')?\\}"),
+                end: new RegExp('^\\s*\\{\\$ENDREGION\\}')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.pascal',
+        ignoreCase: true,
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        keywords: [
+            'absolute',
+            'abstract',
+            'all',
+            'and_then',
+            'array',
+            'as',
+            'asm',
+            'attribute',
+            'begin',
+            'bindable',
+            'case',
+            'class',
+            'const',
+            'contains',
+            'default',
+            'div',
+            'else',
+            'end',
+            'except',
+            'exports',
+            'external',
+            'far',
+            'file',
+            'finalization',
+            'finally',
+            'forward',
+            'generic',
+            'goto',
+            'if',
+            'implements',
+            'import',
+            'in',
+            'index',
+            'inherited',
+            'initialization',
+            'interrupt',
+            'is',
+            'label',
+            'library',
+            'mod',
+            'module',
+            'name',
+            'near',
+            'not',
+            'object',
+            'of',
+            'on',
+            'only',
+            'operator',
+            'or_else',
+            'otherwise',
+            'override',
+            'package',
+            'packed',
+            'pow',
+            'private',
+            'program',
+            'protected',
+            'public',
+            'published',
+            'interface',
+            'implementation',
+            'qualified',
+            'read',
+            'record',
+            'resident',
+            'requires',
+            'resourcestring',
+            'restricted',
+            'segment',
+            'set',
+            'shl',
+            'shr',
+            'specialize',
+            'stored',
+            'strict',
+            'then',
+            'threadvar',
+            'to',
+            'try',
+            'type',
+            'unit',
+            'uses',
+            'var',
+            'view',
+            'virtual',
+            'dynamic',
+            'overload',
+            'reintroduce',
+            'with',
+            'write',
+            'xor',
+            'true',
+            'false',
+            'procedure',
+            'function',
+            'constructor',
+            'destructor',
+            'property',
+            'break',
+            'continue',
+            'exit',
+            'abort',
+            'while',
+            'do',
+            'for',
+            'raise',
+            'repeat',
+            'until'
+        ],
+        typeKeywords: [
+            'boolean',
+            'double',
+            'byte',
+            'integer',
+            'shortint',
+            'char',
+            'longint',
+            'float',
+            'string'
+        ],
+        operators: [
+            '=',
+            '>',
+            '<',
+            '<=',
+            '>=',
+            '<>',
+            ':',
+            ':=',
+            'and',
+            'or',
+            '+',
+            '-',
+            '*',
+            '/',
+            '@',
+            '&',
+            '^',
+            '%'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><:@\^&|+\-*\/\^%]+/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_][\w]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/'/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/'/, 'string.invalid'],
+                [/\#\d+/, 'string']
+            ],
+            comment: [
+                [/[^\*\}]+/, 'comment'],
+                //[/\(\*/,    'comment', '@push' ],    // nested comment  not allowed :-(
+                [/\}/, 'comment', '@pop'],
+                [/[\{]/, 'comment']
+            ],
+            string: [
+                [/[^\\']+/, 'string'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, 'white'],
+                [/\{/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ]
+        }
+    };
+});
+

+ 170 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pascaligo/pascaligo.js

@@ -0,0 +1,170 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/pascaligo/pascaligo',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['(*', '*)']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')'],
+            ['<', '>']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.pascaligo',
+        ignoreCase: true,
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        keywords: [
+            'begin',
+            'block',
+            'case',
+            'const',
+            'else',
+            'end',
+            'fail',
+            'for',
+            'from',
+            'function',
+            'if',
+            'is',
+            'nil',
+            'of',
+            'remove',
+            'return',
+            'skip',
+            'then',
+            'type',
+            'var',
+            'while',
+            'with',
+            'option',
+            'None',
+            'transaction'
+        ],
+        typeKeywords: [
+            'bool',
+            'int',
+            'list',
+            'map',
+            'nat',
+            'record',
+            'string',
+            'unit',
+            'address',
+            'map',
+            'mtz',
+            'xtz'
+        ],
+        operators: [
+            '=',
+            '>',
+            '<',
+            '<=',
+            '>=',
+            '<>',
+            ':',
+            ':=',
+            'and',
+            'mod',
+            'or',
+            '+',
+            '-',
+            '*',
+            '/',
+            '@',
+            '&',
+            '^',
+            '%'
+        ],
+        // we include these common regular expressions
+        symbols: /[=><:@\^&|+\-*\/\^%]+/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_][\w]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/[<>](?!@symbols)/, '@brackets'],
+                [
+                    /@symbols/,
+                    {
+                        cases: {
+                            '@operators': 'delimiter',
+                            '@default': ''
+                        }
+                    }
+                ],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                [/'([^'\\]|\\.)*$/, 'string.invalid'],
+                [/'/, 'string', '@string'],
+                // characters
+                [/'[^\\']'/, 'string'],
+                [/'/, 'string.invalid'],
+                [/\#\d+/, 'string']
+            ],
+            /* */
+            comment: [
+                [/[^\(\*]+/, 'comment'],
+                //[/\(\*/,    'comment', '@push' ],    // nested comment  not allowed :-(
+                [/\*\)/, 'comment', '@pop'],
+                [/\(\*/, 'comment']
+            ],
+            string: [
+                [/[^\\']+/, 'string'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, 'white'],
+                [/\(\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ]
+        }
+    };
+});
+

+ 628 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/perl/perl.js

@@ -0,0 +1,628 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/perl/perl',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '`', close: '`' }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" },
+            { open: '`', close: '`' }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.perl',
+        brackets: [
+            { token: 'delimiter.bracket', open: '{', close: '}' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' },
+            { token: 'delimiter.square', open: '[', close: ']' }
+        ],
+        // https://learn.perl.org/docs/keywords.html
+        // Perl syntax
+        keywords: [
+            '__DATA__',
+            'else',
+            'lock',
+            '__END__',
+            'elsif',
+            'lt',
+            '__FILE__',
+            'eq',
+            '__LINE__',
+            'exp',
+            'ne',
+            'sub',
+            '__PACKAGE__',
+            'for',
+            'no',
+            'and',
+            'foreach',
+            'or',
+            'unless',
+            'cmp',
+            'ge',
+            'package',
+            'until',
+            'continue',
+            'gt',
+            'while',
+            'CORE',
+            'if',
+            'xor',
+            'do',
+            'le',
+            '__DIE__',
+            '__WARN__'
+        ],
+        // Perl functions
+        builtinFunctions: [
+            '-A',
+            'END',
+            'length',
+            'setpgrp',
+            '-B',
+            'endgrent',
+            'link',
+            'setpriority',
+            '-b',
+            'endhostent',
+            'listen',
+            'setprotoent',
+            '-C',
+            'endnetent',
+            'local',
+            'setpwent',
+            '-c',
+            'endprotoent',
+            'localtime',
+            'setservent',
+            '-d',
+            'endpwent',
+            'log',
+            'setsockopt',
+            '-e',
+            'endservent',
+            'lstat',
+            'shift',
+            '-f',
+            'eof',
+            'map',
+            'shmctl',
+            '-g',
+            'eval',
+            'mkdir',
+            'shmget',
+            '-k',
+            'exec',
+            'msgctl',
+            'shmread',
+            '-l',
+            'exists',
+            'msgget',
+            'shmwrite',
+            '-M',
+            'exit',
+            'msgrcv',
+            'shutdown',
+            '-O',
+            'fcntl',
+            'msgsnd',
+            'sin',
+            '-o',
+            'fileno',
+            'my',
+            'sleep',
+            '-p',
+            'flock',
+            'next',
+            'socket',
+            '-r',
+            'fork',
+            'not',
+            'socketpair',
+            '-R',
+            'format',
+            'oct',
+            'sort',
+            '-S',
+            'formline',
+            'open',
+            'splice',
+            '-s',
+            'getc',
+            'opendir',
+            'split',
+            '-T',
+            'getgrent',
+            'ord',
+            'sprintf',
+            '-t',
+            'getgrgid',
+            'our',
+            'sqrt',
+            '-u',
+            'getgrnam',
+            'pack',
+            'srand',
+            '-w',
+            'gethostbyaddr',
+            'pipe',
+            'stat',
+            '-W',
+            'gethostbyname',
+            'pop',
+            'state',
+            '-X',
+            'gethostent',
+            'pos',
+            'study',
+            '-x',
+            'getlogin',
+            'print',
+            'substr',
+            '-z',
+            'getnetbyaddr',
+            'printf',
+            'symlink',
+            'abs',
+            'getnetbyname',
+            'prototype',
+            'syscall',
+            'accept',
+            'getnetent',
+            'push',
+            'sysopen',
+            'alarm',
+            'getpeername',
+            'quotemeta',
+            'sysread',
+            'atan2',
+            'getpgrp',
+            'rand',
+            'sysseek',
+            'AUTOLOAD',
+            'getppid',
+            'read',
+            'system',
+            'BEGIN',
+            'getpriority',
+            'readdir',
+            'syswrite',
+            'bind',
+            'getprotobyname',
+            'readline',
+            'tell',
+            'binmode',
+            'getprotobynumber',
+            'readlink',
+            'telldir',
+            'bless',
+            'getprotoent',
+            'readpipe',
+            'tie',
+            'break',
+            'getpwent',
+            'recv',
+            'tied',
+            'caller',
+            'getpwnam',
+            'redo',
+            'time',
+            'chdir',
+            'getpwuid',
+            'ref',
+            'times',
+            'CHECK',
+            'getservbyname',
+            'rename',
+            'truncate',
+            'chmod',
+            'getservbyport',
+            'require',
+            'uc',
+            'chomp',
+            'getservent',
+            'reset',
+            'ucfirst',
+            'chop',
+            'getsockname',
+            'return',
+            'umask',
+            'chown',
+            'getsockopt',
+            'reverse',
+            'undef',
+            'chr',
+            'glob',
+            'rewinddir',
+            'UNITCHECK',
+            'chroot',
+            'gmtime',
+            'rindex',
+            'unlink',
+            'close',
+            'goto',
+            'rmdir',
+            'unpack',
+            'closedir',
+            'grep',
+            'say',
+            'unshift',
+            'connect',
+            'hex',
+            'scalar',
+            'untie',
+            'cos',
+            'index',
+            'seek',
+            'use',
+            'crypt',
+            'INIT',
+            'seekdir',
+            'utime',
+            'dbmclose',
+            'int',
+            'select',
+            'values',
+            'dbmopen',
+            'ioctl',
+            'semctl',
+            'vec',
+            'defined',
+            'join',
+            'semget',
+            'wait',
+            'delete',
+            'keys',
+            'semop',
+            'waitpid',
+            'DESTROY',
+            'kill',
+            'send',
+            'wantarray',
+            'die',
+            'last',
+            'setgrent',
+            'warn',
+            'dump',
+            'lc',
+            'sethostent',
+            'write',
+            'each',
+            'lcfirst',
+            'setnetent'
+        ],
+        // File handlers
+        builtinFileHandlers: ['ARGV', 'STDERR', 'STDOUT', 'ARGVOUT', 'STDIN', 'ENV'],
+        // Perl variables
+        builtinVariables: [
+            '$!',
+            '$^RE_TRIE_MAXBUF',
+            '$LAST_REGEXP_CODE_RESULT',
+            '$"',
+            '$^S',
+            '$LIST_SEPARATOR',
+            '$#',
+            '$^T',
+            '$MATCH',
+            '$$',
+            '$^TAINT',
+            '$MULTILINE_MATCHING',
+            '$%',
+            '$^UNICODE',
+            '$NR',
+            '$&',
+            '$^UTF8LOCALE',
+            '$OFMT',
+            "$'",
+            '$^V',
+            '$OFS',
+            '$(',
+            '$^W',
+            '$ORS',
+            '$)',
+            '$^WARNING_BITS',
+            '$OS_ERROR',
+            '$*',
+            '$^WIDE_SYSTEM_CALLS',
+            '$OSNAME',
+            '$+',
+            '$^X',
+            '$OUTPUT_AUTO_FLUSH',
+            '$,',
+            '$_',
+            '$OUTPUT_FIELD_SEPARATOR',
+            '$-',
+            '$`',
+            '$OUTPUT_RECORD_SEPARATOR',
+            '$.',
+            '$a',
+            '$PERL_VERSION',
+            '$/',
+            '$ACCUMULATOR',
+            '$PERLDB',
+            '$0',
+            '$ARG',
+            '$PID',
+            '$:',
+            '$ARGV',
+            '$POSTMATCH',
+            '$;',
+            '$b',
+            '$PREMATCH',
+            '$<',
+            '$BASETIME',
+            '$PROCESS_ID',
+            '$=',
+            '$CHILD_ERROR',
+            '$PROGRAM_NAME',
+            '$>',
+            '$COMPILING',
+            '$REAL_GROUP_ID',
+            '$?',
+            '$DEBUGGING',
+            '$REAL_USER_ID',
+            '$@',
+            '$EFFECTIVE_GROUP_ID',
+            '$RS',
+            '$[',
+            '$EFFECTIVE_USER_ID',
+            '$SUBSCRIPT_SEPARATOR',
+            '$\\',
+            '$EGID',
+            '$SUBSEP',
+            '$]',
+            '$ERRNO',
+            '$SYSTEM_FD_MAX',
+            '$^',
+            '$EUID',
+            '$UID',
+            '$^A',
+            '$EVAL_ERROR',
+            '$WARNING',
+            '$^C',
+            '$EXCEPTIONS_BEING_CAUGHT',
+            '$|',
+            '$^CHILD_ERROR_NATIVE',
+            '$EXECUTABLE_NAME',
+            '$~',
+            '$^D',
+            '$EXTENDED_OS_ERROR',
+            '%!',
+            '$^E',
+            '$FORMAT_FORMFEED',
+            '%^H',
+            '$^ENCODING',
+            '$FORMAT_LINE_BREAK_CHARACTERS',
+            '%ENV',
+            '$^F',
+            '$FORMAT_LINES_LEFT',
+            '%INC',
+            '$^H',
+            '$FORMAT_LINES_PER_PAGE',
+            '%OVERLOAD',
+            '$^I',
+            '$FORMAT_NAME',
+            '%SIG',
+            '$^L',
+            '$FORMAT_PAGE_NUMBER',
+            '@+',
+            '$^M',
+            '$FORMAT_TOP_NAME',
+            '@-',
+            '$^N',
+            '$GID',
+            '@_',
+            '$^O',
+            '$INPLACE_EDIT',
+            '@ARGV',
+            '$^OPEN',
+            '$INPUT_LINE_NUMBER',
+            '@INC',
+            '$^P',
+            '$INPUT_RECORD_SEPARATOR',
+            '@LAST_MATCH_START',
+            '$^R',
+            '$LAST_MATCH_END',
+            '$^RE_DEBUG_FLAGS',
+            '$LAST_PAREN_MATCH'
+        ],
+        // operators
+        symbols: /[:+\-\^*$&%@=<>!?|\/~\.]/,
+        quoteLikeOps: ['qr', 'm', 's', 'q', 'qq', 'qx', 'qw', 'tr', 'y'],
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                { include: '@whitespace' },
+                [
+                    /[a-zA-Z\-_][\w\-_]*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@builtinFunctions': 'type.identifier',
+                            '@builtinFileHandlers': 'variable.predefined',
+                            '@quoteLikeOps': {
+                                token: '@rematch',
+                                next: 'quotedConstructs'
+                            },
+                            '@default': ''
+                        }
+                    }
+                ],
+                // Perl variables
+                [
+                    /[\$@%][*@#?\+\-\$!\w\\\^><~:;\.]+/,
+                    {
+                        cases: {
+                            '@builtinVariables': 'variable.predefined',
+                            '@default': 'variable'
+                        }
+                    }
+                ],
+                { include: '@strings' },
+                { include: '@dblStrings' },
+                // Perl Doc
+                { include: '@perldoc' },
+                // Here Doc
+                { include: '@heredoc' },
+                [/[{}\[\]()]/, '@brackets'],
+                // RegExp
+                [/[\/](?:(?:\[(?:\\]|[^\]])+\])|(?:\\\/|[^\]\/]))*[\/]\w*\s*(?=[).,;]|$)/, 'regexp'],
+                [/@symbols/, 'operators'],
+                { include: '@numbers' },
+                [/[,;]/, 'delimiter']
+            ],
+            whitespace: [
+                [/\s+/, 'white'],
+                [/(^#!.*$)/, 'metatag'],
+                [/(^#.*$)/, 'comment']
+            ],
+            numbers: [
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
+                [/\d+/, 'number']
+            ],
+            // Single quote string
+            strings: [[/'/, 'string', '@stringBody']],
+            stringBody: [
+                [/'/, 'string', '@popall'],
+                [/\\'/, 'string.escape'],
+                [/./, 'string']
+            ],
+            // Double quote string
+            dblStrings: [[/"/, 'string', '@dblStringBody']],
+            dblStringBody: [
+                [/"/, 'string', '@popall'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                { include: '@variables' },
+                [/./, 'string']
+            ],
+            // Quoted constructs
+            // Percent strings in Ruby are similar to quote-like operators in Perl.
+            // This is adapted from pstrings in ../ruby/ruby.ts.
+            quotedConstructs: [
+                [/(q|qw|tr|y)\s*\(/, { token: 'string.delim', switchTo: '@qstring.(.)' }],
+                [/(q|qw|tr|y)\s*\[/, { token: 'string.delim', switchTo: '@qstring.[.]' }],
+                [/(q|qw|tr|y)\s*\{/, { token: 'string.delim', switchTo: '@qstring.{.}' }],
+                [/(q|qw|tr|y)\s*</, { token: 'string.delim', switchTo: '@qstring.<.>' }],
+                [/(q|qw|tr|y)#/, { token: 'string.delim', switchTo: '@qstring.#.#' }],
+                [/(q|qw|tr|y)\s*([^A-Za-z0-9#\s])/, { token: 'string.delim', switchTo: '@qstring.$2.$2' }],
+                [/(q|qw|tr|y)\s+(\w)/, { token: 'string.delim', switchTo: '@qstring.$2.$2' }],
+                [/(qr|m|s)\s*\(/, { token: 'regexp.delim', switchTo: '@qregexp.(.)' }],
+                [/(qr|m|s)\s*\[/, { token: 'regexp.delim', switchTo: '@qregexp.[.]' }],
+                [/(qr|m|s)\s*\{/, { token: 'regexp.delim', switchTo: '@qregexp.{.}' }],
+                [/(qr|m|s)\s*</, { token: 'regexp.delim', switchTo: '@qregexp.<.>' }],
+                [/(qr|m|s)#/, { token: 'regexp.delim', switchTo: '@qregexp.#.#' }],
+                [/(qr|m|s)\s*([^A-Za-z0-9_#\s])/, { token: 'regexp.delim', switchTo: '@qregexp.$2.$2' }],
+                [/(qr|m|s)\s+(\w)/, { token: 'regexp.delim', switchTo: '@qregexp.$2.$2' }],
+                [/(qq|qx)\s*\(/, { token: 'string.delim', switchTo: '@qqstring.(.)' }],
+                [/(qq|qx)\s*\[/, { token: 'string.delim', switchTo: '@qqstring.[.]' }],
+                [/(qq|qx)\s*\{/, { token: 'string.delim', switchTo: '@qqstring.{.}' }],
+                [/(qq|qx)\s*</, { token: 'string.delim', switchTo: '@qqstring.<.>' }],
+                [/(qq|qx)#/, { token: 'string.delim', switchTo: '@qqstring.#.#' }],
+                [/(qq|qx)\s*([^A-Za-z0-9#\s])/, { token: 'string.delim', switchTo: '@qqstring.$2.$2' }],
+                [/(qq|qx)\s+(\w)/, { token: 'string.delim', switchTo: '@qqstring.$2.$2' }]
+            ],
+            // Non-expanded quoted string
+            // qstring<open>.<close>
+            //  open = open delimiter
+            //  close = close delimiter
+            qstring: [
+                [/\\./, 'string.escape'],
+                [
+                    /./,
+                    {
+                        cases: {
+                            '$#==$S3': { token: 'string.delim', next: '@pop' },
+                            '$#==$S2': { token: 'string.delim', next: '@push' },
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ],
+            // Quoted regexp
+            // qregexp.<open>.<close>
+            //  open = open delimiter
+            //  close = close delimiter
+            qregexp: [
+                { include: '@variables' },
+                [/\\./, 'regexp.escape'],
+                [
+                    /./,
+                    {
+                        cases: {
+                            '$#==$S3': {
+                                token: 'regexp.delim',
+                                next: '@regexpModifiers'
+                            },
+                            '$#==$S2': { token: 'regexp.delim', next: '@push' },
+                            '@default': 'regexp'
+                        }
+                    }
+                ]
+            ],
+            regexpModifiers: [[/[msixpodualngcer]+/, { token: 'regexp.modifier', next: '@popall' }]],
+            // Expanded quoted string
+            // qqstring.<open>.<close>
+            //  open = open delimiter
+            //  close = close delimiter
+            qqstring: [{ include: '@variables' }, { include: '@qstring' }],
+            heredoc: [
+                [/<<\s*['"`]?([\w\-]+)['"`]?/, { token: 'string.heredoc.delimiter', next: '@heredocBody.$1' }]
+            ],
+            heredocBody: [
+                [
+                    /^([\w\-]+)$/,
+                    {
+                        cases: {
+                            '$1==$S2': [
+                                {
+                                    token: 'string.heredoc.delimiter',
+                                    next: '@popall'
+                                }
+                            ],
+                            '@default': 'string.heredoc'
+                        }
+                    }
+                ],
+                [/./, 'string.heredoc']
+            ],
+            perldoc: [[/^=\w/, 'comment.doc', '@perldocBody']],
+            perldocBody: [
+                [/^=cut\b/, 'type.identifier', '@popall'],
+                [/./, 'comment.doc']
+            ],
+            variables: [
+                [/\$\w+/, 'variable'],
+                [/@\w+/, 'variable'],
+                [/%\w+/, 'variable'] // key/value
+            ]
+        }
+    };
+});
+

+ 854 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pgsql/pgsql.js

@@ -0,0 +1,854 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/pgsql/pgsql',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '--',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.sql',
+        ignoreCase: true,
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        keywords: [
+            // This list is generated using `keywords.js`
+            'ALL',
+            'ANALYSE',
+            'ANALYZE',
+            'AND',
+            'ANY',
+            'ARRAY',
+            'AS',
+            'ASC',
+            'ASYMMETRIC',
+            'AUTHORIZATION',
+            'BINARY',
+            'BOTH',
+            'CASE',
+            'CAST',
+            'CHECK',
+            'COLLATE',
+            'COLLATION',
+            'COLUMN',
+            'CONCURRENTLY',
+            'CONSTRAINT',
+            'CREATE',
+            'CROSS',
+            'CURRENT_CATALOG',
+            'CURRENT_DATE',
+            'CURRENT_ROLE',
+            'CURRENT_SCHEMA',
+            'CURRENT_TIME',
+            'CURRENT_TIMESTAMP',
+            'CURRENT_USER',
+            'DEFAULT',
+            'DEFERRABLE',
+            'DESC',
+            'DISTINCT',
+            'DO',
+            'ELSE',
+            'END',
+            'EXCEPT',
+            'FALSE',
+            'FETCH',
+            'FOR',
+            'FOREIGN',
+            'FREEZE',
+            'FROM',
+            'FULL',
+            'GRANT',
+            'GROUP',
+            'HAVING',
+            'ILIKE',
+            'IN',
+            'INITIALLY',
+            'INNER',
+            'INTERSECT',
+            'INTO',
+            'IS',
+            'ISNULL',
+            'JOIN',
+            'LATERAL',
+            'LEADING',
+            'LEFT',
+            'LIKE',
+            'LIMIT',
+            'LOCALTIME',
+            'LOCALTIMESTAMP',
+            'NATURAL',
+            'NOT',
+            'NOTNULL',
+            'NULL',
+            'OFFSET',
+            'ON',
+            'ONLY',
+            'OR',
+            'ORDER',
+            'OUTER',
+            'OVERLAPS',
+            'PLACING',
+            'PRIMARY',
+            'REFERENCES',
+            'RETURNING',
+            'RIGHT',
+            'SELECT',
+            'SESSION_USER',
+            'SIMILAR',
+            'SOME',
+            'SYMMETRIC',
+            'TABLE',
+            'TABLESAMPLE',
+            'THEN',
+            'TO',
+            'TRAILING',
+            'TRUE',
+            'UNION',
+            'UNIQUE',
+            'USER',
+            'USING',
+            'VARIADIC',
+            'VERBOSE',
+            'WHEN',
+            'WHERE',
+            'WINDOW',
+            'WITH'
+        ],
+        operators: [
+            'AND',
+            'BETWEEN',
+            'IN',
+            'LIKE',
+            'NOT',
+            'OR',
+            'IS',
+            'NULL',
+            'INTERSECT',
+            'UNION',
+            'INNER',
+            'JOIN',
+            'LEFT',
+            'OUTER',
+            'RIGHT'
+        ],
+        builtinFunctions: [
+            'abbrev',
+            'abs',
+            'acldefault',
+            'aclexplode',
+            'acos',
+            'acosd',
+            'acosh',
+            'age',
+            'any',
+            'area',
+            'array_agg',
+            'array_append',
+            'array_cat',
+            'array_dims',
+            'array_fill',
+            'array_length',
+            'array_lower',
+            'array_ndims',
+            'array_position',
+            'array_positions',
+            'array_prepend',
+            'array_remove',
+            'array_replace',
+            'array_to_json',
+            'array_to_string',
+            'array_to_tsvector',
+            'array_upper',
+            'ascii',
+            'asin',
+            'asind',
+            'asinh',
+            'atan',
+            'atan2',
+            'atan2d',
+            'atand',
+            'atanh',
+            'avg',
+            'bit',
+            'bit_and',
+            'bit_count',
+            'bit_length',
+            'bit_or',
+            'bit_xor',
+            'bool_and',
+            'bool_or',
+            'bound_box',
+            'box',
+            'brin_desummarize_range',
+            'brin_summarize_new_values',
+            'brin_summarize_range',
+            'broadcast',
+            'btrim',
+            'cardinality',
+            'cbrt',
+            'ceil',
+            'ceiling',
+            'center',
+            'char_length',
+            'character_length',
+            'chr',
+            'circle',
+            'clock_timestamp',
+            'coalesce',
+            'col_description',
+            'concat',
+            'concat_ws',
+            'convert',
+            'convert_from',
+            'convert_to',
+            'corr',
+            'cos',
+            'cosd',
+            'cosh',
+            'cot',
+            'cotd',
+            'count',
+            'covar_pop',
+            'covar_samp',
+            'cume_dist',
+            'current_catalog',
+            'current_database',
+            'current_date',
+            'current_query',
+            'current_role',
+            'current_schema',
+            'current_schemas',
+            'current_setting',
+            'current_time',
+            'current_timestamp',
+            'current_user',
+            'currval',
+            'cursor_to_xml',
+            'cursor_to_xmlschema',
+            'date_bin',
+            'date_part',
+            'date_trunc',
+            'database_to_xml',
+            'database_to_xml_and_xmlschema',
+            'database_to_xmlschema',
+            'decode',
+            'degrees',
+            'dense_rank',
+            'diagonal',
+            'diameter',
+            'div',
+            'encode',
+            'enum_first',
+            'enum_last',
+            'enum_range',
+            'every',
+            'exp',
+            'extract',
+            'factorial',
+            'family',
+            'first_value',
+            'floor',
+            'format',
+            'format_type',
+            'gcd',
+            'gen_random_uuid',
+            'generate_series',
+            'generate_subscripts',
+            'get_bit',
+            'get_byte',
+            'get_current_ts_config',
+            'gin_clean_pending_list',
+            'greatest',
+            'grouping',
+            'has_any_column_privilege',
+            'has_column_privilege',
+            'has_database_privilege',
+            'has_foreign_data_wrapper_privilege',
+            'has_function_privilege',
+            'has_language_privilege',
+            'has_schema_privilege',
+            'has_sequence_privilege',
+            'has_server_privilege',
+            'has_table_privilege',
+            'has_tablespace_privilege',
+            'has_type_privilege',
+            'height',
+            'host',
+            'hostmask',
+            'inet_client_addr',
+            'inet_client_port',
+            'inet_merge',
+            'inet_same_family',
+            'inet_server_addr',
+            'inet_server_port',
+            'initcap',
+            'isclosed',
+            'isempty',
+            'isfinite',
+            'isopen',
+            'json_agg',
+            'json_array_elements',
+            'json_array_elements_text',
+            'json_array_length',
+            'json_build_array',
+            'json_build_object',
+            'json_each',
+            'json_each_text',
+            'json_extract_path',
+            'json_extract_path_text',
+            'json_object',
+            'json_object_agg',
+            'json_object_keys',
+            'json_populate_record',
+            'json_populate_recordset',
+            'json_strip_nulls',
+            'json_to_record',
+            'json_to_recordset',
+            'json_to_tsvector',
+            'json_typeof',
+            'jsonb_agg',
+            'jsonb_array_elements',
+            'jsonb_array_elements_text',
+            'jsonb_array_length',
+            'jsonb_build_array',
+            'jsonb_build_object',
+            'jsonb_each',
+            'jsonb_each_text',
+            'jsonb_extract_path',
+            'jsonb_extract_path_text',
+            'jsonb_insert',
+            'jsonb_object',
+            'jsonb_object_agg',
+            'jsonb_object_keys',
+            'jsonb_path_exists',
+            'jsonb_path_match',
+            'jsonb_path_query',
+            'jsonb_path_query_array',
+            'jsonb_path_exists_tz',
+            'jsonb_path_query_first',
+            'jsonb_path_query_array_tz',
+            'jsonb_path_query_first_tz',
+            'jsonb_path_query_tz',
+            'jsonb_path_match_tz',
+            'jsonb_populate_record',
+            'jsonb_populate_recordset',
+            'jsonb_pretty',
+            'jsonb_set',
+            'jsonb_set_lax',
+            'jsonb_strip_nulls',
+            'jsonb_to_record',
+            'jsonb_to_recordset',
+            'jsonb_to_tsvector',
+            'jsonb_typeof',
+            'justify_days',
+            'justify_hours',
+            'justify_interval',
+            'lag',
+            'last_value',
+            'lastval',
+            'lcm',
+            'lead',
+            'least',
+            'left',
+            'length',
+            'line',
+            'ln',
+            'localtime',
+            'localtimestamp',
+            'log',
+            'log10',
+            'lower',
+            'lower_inc',
+            'lower_inf',
+            'lpad',
+            'lseg',
+            'ltrim',
+            'macaddr8_set7bit',
+            'make_date',
+            'make_interval',
+            'make_time',
+            'make_timestamp',
+            'make_timestamptz',
+            'makeaclitem',
+            'masklen',
+            'max',
+            'md5',
+            'min',
+            'min_scale',
+            'mod',
+            'mode',
+            'multirange',
+            'netmask',
+            'network',
+            'nextval',
+            'normalize',
+            'now',
+            'npoints',
+            'nth_value',
+            'ntile',
+            'nullif',
+            'num_nonnulls',
+            'num_nulls',
+            'numnode',
+            'obj_description',
+            'octet_length',
+            'overlay',
+            'parse_ident',
+            'path',
+            'pclose',
+            'percent_rank',
+            'percentile_cont',
+            'percentile_disc',
+            'pg_advisory_lock',
+            'pg_advisory_lock_shared',
+            'pg_advisory_unlock',
+            'pg_advisory_unlock_all',
+            'pg_advisory_unlock_shared',
+            'pg_advisory_xact_lock',
+            'pg_advisory_xact_lock_shared',
+            'pg_backend_pid',
+            'pg_backup_start_time',
+            'pg_blocking_pids',
+            'pg_cancel_backend',
+            'pg_client_encoding',
+            'pg_collation_actual_version',
+            'pg_collation_is_visible',
+            'pg_column_compression',
+            'pg_column_size',
+            'pg_conf_load_time',
+            'pg_control_checkpoint',
+            'pg_control_init',
+            'pg_control_recovery',
+            'pg_control_system',
+            'pg_conversion_is_visible',
+            'pg_copy_logical_replication_slot',
+            'pg_copy_physical_replication_slot',
+            'pg_create_logical_replication_slot',
+            'pg_create_physical_replication_slot',
+            'pg_create_restore_point',
+            'pg_current_logfile',
+            'pg_current_snapshot',
+            'pg_current_wal_flush_lsn',
+            'pg_current_wal_insert_lsn',
+            'pg_current_wal_lsn',
+            'pg_current_xact_id',
+            'pg_current_xact_id_if_assigned',
+            'pg_current_xlog_flush_location',
+            'pg_current_xlog_insert_location',
+            'pg_current_xlog_location',
+            'pg_database_size',
+            'pg_describe_object',
+            'pg_drop_replication_slot',
+            'pg_event_trigger_ddl_commands',
+            'pg_event_trigger_dropped_objects',
+            'pg_event_trigger_table_rewrite_oid',
+            'pg_event_trigger_table_rewrite_reason',
+            'pg_export_snapshot',
+            'pg_filenode_relation',
+            'pg_function_is_visible',
+            'pg_get_catalog_foreign_keys',
+            'pg_get_constraintdef',
+            'pg_get_expr',
+            'pg_get_function_arguments',
+            'pg_get_function_identity_arguments',
+            'pg_get_function_result',
+            'pg_get_functiondef',
+            'pg_get_indexdef',
+            'pg_get_keywords',
+            'pg_get_object_address',
+            'pg_get_owned_sequence',
+            'pg_get_ruledef',
+            'pg_get_serial_sequence',
+            'pg_get_statisticsobjdef',
+            'pg_get_triggerdef',
+            'pg_get_userbyid',
+            'pg_get_viewdef',
+            'pg_get_wal_replay_pause_state',
+            'pg_has_role',
+            'pg_identify_object',
+            'pg_identify_object_as_address',
+            'pg_import_system_collations',
+            'pg_index_column_has_property',
+            'pg_index_has_property',
+            'pg_indexam_has_property',
+            'pg_indexes_size',
+            'pg_is_in_backup',
+            'pg_is_in_recovery',
+            'pg_is_other_temp_schema',
+            'pg_is_wal_replay_paused',
+            'pg_is_xlog_replay_paused',
+            'pg_jit_available',
+            'pg_last_committed_xact',
+            'pg_last_wal_receive_lsn',
+            'pg_last_wal_replay_lsn',
+            'pg_last_xact_replay_timestamp',
+            'pg_last_xlog_receive_location',
+            'pg_last_xlog_replay_location',
+            'pg_listening_channels',
+            'pg_log_backend_memory_contexts',
+            'pg_logical_emit_message',
+            'pg_logical_slot_get_binary_changes',
+            'pg_logical_slot_get_changes',
+            'pg_logical_slot_peek_binary_changes',
+            'pg_logical_slot_peek_changes',
+            'pg_ls_archive_statusdir',
+            'pg_ls_dir',
+            'pg_ls_logdir',
+            'pg_ls_tmpdir',
+            'pg_ls_waldir',
+            'pg_mcv_list_items',
+            'pg_my_temp_schema',
+            'pg_notification_queue_usage',
+            'pg_opclass_is_visible',
+            'pg_operator_is_visible',
+            'pg_opfamily_is_visible',
+            'pg_options_to_table',
+            'pg_partition_ancestors',
+            'pg_partition_root',
+            'pg_partition_tree',
+            'pg_postmaster_start_time',
+            'pg_promote',
+            'pg_read_binary_file',
+            'pg_read_file',
+            'pg_relation_filenode',
+            'pg_relation_filepath',
+            'pg_relation_size',
+            'pg_reload_conf',
+            'pg_replication_origin_advance',
+            'pg_replication_origin_create',
+            'pg_replication_origin_drop',
+            'pg_replication_origin_oid',
+            'pg_replication_origin_progress',
+            'pg_replication_origin_session_is_setup',
+            'pg_replication_origin_session_progress',
+            'pg_replication_origin_session_reset',
+            'pg_replication_origin_session_setup',
+            'pg_replication_origin_xact_reset',
+            'pg_replication_origin_xact_setup',
+            'pg_replication_slot_advance',
+            'pg_rotate_logfile',
+            'pg_safe_snapshot_blocking_pids',
+            'pg_size_bytes',
+            'pg_size_pretty',
+            'pg_sleep',
+            'pg_sleep_for',
+            'pg_sleep_until',
+            'pg_snapshot_xip',
+            'pg_snapshot_xmax',
+            'pg_snapshot_xmin',
+            'pg_start_backup',
+            'pg_stat_file',
+            'pg_statistics_obj_is_visible',
+            'pg_stop_backup',
+            'pg_switch_wal',
+            'pg_switch_xlog',
+            'pg_table_is_visible',
+            'pg_table_size',
+            'pg_tablespace_databases',
+            'pg_tablespace_location',
+            'pg_tablespace_size',
+            'pg_terminate_backend',
+            'pg_total_relation_size',
+            'pg_trigger_depth',
+            'pg_try_advisory_lock',
+            'pg_try_advisory_lock_shared',
+            'pg_try_advisory_xact_lock',
+            'pg_try_advisory_xact_lock_shared',
+            'pg_ts_config_is_visible',
+            'pg_ts_dict_is_visible',
+            'pg_ts_parser_is_visible',
+            'pg_ts_template_is_visible',
+            'pg_type_is_visible',
+            'pg_typeof',
+            'pg_visible_in_snapshot',
+            'pg_wal_lsn_diff',
+            'pg_wal_replay_pause',
+            'pg_wal_replay_resume',
+            'pg_walfile_name',
+            'pg_walfile_name_offset',
+            'pg_xact_commit_timestamp',
+            'pg_xact_commit_timestamp_origin',
+            'pg_xact_status',
+            'pg_xlog_location_diff',
+            'pg_xlog_replay_pause',
+            'pg_xlog_replay_resume',
+            'pg_xlogfile_name',
+            'pg_xlogfile_name_offset',
+            'phraseto_tsquery',
+            'pi',
+            'plainto_tsquery',
+            'point',
+            'polygon',
+            'popen',
+            'position',
+            'power',
+            'pqserverversion',
+            'query_to_xml',
+            'query_to_xml_and_xmlschema',
+            'query_to_xmlschema',
+            'querytree',
+            'quote_ident',
+            'quote_literal',
+            'quote_nullable',
+            'radians',
+            'radius',
+            'random',
+            'range_agg',
+            'range_intersect_agg',
+            'range_merge',
+            'rank',
+            'regexp_match',
+            'regexp_matches',
+            'regexp_replace',
+            'regexp_split_to_array',
+            'regexp_split_to_table',
+            'regr_avgx',
+            'regr_avgy',
+            'regr_count',
+            'regr_intercept',
+            'regr_r2',
+            'regr_slope',
+            'regr_sxx',
+            'regr_sxy',
+            'regr_syy',
+            'repeat',
+            'replace',
+            'reverse',
+            'right',
+            'round',
+            'row_number',
+            'row_security_active',
+            'row_to_json',
+            'rpad',
+            'rtrim',
+            'scale',
+            'schema_to_xml',
+            'schema_to_xml_and_xmlschema',
+            'schema_to_xmlschema',
+            'session_user',
+            'set_bit',
+            'set_byte',
+            'set_config',
+            'set_masklen',
+            'setseed',
+            'setval',
+            'setweight',
+            'sha224',
+            'sha256',
+            'sha384',
+            'sha512',
+            'shobj_description',
+            'sign',
+            'sin',
+            'sind',
+            'sinh',
+            'slope',
+            'split_part',
+            'sprintf',
+            'sqrt',
+            'starts_with',
+            'statement_timestamp',
+            'stddev',
+            'stddev_pop',
+            'stddev_samp',
+            'string_agg',
+            'string_to_array',
+            'string_to_table',
+            'strip',
+            'strpos',
+            'substr',
+            'substring',
+            'sum',
+            'suppress_redundant_updates_trigger',
+            'table_to_xml',
+            'table_to_xml_and_xmlschema',
+            'table_to_xmlschema',
+            'tan',
+            'tand',
+            'tanh',
+            'text',
+            'timeofday',
+            'timezone',
+            'to_ascii',
+            'to_char',
+            'to_date',
+            'to_hex',
+            'to_json',
+            'to_number',
+            'to_regclass',
+            'to_regcollation',
+            'to_regnamespace',
+            'to_regoper',
+            'to_regoperator',
+            'to_regproc',
+            'to_regprocedure',
+            'to_regrole',
+            'to_regtype',
+            'to_timestamp',
+            'to_tsquery',
+            'to_tsvector',
+            'transaction_timestamp',
+            'translate',
+            'trim',
+            'trim_array',
+            'trim_scale',
+            'trunc',
+            'ts_debug',
+            'ts_delete',
+            'ts_filter',
+            'ts_headline',
+            'ts_lexize',
+            'ts_parse',
+            'ts_rank',
+            'ts_rank_cd',
+            'ts_rewrite',
+            'ts_stat',
+            'ts_token_type',
+            'tsquery_phrase',
+            'tsvector_to_array',
+            'tsvector_update_trigger',
+            'tsvector_update_trigger_column',
+            'txid_current',
+            'txid_current_if_assigned',
+            'txid_current_snapshot',
+            'txid_snapshot_xip',
+            'txid_snapshot_xmax',
+            'txid_snapshot_xmin',
+            'txid_status',
+            'txid_visible_in_snapshot',
+            'unistr',
+            'unnest',
+            'upper',
+            'upper_inc',
+            'upper_inf',
+            'user',
+            'var_pop',
+            'var_samp',
+            'variance',
+            'version',
+            'websearch_to_tsquery',
+            'width',
+            'width_bucket',
+            'xml_is_well_formed',
+            'xml_is_well_formed_content',
+            'xml_is_well_formed_document',
+            'xmlagg',
+            'xmlcomment',
+            'xmlconcat',
+            'xmlelement',
+            'xmlexists',
+            'xmlforest',
+            'xmlparse',
+            'xmlpi',
+            'xmlroot',
+            'xmlserialize',
+            'xpath',
+            'xpath_exists'
+        ],
+        builtinVariables: [
+        // NOT SUPPORTED
+        ],
+        pseudoColumns: [
+        // NOT SUPPORTED
+        ],
+        tokenizer: {
+            root: [
+                { include: '@comments' },
+                { include: '@whitespace' },
+                { include: '@pseudoColumns' },
+                { include: '@numbers' },
+                { include: '@strings' },
+                { include: '@complexIdentifiers' },
+                { include: '@scopes' },
+                [/[;,.]/, 'delimiter'],
+                [/[()]/, '@brackets'],
+                [
+                    /[\w@#$]+/,
+                    {
+                        cases: {
+                            '@operators': 'operator',
+                            '@builtinVariables': 'predefined',
+                            '@builtinFunctions': 'predefined',
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                [/[<>=!%&+\-*/|~^]/, 'operator']
+            ],
+            whitespace: [[/\s+/, 'white']],
+            comments: [
+                [/--+.*/, 'comment'],
+                [/\/\*/, { token: 'comment.quote', next: '@comment' }]
+            ],
+            comment: [
+                [/[^*/]+/, 'comment'],
+                // Not supporting nested comments, as nested comments seem to not be standard?
+                // i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
+                // [/\/\*/, { token: 'comment.quote', next: '@push' }],    // nested comment not allowed :-(
+                [/\*\//, { token: 'comment.quote', next: '@pop' }],
+                [/./, 'comment']
+            ],
+            pseudoColumns: [
+                [
+                    /[$][A-Za-z_][\w@#$]*/,
+                    {
+                        cases: {
+                            '@pseudoColumns': 'predefined',
+                            '@default': 'identifier'
+                        }
+                    }
+                ]
+            ],
+            numbers: [
+                [/0[xX][0-9a-fA-F]*/, 'number'],
+                [/[$][+-]*\d*(\.\d*)?/, 'number'],
+                [/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
+            ],
+            strings: [[/'/, { token: 'string', next: '@string' }]],
+            string: [
+                [/[^']+/, 'string'],
+                [/''/, 'string'],
+                [/'/, { token: 'string', next: '@pop' }]
+            ],
+            complexIdentifiers: [[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]],
+            quotedIdentifier: [
+                [/[^"]+/, 'identifier'],
+                [/""/, 'identifier'],
+                [/"/, { token: 'identifier.quote', next: '@pop' }]
+            ],
+            scopes: [
+            // NOT SUPPORTED
+            ]
+        }
+    };
+});
+

+ 579 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/php/php.js

@@ -0,0 +1,579 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/php/php',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}', notIn: ['string'] },
+            { open: '[', close: ']', notIn: ['string'] },
+            { open: '(', close: ')', notIn: ['string'] },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*(#|//)region\\b'),
+                end: new RegExp('^\\s*(#|//)endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '',
+        // ignoreCase: true,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.root' }],
+                [/<!DOCTYPE/, 'metatag.html', '@doctype'],
+                [/<!--/, 'comment.html', '@comment'],
+                [/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
+                [/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
+                [/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
+                [/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
+                [/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
+                [/</, 'delimiter.html'],
+                [/[^<]+/] // text
+            ],
+            doctype: [
+                [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }],
+                [/[^>]+/, 'metatag.content.html'],
+                [/>/, 'metatag.html', '@pop']
+            ],
+            comment: [
+                [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }],
+                [/-->/, 'comment.html', '@pop'],
+                [/[^-]+/, 'comment.content.html'],
+                [/./, 'comment.content.html']
+            ],
+            otherTag: [
+                [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.otherTag' }],
+                [/\/?>/, 'delimiter.html', '@pop'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/] // whitespace
+            ],
+            // -- BEGIN <script> tags handling
+            // After <script
+            script: [
+                [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.script' }],
+                [/type/, 'attribute.name', '@scriptAfterType'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.text/javascript',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [
+                    /(<\/)(script\s*)(>)/,
+                    ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]
+                ]
+            ],
+            // After <script ... type
+            scriptAfterType: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInSimpleState.scriptAfterType'
+                    }
+                ],
+                [/=/, 'delimiter', '@scriptAfterTypeEquals'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.text/javascript',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <script ... type =
+            scriptAfterTypeEquals: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInSimpleState.scriptAfterTypeEquals'
+                    }
+                ],
+                [
+                    /"([^"]*)"/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@scriptWithCustomType.$1'
+                    }
+                ],
+                [
+                    /'([^']*)'/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@scriptWithCustomType.$1'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.text/javascript',
+                        nextEmbedded: 'text/javascript'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <script ... type = $S2
+            scriptWithCustomType: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInSimpleState.scriptWithCustomType.$S2'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@scriptEmbedded.$S2',
+                        nextEmbedded: '$S2'
+                    }
+                ],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/],
+                [/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            scriptEmbedded: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInEmbeddedState.scriptEmbedded.$S2',
+                        nextEmbedded: '@pop'
+                    }
+                ],
+                [/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
+            ],
+            // -- END <script> tags handling
+            // -- BEGIN <style> tags handling
+            // After <style
+            style: [
+                [/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.style' }],
+                [/type/, 'attribute.name', '@styleAfterType'],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.text/css',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [
+                    /(<\/)(style\s*)(>)/,
+                    ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]
+                ]
+            ],
+            // After <style ... type
+            styleAfterType: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInSimpleState.styleAfterType'
+                    }
+                ],
+                [/=/, 'delimiter', '@styleAfterTypeEquals'],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.text/css',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <style ... type =
+            styleAfterTypeEquals: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInSimpleState.styleAfterTypeEquals'
+                    }
+                ],
+                [
+                    /"([^"]*)"/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@styleWithCustomType.$1'
+                    }
+                ],
+                [
+                    /'([^']*)'/,
+                    {
+                        token: 'attribute.value',
+                        switchTo: '@styleWithCustomType.$1'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.text/css',
+                        nextEmbedded: 'text/css'
+                    }
+                ],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            // After <style ... type = $S2
+            styleWithCustomType: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInSimpleState.styleWithCustomType.$S2'
+                    }
+                ],
+                [
+                    />/,
+                    {
+                        token: 'delimiter.html',
+                        next: '@styleEmbedded.$S2',
+                        nextEmbedded: '$S2'
+                    }
+                ],
+                [/"([^"]*)"/, 'attribute.value'],
+                [/'([^']*)'/, 'attribute.value'],
+                [/[\w\-]+/, 'attribute.name'],
+                [/=/, 'delimiter'],
+                [/[ \t\r\n]+/],
+                [/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
+            ],
+            styleEmbedded: [
+                [
+                    /<\?((php)|=)?/,
+                    {
+                        token: '@rematch',
+                        switchTo: '@phpInEmbeddedState.styleEmbedded.$S2',
+                        nextEmbedded: '@pop'
+                    }
+                ],
+                [/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
+            ],
+            // -- END <style> tags handling
+            phpInSimpleState: [
+                [/<\?((php)|=)?/, 'metatag.php'],
+                [/\?>/, { token: 'metatag.php', switchTo: '@$S2.$S3' }],
+                { include: 'phpRoot' }
+            ],
+            phpInEmbeddedState: [
+                [/<\?((php)|=)?/, 'metatag.php'],
+                [
+                    /\?>/,
+                    {
+                        token: 'metatag.php',
+                        switchTo: '@$S2.$S3',
+                        nextEmbedded: '$S3'
+                    }
+                ],
+                { include: 'phpRoot' }
+            ],
+            phpRoot: [
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@phpKeywords': { token: 'keyword.php' },
+                            '@phpCompileTimeConstants': { token: 'constant.php' },
+                            '@default': 'identifier.php'
+                        }
+                    }
+                ],
+                [
+                    /[$a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@phpPreDefinedVariables': {
+                                token: 'variable.predefined.php'
+                            },
+                            '@default': 'variable.php'
+                        }
+                    }
+                ],
+                // brackets
+                [/[{}]/, 'delimiter.bracket.php'],
+                [/[\[\]]/, 'delimiter.array.php'],
+                [/[()]/, 'delimiter.parenthesis.php'],
+                // whitespace
+                [/[ \t\r\n]+/],
+                // comments
+                [/(#|\/\/)$/, 'comment.php'],
+                [/(#|\/\/)/, 'comment.php', '@phpLineComment'],
+                // block comments
+                [/\/\*/, 'comment.php', '@phpComment'],
+                // strings
+                [/"/, 'string.php', '@phpDoubleQuoteString'],
+                [/'/, 'string.php', '@phpSingleQuoteString'],
+                // delimiters
+                [/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/, 'delimiter.php'],
+                // numbers
+                [/\d*\d+[eE]([\-+]?\d+)?/, 'number.float.php'],
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float.php'],
+                [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex.php'],
+                [/0[0-7']*[0-7]/, 'number.octal.php'],
+                [/0[bB][0-1']*[0-1]/, 'number.binary.php'],
+                [/\d[\d']*/, 'number.php'],
+                [/\d/, 'number.php']
+            ],
+            phpComment: [
+                [/\*\//, 'comment.php', '@pop'],
+                [/[^*]+/, 'comment.php'],
+                [/./, 'comment.php']
+            ],
+            phpLineComment: [
+                [/\?>/, { token: '@rematch', next: '@pop' }],
+                [/.$/, 'comment.php', '@pop'],
+                [/[^?]+$/, 'comment.php', '@pop'],
+                [/[^?]+/, 'comment.php'],
+                [/./, 'comment.php']
+            ],
+            phpDoubleQuoteString: [
+                [/[^\\"]+/, 'string.php'],
+                [/@escapes/, 'string.escape.php'],
+                [/\\./, 'string.escape.invalid.php'],
+                [/"/, 'string.php', '@pop']
+            ],
+            phpSingleQuoteString: [
+                [/[^\\']+/, 'string.php'],
+                [/@escapes/, 'string.escape.php'],
+                [/\\./, 'string.escape.invalid.php'],
+                [/'/, 'string.php', '@pop']
+            ]
+        },
+        phpKeywords: [
+            'abstract',
+            'and',
+            'array',
+            'as',
+            'break',
+            'callable',
+            'case',
+            'catch',
+            'cfunction',
+            'class',
+            'clone',
+            'const',
+            'continue',
+            'declare',
+            'default',
+            'do',
+            'else',
+            'elseif',
+            'enddeclare',
+            'endfor',
+            'endforeach',
+            'endif',
+            'endswitch',
+            'endwhile',
+            'extends',
+            'false',
+            'final',
+            'for',
+            'foreach',
+            'function',
+            'global',
+            'goto',
+            'if',
+            'implements',
+            'interface',
+            'instanceof',
+            'insteadof',
+            'namespace',
+            'new',
+            'null',
+            'object',
+            'old_function',
+            'or',
+            'private',
+            'protected',
+            'public',
+            'resource',
+            'static',
+            'switch',
+            'throw',
+            'trait',
+            'try',
+            'true',
+            'use',
+            'var',
+            'while',
+            'xor',
+            'die',
+            'echo',
+            'empty',
+            'exit',
+            'eval',
+            'include',
+            'include_once',
+            'isset',
+            'list',
+            'require',
+            'require_once',
+            'return',
+            'print',
+            'unset',
+            'yield',
+            '__construct'
+        ],
+        phpCompileTimeConstants: [
+            '__CLASS__',
+            '__DIR__',
+            '__FILE__',
+            '__LINE__',
+            '__NAMESPACE__',
+            '__METHOD__',
+            '__FUNCTION__',
+            '__TRAIT__'
+        ],
+        phpPreDefinedVariables: [
+            '$GLOBALS',
+            '$_SERVER',
+            '$_GET',
+            '$_POST',
+            '$_FILES',
+            '$_REQUEST',
+            '$_SESSION',
+            '$_ENV',
+            '$_COOKIE',
+            '$php_errormsg',
+            '$HTTP_RAW_POST_DATA',
+            '$http_response_header',
+            '$argc',
+            '$argv'
+        ],
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/
+    };
+});
+// TESTED WITH
+// <style type="text/css" >
+//   .boo { background: blue;
+//   <?=''?>
+//   }
+//   .boo { background: blue;  <?=''?>  }
+// </style>
+// <!--
+// <?= '' ?>
+// -->
+// <?php
+// // The next line contains a syntax error:
+// __construct
+// if () {
+// 	return "The parser recovers from this type of syntax error";
+// }
+// ?>
+// <html>
+// <head>
+// 	<title <?=''?>>Example page</title>
+//   <style <?=''?>>
+//     .boo { background: blue; <?=''?> }
+//   </style>
+// </head>
+// <body>
+// <script <?=''?> type<?=''?>=<?=''?>"text/javascript"<?=''?>>
+// 	// Some PHP embedded inside JS
+// 	// Generated <?=date('l, F jS, Y')?>
+// 	var server_token = <?=rand(5, 10000)?>
+// 	if (typeof server_token === 'number') {
+// 		alert('token: ' + server_token);
+// 	}
+// </script>
+// <div>
+// Hello
+// <? if (isset($user)) { ?>
+// 	<b><?=$user?></b>
+// <? } else { ?>
+// 	<i>guest</i>
+// <? } ?>
+// !
+// </div>
+// <?php
+// 	/* Example PHP file
+// 	multiline comment
+// 	*/
+//  # Another single line comment
+// 	$cards = array("ah", "ac", "ad", "as",
+// 		"2h", "2c", "2d", "2s",
+// 		"3h", "3c", "3d", "3s",
+// 		"4h", "4c", "4d", "4s",
+// 		"5h", "5c", "5d", "5s",
+// 		"6h", "6c", "6d", "6s",
+// 		"7h", "7c", "7d", "7s",
+// 		"8h", "8c", "8d", "8s",
+// 		"9h", "9c", "9d", "9s",
+// 		"th", "tc", "td", "ts",
+// 		"jh", "jc", "jd", "js",
+// 		"qh", "qc", "qd", "qs",
+// 		"kh", "kc", "kd", "ks");
+// 	srand(time());
+// 	for($i = 0; $i < 52; $i++) {
+// 		$count = count($cards);
+// 		$random = (rand()%$count);
+// 		if($cards[$random] == "") {
+// 			$i--;
+// 		} else {
+// 			$deck[] = $cards[$random];
+// 			$cards[$random] = "";
+// 		}
+// 	}
+// $_GET
+// __CLASS__
+// 	srand(time());
+// 	$starting_point = (rand()%51);
+// 	print("Starting point for cut cards is: $starting_point<p>");
+// 	// display shuffled cards (EXAMPLE ONLY)
+// 	for ($index = 0; $index < 52; $index++) {
+// 		if ($starting_point == 52) { $starting_point = 0; }
+// 		print("Uncut Point: <strong>$deck[$index]</strong> ");
+// 		print("Starting Point: <strong>$deck[$starting_point]</strong><br>");
+// 		$starting_point++;
+// 	}
+// ?>
+// </body>
+// </html>
+;

+ 144 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pla/pla.js

@@ -0,0 +1,144 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/pla/pla',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#'
+        },
+        brackets: [
+            ['[', ']'],
+            ['<', '>'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '[', close: ']' },
+            { open: '<', close: '>' },
+            { open: '(', close: ')' }
+        ],
+        surroundingPairs: [
+            { open: '[', close: ']' },
+            { open: '<', close: '>' },
+            { open: '(', close: ')' }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.pla',
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '<', close: '>', token: 'delimiter.angle' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        keywords: [
+            '.i',
+            '.o',
+            '.mv',
+            '.ilb',
+            '.ob',
+            '.label',
+            '.type',
+            '.phase',
+            '.pair',
+            '.symbolic',
+            '.symbolic-output',
+            '.kiss',
+            '.p',
+            '.e',
+            '.end'
+        ],
+        // regular expressions
+        comment: /#.*$/,
+        identifier: /[a-zA-Z]+[a-zA-Z0-9_\-]*/,
+        plaContent: /[01\-~\|]+/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // comments and whitespace
+                { include: '@whitespace' },
+                [/@comment/, 'comment'],
+                // keyword
+                [
+                    /\.([a-zA-Z_\-]+)/,
+                    {
+                        cases: {
+                            '@eos': { token: 'keyword.$1' },
+                            '@keywords': {
+                                cases: {
+                                    '.type': { token: 'keyword.$1', next: '@type' },
+                                    '@default': { token: 'keyword.$1', next: '@keywordArg' }
+                                }
+                            },
+                            '@default': { token: 'keyword.$1' }
+                        }
+                    }
+                ],
+                // identifiers
+                [/@identifier/, 'identifier'],
+                // PLA row
+                [/@plaContent/, 'string']
+            ],
+            whitespace: [[/[ \t\r\n]+/, '']],
+            type: [{ include: '@whitespace' }, [/\w+/, { token: 'type', next: '@pop' }]],
+            keywordArg: [
+                // whitespace
+                [
+                    /[ \t\r\n]+/,
+                    {
+                        cases: {
+                            '@eos': { token: '', next: '@pop' },
+                            '@default': ''
+                        }
+                    }
+                ],
+                // comments
+                [/@comment/, 'comment', '@pop'],
+                // brackets
+                [
+                    /[<>()\[\]]/,
+                    {
+                        cases: {
+                            '@eos': { token: '@brackets', next: '@pop' },
+                            '@default': '@brackets'
+                        }
+                    }
+                ],
+                // numbers
+                [
+                    /\-?\d+/,
+                    {
+                        cases: {
+                            '@eos': { token: 'number', next: '@pop' },
+                            '@default': 'number'
+                        }
+                    }
+                ],
+                // identifiers
+                [
+                    /@identifier/,
+                    {
+                        cases: {
+                            '@eos': { token: 'identifier', next: '@pop' },
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // delimiter
+                [
+                    /[;=]/,
+                    {
+                        cases: {
+                            '@eos': { token: 'delimiter', next: '@pop' },
+                            '@default': 'delimiter'
+                        }
+                    }
+                ]
+            ]
+        }
+    };
+});
+

+ 716 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/postiats/postiats.js

@@ -0,0 +1,716 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Artyom Shalkhakov. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *
+ *  Based on the ATS/Postiats lexer by Hongwei Xi.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/postiats/postiats',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['(*', '*)']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')'],
+            ['<', '>']
+        ],
+        autoClosingPairs: [
+            { open: '"', close: '"', notIn: ['string', 'comment'] },
+            { open: '{', close: '}', notIn: ['string', 'comment'] },
+            { open: '[', close: ']', notIn: ['string', 'comment'] },
+            { open: '(', close: ')', notIn: ['string', 'comment'] }
+        ]
+    };
+    exports.language = {
+        tokenPostfix: '.pats',
+        // TODO: staload and dynload are followed by a special kind of string literals
+        // with {$IDENTIFER} variables, and it also may make sense to highlight
+        // the punctuation (. and / and \) differently.
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        defaultToken: 'invalid',
+        // keyword reference: https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing_token.dats
+        keywords: [
+            //
+            'abstype',
+            'abst0ype',
+            'absprop',
+            'absview',
+            'absvtype',
+            'absviewtype',
+            'absvt0ype',
+            'absviewt0ype',
+            //
+            'as',
+            //
+            'and',
+            //
+            'assume',
+            //
+            'begin',
+            //
+            /*
+                    "case", // CASE
+            */
+            //
+            'classdec',
+            //
+            'datasort',
+            //
+            'datatype',
+            'dataprop',
+            'dataview',
+            'datavtype',
+            'dataviewtype',
+            //
+            'do',
+            //
+            'end',
+            //
+            'extern',
+            'extype',
+            'extvar',
+            //
+            'exception',
+            //
+            'fn',
+            'fnx',
+            'fun',
+            //
+            'prfn',
+            'prfun',
+            //
+            'praxi',
+            'castfn',
+            //
+            'if',
+            'then',
+            'else',
+            //
+            'ifcase',
+            //
+            'in',
+            //
+            'infix',
+            'infixl',
+            'infixr',
+            'prefix',
+            'postfix',
+            //
+            'implmnt',
+            'implement',
+            //
+            'primplmnt',
+            'primplement',
+            //
+            'import',
+            //
+            /*
+                    "lam", // LAM
+                    "llam", // LLAM
+                    "fix", // FIX
+            */
+            //
+            'let',
+            //
+            'local',
+            //
+            'macdef',
+            'macrodef',
+            //
+            'nonfix',
+            //
+            'symelim',
+            'symintr',
+            'overload',
+            //
+            'of',
+            'op',
+            //
+            'rec',
+            //
+            'sif',
+            'scase',
+            //
+            'sortdef',
+            /*
+            // HX: [sta] is now deprecated
+            */
+            'sta',
+            'stacst',
+            'stadef',
+            'static',
+            /*
+                    "stavar", // T_STAVAR
+            */
+            //
+            'staload',
+            'dynload',
+            //
+            'try',
+            //
+            'tkindef',
+            //
+            /*
+                    "type", // TYPE
+            */
+            'typedef',
+            'propdef',
+            'viewdef',
+            'vtypedef',
+            'viewtypedef',
+            //
+            /*
+                    "val", // VAL
+            */
+            'prval',
+            //
+            'var',
+            'prvar',
+            //
+            'when',
+            'where',
+            //
+            /*
+                    "for", // T_FOR
+                    "while", // T_WHILE
+            */
+            //
+            'with',
+            //
+            'withtype',
+            'withprop',
+            'withview',
+            'withvtype',
+            'withviewtype' // WITHVIEWTYPE
+            //
+        ],
+        keywords_dlr: [
+            '$delay',
+            '$ldelay',
+            //
+            '$arrpsz',
+            '$arrptrsize',
+            //
+            '$d2ctype',
+            //
+            '$effmask',
+            '$effmask_ntm',
+            '$effmask_exn',
+            '$effmask_ref',
+            '$effmask_wrt',
+            '$effmask_all',
+            //
+            '$extern',
+            '$extkind',
+            '$extype',
+            '$extype_struct',
+            //
+            '$extval',
+            '$extfcall',
+            '$extmcall',
+            //
+            '$literal',
+            //
+            '$myfilename',
+            '$mylocation',
+            '$myfunction',
+            //
+            '$lst',
+            '$lst_t',
+            '$lst_vt',
+            '$list',
+            '$list_t',
+            '$list_vt',
+            //
+            '$rec',
+            '$rec_t',
+            '$rec_vt',
+            '$record',
+            '$record_t',
+            '$record_vt',
+            //
+            '$tup',
+            '$tup_t',
+            '$tup_vt',
+            '$tuple',
+            '$tuple_t',
+            '$tuple_vt',
+            //
+            '$break',
+            '$continue',
+            //
+            '$raise',
+            //
+            '$showtype',
+            //
+            '$vcopyenv_v',
+            '$vcopyenv_vt',
+            //
+            '$tempenver',
+            //
+            '$solver_assert',
+            '$solver_verify' // T_DLRSOLVERIFY
+        ],
+        keywords_srp: [
+            //
+            '#if',
+            '#ifdef',
+            '#ifndef',
+            //
+            '#then',
+            //
+            '#elif',
+            '#elifdef',
+            '#elifndef',
+            //
+            '#else',
+            '#endif',
+            //
+            '#error',
+            //
+            '#prerr',
+            '#print',
+            //
+            '#assert',
+            //
+            '#undef',
+            '#define',
+            //
+            '#include',
+            '#require',
+            //
+            '#pragma',
+            '#codegen2',
+            '#codegen3' // T_SRPCODEGEN3 // for level-3 codegen
+            //
+            // HX: end of special tokens
+            //
+        ],
+        irregular_keyword_list: [
+            'val+',
+            'val-',
+            'val',
+            'case+',
+            'case-',
+            'case',
+            'addr@',
+            'addr',
+            'fold@',
+            'free@',
+            'fix@',
+            'fix',
+            'lam@',
+            'lam',
+            'llam@',
+            'llam',
+            'viewt@ype+',
+            'viewt@ype-',
+            'viewt@ype',
+            'viewtype+',
+            'viewtype-',
+            'viewtype',
+            'view+',
+            'view-',
+            'view@',
+            'view',
+            'type+',
+            'type-',
+            'type',
+            'vtype+',
+            'vtype-',
+            'vtype',
+            'vt@ype+',
+            'vt@ype-',
+            'vt@ype',
+            'viewt@ype+',
+            'viewt@ype-',
+            'viewt@ype',
+            'viewtype+',
+            'viewtype-',
+            'viewtype',
+            'prop+',
+            'prop-',
+            'prop',
+            'type+',
+            'type-',
+            'type',
+            't@ype',
+            't@ype+',
+            't@ype-',
+            'abst@ype',
+            'abstype',
+            'absviewt@ype',
+            'absvt@ype',
+            'for*',
+            'for',
+            'while*',
+            'while'
+        ],
+        keywords_types: [
+            'bool',
+            'double',
+            'byte',
+            'int',
+            'short',
+            'char',
+            'void',
+            'unit',
+            'long',
+            'float',
+            'string',
+            'strptr'
+        ],
+        // TODO: reference for this?
+        keywords_effects: [
+            '0',
+            'fun',
+            'clo',
+            'prf',
+            'funclo',
+            'cloptr',
+            'cloref',
+            'ref',
+            'ntm',
+            '1' // all effects
+        ],
+        operators: [
+            '@',
+            '!',
+            '|',
+            '`',
+            ':',
+            '$',
+            '.',
+            '=',
+            '#',
+            '~',
+            //
+            '..',
+            '...',
+            //
+            '=>',
+            // "=<", // T_EQLT
+            '=<>',
+            '=/=>',
+            '=>>',
+            '=/=>>',
+            //
+            '<',
+            '>',
+            //
+            '><',
+            //
+            '.<',
+            '>.',
+            //
+            '.<>.',
+            //
+            '->',
+            //"-<", // T_MINUSLT
+            '-<>' // T_MINUSLTGT
+            //
+            /*
+                    ":<", // T_COLONLT
+            */
+        ],
+        brackets: [
+            { open: ',(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '`(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '%(', close: ')', token: 'delimiter.parenthesis' },
+            { open: "'(", close: ')', token: 'delimiter.parenthesis' },
+            { open: "'{", close: '}', token: 'delimiter.parenthesis' },
+            { open: '@(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '@{', close: '}', token: 'delimiter.brace' },
+            { open: '@[', close: ']', token: 'delimiter.square' },
+            { open: '#[', close: ']', token: 'delimiter.square' },
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        // we include these common regular expressions
+        symbols: /[=><!~?:&|+\-*\/\^%]+/,
+        IDENTFST: /[a-zA-Z_]/,
+        IDENTRST: /[a-zA-Z0-9_'$]/,
+        symbolic: /[%&+-./:=@~`^|*!$#?<>]/,
+        digit: /[0-9]/,
+        digitseq0: /@digit*/,
+        xdigit: /[0-9A-Za-z]/,
+        xdigitseq0: /@xdigit*/,
+        INTSP: /[lLuU]/,
+        FLOATSP: /[fFlL]/,
+        fexponent: /[eE][+-]?[0-9]+/,
+        fexponent_bin: /[pP][+-]?[0-9]+/,
+        deciexp: /\.[0-9]*@fexponent?/,
+        hexiexp: /\.[0-9a-zA-Z]*@fexponent_bin?/,
+        irregular_keywords: /val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,
+        ESCHAR: /[ntvbrfa\\\?'"\(\[\{]/,
+        start: 'root',
+        // The main tokenizer for ATS/Postiats
+        // reference: https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing.dats
+        tokenizer: {
+            root: [
+                // lexing_blankseq0
+                { regex: /[ \t\r\n]+/, action: { token: '' } },
+                // NOTE: (*) is an invalid ML-like comment!
+                { regex: /\(\*\)/, action: { token: 'invalid' } },
+                {
+                    regex: /\(\*/,
+                    action: { token: 'comment', next: 'lexing_COMMENT_block_ml' }
+                },
+                {
+                    regex: /\(/,
+                    action: '@brackets' /*{ token: 'delimiter.parenthesis' }*/
+                },
+                {
+                    regex: /\)/,
+                    action: '@brackets' /*{ token: 'delimiter.parenthesis' }*/
+                },
+                {
+                    regex: /\[/,
+                    action: '@brackets' /*{ token: 'delimiter.bracket' }*/
+                },
+                {
+                    regex: /\]/,
+                    action: '@brackets' /*{ token: 'delimiter.bracket' }*/
+                },
+                {
+                    regex: /\{/,
+                    action: '@brackets' /*{ token: 'delimiter.brace' }*/
+                },
+                {
+                    regex: /\}/,
+                    action: '@brackets' /*{ token: 'delimiter.brace' }*/
+                },
+                // lexing_COMMA
+                {
+                    regex: /,\(/,
+                    action: '@brackets' /*{ token: 'delimiter.parenthesis' }*/
+                },
+                { regex: /,/, action: { token: 'delimiter.comma' } },
+                { regex: /;/, action: { token: 'delimiter.semicolon' } },
+                // lexing_AT
+                {
+                    regex: /@\(/,
+                    action: '@brackets' /* { token: 'delimiter.parenthesis' }*/
+                },
+                {
+                    regex: /@\[/,
+                    action: '@brackets' /* { token: 'delimiter.bracket' }*/
+                },
+                {
+                    regex: /@\{/,
+                    action: '@brackets' /*{ token: 'delimiter.brace' }*/
+                },
+                // lexing_COLON
+                {
+                    regex: /:</,
+                    action: { token: 'keyword', next: '@lexing_EFFECT_commaseq0' }
+                },
+                /*
+                lexing_DOT:
+    
+                . // SYMBOLIC => lexing_IDENT_sym
+                . FLOATDOT => lexing_FLOAT_deciexp
+                . DIGIT => T_DOTINT
+                */
+                { regex: /\.@symbolic+/, action: { token: 'identifier.sym' } },
+                // FLOATDOT case
+                {
+                    regex: /\.@digit*@fexponent@FLOATSP*/,
+                    action: { token: 'number.float' }
+                },
+                { regex: /\.@digit+/, action: { token: 'number.float' } },
+                // lexing_DOLLAR:
+                // '$' IDENTFST IDENTRST* => lexing_IDENT_dlr, _ => lexing_IDENT_sym
+                {
+                    regex: /\$@IDENTFST@IDENTRST*/,
+                    action: {
+                        cases: {
+                            '@keywords_dlr': { token: 'keyword.dlr' },
+                            '@default': { token: 'namespace' } // most likely a module qualifier
+                        }
+                    }
+                },
+                // lexing_SHARP:
+                // '#' IDENTFST IDENTRST* => lexing_ident_srp, _ => lexing_IDENT_sym
+                {
+                    regex: /\#@IDENTFST@IDENTRST*/,
+                    action: {
+                        cases: {
+                            '@keywords_srp': { token: 'keyword.srp' },
+                            '@default': { token: 'identifier' }
+                        }
+                    }
+                },
+                // lexing_PERCENT:
+                { regex: /%\(/, action: { token: 'delimiter.parenthesis' } },
+                {
+                    regex: /^%{(#|\^|\$)?/,
+                    action: {
+                        token: 'keyword',
+                        next: '@lexing_EXTCODE',
+                        nextEmbedded: 'text/javascript'
+                    }
+                },
+                { regex: /^%}/, action: { token: 'keyword' } },
+                // lexing_QUOTE
+                { regex: /'\(/, action: { token: 'delimiter.parenthesis' } },
+                { regex: /'\[/, action: { token: 'delimiter.bracket' } },
+                { regex: /'\{/, action: { token: 'delimiter.brace' } },
+                [/(')(\\@ESCHAR|\\[xX]@xdigit+|\\@digit+)(')/, ['string', 'string.escape', 'string']],
+                [/'[^\\']'/, 'string'],
+                // lexing_DQUOTE
+                [/"/, 'string.quote', '@lexing_DQUOTE'],
+                // lexing_BQUOTE
+                {
+                    regex: /`\(/,
+                    action: '@brackets' /* { token: 'delimiter.parenthesis' }*/
+                },
+                // TODO: otherwise, try lexing_IDENT_sym
+                { regex: /\\/, action: { token: 'punctuation' } },
+                // lexing_IDENT_alp:
+                // NOTE: (?!regex) is syntax for "not-followed-by" regex
+                // to resolve ambiguity such as foreach$fwork being incorrectly lexed as [for] [each$fwork]!
+                {
+                    regex: /@irregular_keywords(?!@IDENTRST)/,
+                    action: { token: 'keyword' }
+                },
+                {
+                    regex: /@IDENTFST@IDENTRST*[<!\[]?/,
+                    action: {
+                        cases: {
+                            // TODO: dynload and staload should be specially parsed
+                            // dynload whitespace+ "special_string"
+                            // this special string is really:
+                            //  '/' '\\' '.' => punctuation
+                            // ({\$)([a-zA-Z_][a-zA-Z_0-9]*)(}) => punctuation,keyword,punctuation
+                            // [^"] => identifier/literal
+                            '@keywords': { token: 'keyword' },
+                            '@keywords_types': { token: 'type' },
+                            '@default': { token: 'identifier' }
+                        }
+                    }
+                },
+                // lexing_IDENT_sym:
+                {
+                    regex: /\/\/\/\//,
+                    action: { token: 'comment', next: '@lexing_COMMENT_rest' }
+                },
+                { regex: /\/\/.*$/, action: { token: 'comment' } },
+                {
+                    regex: /\/\*/,
+                    action: { token: 'comment', next: '@lexing_COMMENT_block_c' }
+                },
+                // AS-20160627: specifically for effect annotations
+                {
+                    regex: /-<|=</,
+                    action: { token: 'keyword', next: '@lexing_EFFECT_commaseq0' }
+                },
+                {
+                    regex: /@symbolic+/,
+                    action: {
+                        cases: {
+                            '@operators': 'keyword',
+                            '@default': 'operator'
+                        }
+                    }
+                },
+                // lexing_ZERO:
+                // FIXME: this one is quite messy/unfinished yet
+                // TODO: lexing_INT_hex
+                // - testing_hexiexp => lexing_FLOAT_hexiexp
+                // - testing_fexponent_bin => lexing_FLOAT_hexiexp
+                // - testing_intspseq0 => T_INT_hex
+                // lexing_INT_hex:
+                {
+                    regex: /0[xX]@xdigit+(@hexiexp|@fexponent_bin)@FLOATSP*/,
+                    action: { token: 'number.float' }
+                },
+                { regex: /0[xX]@xdigit+@INTSP*/, action: { token: 'number.hex' } },
+                {
+                    regex: /0[0-7]+(?![0-9])@INTSP*/,
+                    action: { token: 'number.octal' }
+                },
+                //{regex: /0/, action: { token: 'number' } }, // INTZERO
+                // lexing_INT_dec:
+                // - testing_deciexp => lexing_FLOAT_deciexp
+                // - testing_fexponent => lexing_FLOAT_deciexp
+                // - otherwise => intspseq0 ([0-9]*[lLuU]?)
+                {
+                    regex: /@digit+(@fexponent|@deciexp)@FLOATSP*/,
+                    action: { token: 'number.float' }
+                },
+                {
+                    regex: /@digit@digitseq0@INTSP*/,
+                    action: { token: 'number.decimal' }
+                },
+                // DIGIT, if followed by digitseq0, is lexing_INT_dec
+                { regex: /@digit+@INTSP*/, action: { token: 'number' } }
+            ],
+            lexing_COMMENT_block_ml: [
+                [/[^\(\*]+/, 'comment'],
+                [/\(\*/, 'comment', '@push'],
+                [/\(\*/, 'comment.invalid'],
+                [/\*\)/, 'comment', '@pop'],
+                [/\*/, 'comment']
+            ],
+            lexing_COMMENT_block_c: [
+                [/[^\/*]+/, 'comment'],
+                // [/\/\*/, 'comment', '@push' ],    // nested C-style block comments not allowed
+                // [/\/\*/,    'comment.invalid' ],	// NOTE: this breaks block comments in the shape of /* //*/
+                [/\*\//, 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            lexing_COMMENT_rest: [
+                [/$/, 'comment', '@pop'],
+                [/.*/, 'comment']
+            ],
+            // NOTE: added by AS, specifically for highlighting
+            lexing_EFFECT_commaseq0: [
+                {
+                    regex: /@IDENTFST@IDENTRST+|@digit+/,
+                    action: {
+                        cases: {
+                            '@keywords_effects': { token: 'type.effect' },
+                            '@default': { token: 'identifier' }
+                        }
+                    }
+                },
+                { regex: /,/, action: { token: 'punctuation' } },
+                { regex: />/, action: { token: '@rematch', next: '@pop' } }
+            ],
+            lexing_EXTCODE: [
+                {
+                    regex: /^%}/,
+                    action: {
+                        token: '@rematch',
+                        next: '@pop',
+                        nextEmbedded: '@pop'
+                    }
+                },
+                { regex: /[^%]+/, action: '' }
+            ],
+            lexing_DQUOTE: [
+                { regex: /"/, action: { token: 'string.quote', next: '@pop' } },
+                // AS-20160628: additional hi-lighting for variables in staload/dynload strings
+                {
+                    regex: /(\{\$)(@IDENTFST@IDENTRST*)(\})/,
+                    action: [{ token: 'string.escape' }, { token: 'identifier' }, { token: 'string.escape' }]
+                },
+                { regex: /\\$/, action: { token: 'string.escape' } },
+                {
+                    regex: /\\(@ESCHAR|[xX]@xdigit+|@digit+)/,
+                    action: { token: 'string.escape' }
+                },
+                { regex: /[^\\"]+/, action: { token: 'string' } }
+            ]
+        }
+    };
+});
+

+ 897 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/powerquery/powerquery.js

@@ -0,0 +1,897 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/powerquery/powerquery',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['[', ']'],
+            ['(', ')'],
+            ['{', '}']
+        ],
+        autoClosingPairs: [
+            { open: '"', close: '"', notIn: ['string', 'comment', 'identifier'] },
+            { open: '[', close: ']', notIn: ['string', 'comment', 'identifier'] },
+            { open: '(', close: ')', notIn: ['string', 'comment', 'identifier'] },
+            { open: '{', close: '}', notIn: ['string', 'comment', 'identifier'] }
+        ]
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.pq',
+        ignoreCase: false,
+        brackets: [
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '{', close: '}', token: 'delimiter.brackets' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        operatorKeywords: ['and', 'not', 'or'],
+        keywords: [
+            'as',
+            'each',
+            'else',
+            'error',
+            'false',
+            'if',
+            'in',
+            'is',
+            'let',
+            'meta',
+            'otherwise',
+            'section',
+            'shared',
+            'then',
+            'true',
+            'try',
+            'type'
+        ],
+        constructors: ['#binary', '#date', '#datetime', '#datetimezone', '#duration', '#table', '#time'],
+        constants: ['#infinity', '#nan', '#sections', '#shared'],
+        typeKeywords: [
+            'action',
+            'any',
+            'anynonnull',
+            'none',
+            'null',
+            'logical',
+            'number',
+            'time',
+            'date',
+            'datetime',
+            'datetimezone',
+            'duration',
+            'text',
+            'binary',
+            'list',
+            'record',
+            'table',
+            'function'
+        ],
+        builtinFunctions: [
+            'Access.Database',
+            'Action.Return',
+            'Action.Sequence',
+            'Action.Try',
+            'ActiveDirectory.Domains',
+            'AdoDotNet.DataSource',
+            'AdoDotNet.Query',
+            'AdobeAnalytics.Cubes',
+            'AnalysisServices.Database',
+            'AnalysisServices.Databases',
+            'AzureStorage.BlobContents',
+            'AzureStorage.Blobs',
+            'AzureStorage.Tables',
+            'Binary.Buffer',
+            'Binary.Combine',
+            'Binary.Compress',
+            'Binary.Decompress',
+            'Binary.End',
+            'Binary.From',
+            'Binary.FromList',
+            'Binary.FromText',
+            'Binary.InferContentType',
+            'Binary.Length',
+            'Binary.ToList',
+            'Binary.ToText',
+            'BinaryFormat.7BitEncodedSignedInteger',
+            'BinaryFormat.7BitEncodedUnsignedInteger',
+            'BinaryFormat.Binary',
+            'BinaryFormat.Byte',
+            'BinaryFormat.ByteOrder',
+            'BinaryFormat.Choice',
+            'BinaryFormat.Decimal',
+            'BinaryFormat.Double',
+            'BinaryFormat.Group',
+            'BinaryFormat.Length',
+            'BinaryFormat.List',
+            'BinaryFormat.Null',
+            'BinaryFormat.Record',
+            'BinaryFormat.SignedInteger16',
+            'BinaryFormat.SignedInteger32',
+            'BinaryFormat.SignedInteger64',
+            'BinaryFormat.Single',
+            'BinaryFormat.Text',
+            'BinaryFormat.Transform',
+            'BinaryFormat.UnsignedInteger16',
+            'BinaryFormat.UnsignedInteger32',
+            'BinaryFormat.UnsignedInteger64',
+            'Byte.From',
+            'Character.FromNumber',
+            'Character.ToNumber',
+            'Combiner.CombineTextByDelimiter',
+            'Combiner.CombineTextByEachDelimiter',
+            'Combiner.CombineTextByLengths',
+            'Combiner.CombineTextByPositions',
+            'Combiner.CombineTextByRanges',
+            'Comparer.Equals',
+            'Comparer.FromCulture',
+            'Comparer.Ordinal',
+            'Comparer.OrdinalIgnoreCase',
+            'Csv.Document',
+            'Cube.AddAndExpandDimensionColumn',
+            'Cube.AddMeasureColumn',
+            'Cube.ApplyParameter',
+            'Cube.AttributeMemberId',
+            'Cube.AttributeMemberProperty',
+            'Cube.CollapseAndRemoveColumns',
+            'Cube.Dimensions',
+            'Cube.DisplayFolders',
+            'Cube.Measures',
+            'Cube.Parameters',
+            'Cube.Properties',
+            'Cube.PropertyKey',
+            'Cube.ReplaceDimensions',
+            'Cube.Transform',
+            'Currency.From',
+            'DB2.Database',
+            'Date.AddDays',
+            'Date.AddMonths',
+            'Date.AddQuarters',
+            'Date.AddWeeks',
+            'Date.AddYears',
+            'Date.Day',
+            'Date.DayOfWeek',
+            'Date.DayOfWeekName',
+            'Date.DayOfYear',
+            'Date.DaysInMonth',
+            'Date.EndOfDay',
+            'Date.EndOfMonth',
+            'Date.EndOfQuarter',
+            'Date.EndOfWeek',
+            'Date.EndOfYear',
+            'Date.From',
+            'Date.FromText',
+            'Date.IsInCurrentDay',
+            'Date.IsInCurrentMonth',
+            'Date.IsInCurrentQuarter',
+            'Date.IsInCurrentWeek',
+            'Date.IsInCurrentYear',
+            'Date.IsInNextDay',
+            'Date.IsInNextMonth',
+            'Date.IsInNextNDays',
+            'Date.IsInNextNMonths',
+            'Date.IsInNextNQuarters',
+            'Date.IsInNextNWeeks',
+            'Date.IsInNextNYears',
+            'Date.IsInNextQuarter',
+            'Date.IsInNextWeek',
+            'Date.IsInNextYear',
+            'Date.IsInPreviousDay',
+            'Date.IsInPreviousMonth',
+            'Date.IsInPreviousNDays',
+            'Date.IsInPreviousNMonths',
+            'Date.IsInPreviousNQuarters',
+            'Date.IsInPreviousNWeeks',
+            'Date.IsInPreviousNYears',
+            'Date.IsInPreviousQuarter',
+            'Date.IsInPreviousWeek',
+            'Date.IsInPreviousYear',
+            'Date.IsInYearToDate',
+            'Date.IsLeapYear',
+            'Date.Month',
+            'Date.MonthName',
+            'Date.QuarterOfYear',
+            'Date.StartOfDay',
+            'Date.StartOfMonth',
+            'Date.StartOfQuarter',
+            'Date.StartOfWeek',
+            'Date.StartOfYear',
+            'Date.ToRecord',
+            'Date.ToText',
+            'Date.WeekOfMonth',
+            'Date.WeekOfYear',
+            'Date.Year',
+            'DateTime.AddZone',
+            'DateTime.Date',
+            'DateTime.FixedLocalNow',
+            'DateTime.From',
+            'DateTime.FromFileTime',
+            'DateTime.FromText',
+            'DateTime.IsInCurrentHour',
+            'DateTime.IsInCurrentMinute',
+            'DateTime.IsInCurrentSecond',
+            'DateTime.IsInNextHour',
+            'DateTime.IsInNextMinute',
+            'DateTime.IsInNextNHours',
+            'DateTime.IsInNextNMinutes',
+            'DateTime.IsInNextNSeconds',
+            'DateTime.IsInNextSecond',
+            'DateTime.IsInPreviousHour',
+            'DateTime.IsInPreviousMinute',
+            'DateTime.IsInPreviousNHours',
+            'DateTime.IsInPreviousNMinutes',
+            'DateTime.IsInPreviousNSeconds',
+            'DateTime.IsInPreviousSecond',
+            'DateTime.LocalNow',
+            'DateTime.Time',
+            'DateTime.ToRecord',
+            'DateTime.ToText',
+            'DateTimeZone.FixedLocalNow',
+            'DateTimeZone.FixedUtcNow',
+            'DateTimeZone.From',
+            'DateTimeZone.FromFileTime',
+            'DateTimeZone.FromText',
+            'DateTimeZone.LocalNow',
+            'DateTimeZone.RemoveZone',
+            'DateTimeZone.SwitchZone',
+            'DateTimeZone.ToLocal',
+            'DateTimeZone.ToRecord',
+            'DateTimeZone.ToText',
+            'DateTimeZone.ToUtc',
+            'DateTimeZone.UtcNow',
+            'DateTimeZone.ZoneHours',
+            'DateTimeZone.ZoneMinutes',
+            'Decimal.From',
+            'Diagnostics.ActivityId',
+            'Diagnostics.Trace',
+            'DirectQueryCapabilities.From',
+            'Double.From',
+            'Duration.Days',
+            'Duration.From',
+            'Duration.FromText',
+            'Duration.Hours',
+            'Duration.Minutes',
+            'Duration.Seconds',
+            'Duration.ToRecord',
+            'Duration.ToText',
+            'Duration.TotalDays',
+            'Duration.TotalHours',
+            'Duration.TotalMinutes',
+            'Duration.TotalSeconds',
+            'Embedded.Value',
+            'Error.Record',
+            'Excel.CurrentWorkbook',
+            'Excel.Workbook',
+            'Exchange.Contents',
+            'Expression.Constant',
+            'Expression.Evaluate',
+            'Expression.Identifier',
+            'Facebook.Graph',
+            'File.Contents',
+            'Folder.Contents',
+            'Folder.Files',
+            'Function.From',
+            'Function.Invoke',
+            'Function.InvokeAfter',
+            'Function.IsDataSource',
+            'GoogleAnalytics.Accounts',
+            'Guid.From',
+            'HdInsight.Containers',
+            'HdInsight.Contents',
+            'HdInsight.Files',
+            'Hdfs.Contents',
+            'Hdfs.Files',
+            'Informix.Database',
+            'Int16.From',
+            'Int32.From',
+            'Int64.From',
+            'Int8.From',
+            'ItemExpression.From',
+            'Json.Document',
+            'Json.FromValue',
+            'Lines.FromBinary',
+            'Lines.FromText',
+            'Lines.ToBinary',
+            'Lines.ToText',
+            'List.Accumulate',
+            'List.AllTrue',
+            'List.Alternate',
+            'List.AnyTrue',
+            'List.Average',
+            'List.Buffer',
+            'List.Combine',
+            'List.Contains',
+            'List.ContainsAll',
+            'List.ContainsAny',
+            'List.Count',
+            'List.Covariance',
+            'List.DateTimeZones',
+            'List.DateTimes',
+            'List.Dates',
+            'List.Difference',
+            'List.Distinct',
+            'List.Durations',
+            'List.FindText',
+            'List.First',
+            'List.FirstN',
+            'List.Generate',
+            'List.InsertRange',
+            'List.Intersect',
+            'List.IsDistinct',
+            'List.IsEmpty',
+            'List.Last',
+            'List.LastN',
+            'List.MatchesAll',
+            'List.MatchesAny',
+            'List.Max',
+            'List.MaxN',
+            'List.Median',
+            'List.Min',
+            'List.MinN',
+            'List.Mode',
+            'List.Modes',
+            'List.NonNullCount',
+            'List.Numbers',
+            'List.PositionOf',
+            'List.PositionOfAny',
+            'List.Positions',
+            'List.Product',
+            'List.Random',
+            'List.Range',
+            'List.RemoveFirstN',
+            'List.RemoveItems',
+            'List.RemoveLastN',
+            'List.RemoveMatchingItems',
+            'List.RemoveNulls',
+            'List.RemoveRange',
+            'List.Repeat',
+            'List.ReplaceMatchingItems',
+            'List.ReplaceRange',
+            'List.ReplaceValue',
+            'List.Reverse',
+            'List.Select',
+            'List.Single',
+            'List.SingleOrDefault',
+            'List.Skip',
+            'List.Sort',
+            'List.StandardDeviation',
+            'List.Sum',
+            'List.Times',
+            'List.Transform',
+            'List.TransformMany',
+            'List.Union',
+            'List.Zip',
+            'Logical.From',
+            'Logical.FromText',
+            'Logical.ToText',
+            'MQ.Queue',
+            'MySQL.Database',
+            'Number.Abs',
+            'Number.Acos',
+            'Number.Asin',
+            'Number.Atan',
+            'Number.Atan2',
+            'Number.BitwiseAnd',
+            'Number.BitwiseNot',
+            'Number.BitwiseOr',
+            'Number.BitwiseShiftLeft',
+            'Number.BitwiseShiftRight',
+            'Number.BitwiseXor',
+            'Number.Combinations',
+            'Number.Cos',
+            'Number.Cosh',
+            'Number.Exp',
+            'Number.Factorial',
+            'Number.From',
+            'Number.FromText',
+            'Number.IntegerDivide',
+            'Number.IsEven',
+            'Number.IsNaN',
+            'Number.IsOdd',
+            'Number.Ln',
+            'Number.Log',
+            'Number.Log10',
+            'Number.Mod',
+            'Number.Permutations',
+            'Number.Power',
+            'Number.Random',
+            'Number.RandomBetween',
+            'Number.Round',
+            'Number.RoundAwayFromZero',
+            'Number.RoundDown',
+            'Number.RoundTowardZero',
+            'Number.RoundUp',
+            'Number.Sign',
+            'Number.Sin',
+            'Number.Sinh',
+            'Number.Sqrt',
+            'Number.Tan',
+            'Number.Tanh',
+            'Number.ToText',
+            'OData.Feed',
+            'Odbc.DataSource',
+            'Odbc.Query',
+            'OleDb.DataSource',
+            'OleDb.Query',
+            'Oracle.Database',
+            'Percentage.From',
+            'PostgreSQL.Database',
+            'RData.FromBinary',
+            'Record.AddField',
+            'Record.Combine',
+            'Record.Field',
+            'Record.FieldCount',
+            'Record.FieldNames',
+            'Record.FieldOrDefault',
+            'Record.FieldValues',
+            'Record.FromList',
+            'Record.FromTable',
+            'Record.HasFields',
+            'Record.RemoveFields',
+            'Record.RenameFields',
+            'Record.ReorderFields',
+            'Record.SelectFields',
+            'Record.ToList',
+            'Record.ToTable',
+            'Record.TransformFields',
+            'Replacer.ReplaceText',
+            'Replacer.ReplaceValue',
+            'RowExpression.Column',
+            'RowExpression.From',
+            'Salesforce.Data',
+            'Salesforce.Reports',
+            'SapBusinessWarehouse.Cubes',
+            'SapHana.Database',
+            'SharePoint.Contents',
+            'SharePoint.Files',
+            'SharePoint.Tables',
+            'Single.From',
+            'Soda.Feed',
+            'Splitter.SplitByNothing',
+            'Splitter.SplitTextByAnyDelimiter',
+            'Splitter.SplitTextByDelimiter',
+            'Splitter.SplitTextByEachDelimiter',
+            'Splitter.SplitTextByLengths',
+            'Splitter.SplitTextByPositions',
+            'Splitter.SplitTextByRanges',
+            'Splitter.SplitTextByRepeatedLengths',
+            'Splitter.SplitTextByWhitespace',
+            'Sql.Database',
+            'Sql.Databases',
+            'SqlExpression.SchemaFrom',
+            'SqlExpression.ToExpression',
+            'Sybase.Database',
+            'Table.AddColumn',
+            'Table.AddIndexColumn',
+            'Table.AddJoinColumn',
+            'Table.AddKey',
+            'Table.AggregateTableColumn',
+            'Table.AlternateRows',
+            'Table.Buffer',
+            'Table.Column',
+            'Table.ColumnCount',
+            'Table.ColumnNames',
+            'Table.ColumnsOfType',
+            'Table.Combine',
+            'Table.CombineColumns',
+            'Table.Contains',
+            'Table.ContainsAll',
+            'Table.ContainsAny',
+            'Table.DemoteHeaders',
+            'Table.Distinct',
+            'Table.DuplicateColumn',
+            'Table.ExpandListColumn',
+            'Table.ExpandRecordColumn',
+            'Table.ExpandTableColumn',
+            'Table.FillDown',
+            'Table.FillUp',
+            'Table.FilterWithDataTable',
+            'Table.FindText',
+            'Table.First',
+            'Table.FirstN',
+            'Table.FirstValue',
+            'Table.FromColumns',
+            'Table.FromList',
+            'Table.FromPartitions',
+            'Table.FromRecords',
+            'Table.FromRows',
+            'Table.FromValue',
+            'Table.Group',
+            'Table.HasColumns',
+            'Table.InsertRows',
+            'Table.IsDistinct',
+            'Table.IsEmpty',
+            'Table.Join',
+            'Table.Keys',
+            'Table.Last',
+            'Table.LastN',
+            'Table.MatchesAllRows',
+            'Table.MatchesAnyRows',
+            'Table.Max',
+            'Table.MaxN',
+            'Table.Min',
+            'Table.MinN',
+            'Table.NestedJoin',
+            'Table.Partition',
+            'Table.PartitionValues',
+            'Table.Pivot',
+            'Table.PositionOf',
+            'Table.PositionOfAny',
+            'Table.PrefixColumns',
+            'Table.Profile',
+            'Table.PromoteHeaders',
+            'Table.Range',
+            'Table.RemoveColumns',
+            'Table.RemoveFirstN',
+            'Table.RemoveLastN',
+            'Table.RemoveMatchingRows',
+            'Table.RemoveRows',
+            'Table.RemoveRowsWithErrors',
+            'Table.RenameColumns',
+            'Table.ReorderColumns',
+            'Table.Repeat',
+            'Table.ReplaceErrorValues',
+            'Table.ReplaceKeys',
+            'Table.ReplaceMatchingRows',
+            'Table.ReplaceRelationshipIdentity',
+            'Table.ReplaceRows',
+            'Table.ReplaceValue',
+            'Table.ReverseRows',
+            'Table.RowCount',
+            'Table.Schema',
+            'Table.SelectColumns',
+            'Table.SelectRows',
+            'Table.SelectRowsWithErrors',
+            'Table.SingleRow',
+            'Table.Skip',
+            'Table.Sort',
+            'Table.SplitColumn',
+            'Table.ToColumns',
+            'Table.ToList',
+            'Table.ToRecords',
+            'Table.ToRows',
+            'Table.TransformColumnNames',
+            'Table.TransformColumnTypes',
+            'Table.TransformColumns',
+            'Table.TransformRows',
+            'Table.Transpose',
+            'Table.Unpivot',
+            'Table.UnpivotOtherColumns',
+            'Table.View',
+            'Table.ViewFunction',
+            'TableAction.DeleteRows',
+            'TableAction.InsertRows',
+            'TableAction.UpdateRows',
+            'Tables.GetRelationships',
+            'Teradata.Database',
+            'Text.AfterDelimiter',
+            'Text.At',
+            'Text.BeforeDelimiter',
+            'Text.BetweenDelimiters',
+            'Text.Clean',
+            'Text.Combine',
+            'Text.Contains',
+            'Text.End',
+            'Text.EndsWith',
+            'Text.Format',
+            'Text.From',
+            'Text.FromBinary',
+            'Text.Insert',
+            'Text.Length',
+            'Text.Lower',
+            'Text.Middle',
+            'Text.NewGuid',
+            'Text.PadEnd',
+            'Text.PadStart',
+            'Text.PositionOf',
+            'Text.PositionOfAny',
+            'Text.Proper',
+            'Text.Range',
+            'Text.Remove',
+            'Text.RemoveRange',
+            'Text.Repeat',
+            'Text.Replace',
+            'Text.ReplaceRange',
+            'Text.Select',
+            'Text.Split',
+            'Text.SplitAny',
+            'Text.Start',
+            'Text.StartsWith',
+            'Text.ToBinary',
+            'Text.ToList',
+            'Text.Trim',
+            'Text.TrimEnd',
+            'Text.TrimStart',
+            'Text.Upper',
+            'Time.EndOfHour',
+            'Time.From',
+            'Time.FromText',
+            'Time.Hour',
+            'Time.Minute',
+            'Time.Second',
+            'Time.StartOfHour',
+            'Time.ToRecord',
+            'Time.ToText',
+            'Type.AddTableKey',
+            'Type.ClosedRecord',
+            'Type.Facets',
+            'Type.ForFunction',
+            'Type.ForRecord',
+            'Type.FunctionParameters',
+            'Type.FunctionRequiredParameters',
+            'Type.FunctionReturn',
+            'Type.Is',
+            'Type.IsNullable',
+            'Type.IsOpenRecord',
+            'Type.ListItem',
+            'Type.NonNullable',
+            'Type.OpenRecord',
+            'Type.RecordFields',
+            'Type.ReplaceFacets',
+            'Type.ReplaceTableKeys',
+            'Type.TableColumn',
+            'Type.TableKeys',
+            'Type.TableRow',
+            'Type.TableSchema',
+            'Type.Union',
+            'Uri.BuildQueryString',
+            'Uri.Combine',
+            'Uri.EscapeDataString',
+            'Uri.Parts',
+            'Value.Add',
+            'Value.As',
+            'Value.Compare',
+            'Value.Divide',
+            'Value.Equals',
+            'Value.Firewall',
+            'Value.FromText',
+            'Value.Is',
+            'Value.Metadata',
+            'Value.Multiply',
+            'Value.NativeQuery',
+            'Value.NullableEquals',
+            'Value.RemoveMetadata',
+            'Value.ReplaceMetadata',
+            'Value.ReplaceType',
+            'Value.Subtract',
+            'Value.Type',
+            'ValueAction.NativeStatement',
+            'ValueAction.Replace',
+            'Variable.Value',
+            'Web.Contents',
+            'Web.Page',
+            'WebAction.Request',
+            'Xml.Document',
+            'Xml.Tables'
+        ],
+        builtinConstants: [
+            'BinaryEncoding.Base64',
+            'BinaryEncoding.Hex',
+            'BinaryOccurrence.Optional',
+            'BinaryOccurrence.Repeating',
+            'BinaryOccurrence.Required',
+            'ByteOrder.BigEndian',
+            'ByteOrder.LittleEndian',
+            'Compression.Deflate',
+            'Compression.GZip',
+            'CsvStyle.QuoteAfterDelimiter',
+            'CsvStyle.QuoteAlways',
+            'Culture.Current',
+            'Day.Friday',
+            'Day.Monday',
+            'Day.Saturday',
+            'Day.Sunday',
+            'Day.Thursday',
+            'Day.Tuesday',
+            'Day.Wednesday',
+            'ExtraValues.Error',
+            'ExtraValues.Ignore',
+            'ExtraValues.List',
+            'GroupKind.Global',
+            'GroupKind.Local',
+            'JoinAlgorithm.Dynamic',
+            'JoinAlgorithm.LeftHash',
+            'JoinAlgorithm.LeftIndex',
+            'JoinAlgorithm.PairwiseHash',
+            'JoinAlgorithm.RightHash',
+            'JoinAlgorithm.RightIndex',
+            'JoinAlgorithm.SortMerge',
+            'JoinKind.FullOuter',
+            'JoinKind.Inner',
+            'JoinKind.LeftAnti',
+            'JoinKind.LeftOuter',
+            'JoinKind.RightAnti',
+            'JoinKind.RightOuter',
+            'JoinSide.Left',
+            'JoinSide.Right',
+            'MissingField.Error',
+            'MissingField.Ignore',
+            'MissingField.UseNull',
+            'Number.E',
+            'Number.Epsilon',
+            'Number.NaN',
+            'Number.NegativeInfinity',
+            'Number.PI',
+            'Number.PositiveInfinity',
+            'Occurrence.All',
+            'Occurrence.First',
+            'Occurrence.Last',
+            'Occurrence.Optional',
+            'Occurrence.Repeating',
+            'Occurrence.Required',
+            'Order.Ascending',
+            'Order.Descending',
+            'Precision.Decimal',
+            'Precision.Double',
+            'QuoteStyle.Csv',
+            'QuoteStyle.None',
+            'RelativePosition.FromEnd',
+            'RelativePosition.FromStart',
+            'RoundingMode.AwayFromZero',
+            'RoundingMode.Down',
+            'RoundingMode.ToEven',
+            'RoundingMode.TowardZero',
+            'RoundingMode.Up',
+            'SapHanaDistribution.All',
+            'SapHanaDistribution.Connection',
+            'SapHanaDistribution.Off',
+            'SapHanaDistribution.Statement',
+            'SapHanaRangeOperator.Equals',
+            'SapHanaRangeOperator.GreaterThan',
+            'SapHanaRangeOperator.GreaterThanOrEquals',
+            'SapHanaRangeOperator.LessThan',
+            'SapHanaRangeOperator.LessThanOrEquals',
+            'SapHanaRangeOperator.NotEquals',
+            'TextEncoding.Ascii',
+            'TextEncoding.BigEndianUnicode',
+            'TextEncoding.Unicode',
+            'TextEncoding.Utf16',
+            'TextEncoding.Utf8',
+            'TextEncoding.Windows',
+            'TraceLevel.Critical',
+            'TraceLevel.Error',
+            'TraceLevel.Information',
+            'TraceLevel.Verbose',
+            'TraceLevel.Warning',
+            'WebMethod.Delete',
+            'WebMethod.Get',
+            'WebMethod.Head',
+            'WebMethod.Patch',
+            'WebMethod.Post',
+            'WebMethod.Put'
+        ],
+        builtinTypes: [
+            'Action.Type',
+            'Any.Type',
+            'Binary.Type',
+            'BinaryEncoding.Type',
+            'BinaryOccurrence.Type',
+            'Byte.Type',
+            'ByteOrder.Type',
+            'Character.Type',
+            'Compression.Type',
+            'CsvStyle.Type',
+            'Currency.Type',
+            'Date.Type',
+            'DateTime.Type',
+            'DateTimeZone.Type',
+            'Day.Type',
+            'Decimal.Type',
+            'Double.Type',
+            'Duration.Type',
+            'ExtraValues.Type',
+            'Function.Type',
+            'GroupKind.Type',
+            'Guid.Type',
+            'Int16.Type',
+            'Int32.Type',
+            'Int64.Type',
+            'Int8.Type',
+            'JoinAlgorithm.Type',
+            'JoinKind.Type',
+            'JoinSide.Type',
+            'List.Type',
+            'Logical.Type',
+            'MissingField.Type',
+            'None.Type',
+            'Null.Type',
+            'Number.Type',
+            'Occurrence.Type',
+            'Order.Type',
+            'Password.Type',
+            'Percentage.Type',
+            'Precision.Type',
+            'QuoteStyle.Type',
+            'Record.Type',
+            'RelativePosition.Type',
+            'RoundingMode.Type',
+            'SapHanaDistribution.Type',
+            'SapHanaRangeOperator.Type',
+            'Single.Type',
+            'Table.Type',
+            'Text.Type',
+            'TextEncoding.Type',
+            'Time.Type',
+            'TraceLevel.Type',
+            'Type.Type',
+            'Uri.Type',
+            'WebMethod.Type'
+        ],
+        tokenizer: {
+            root: [
+                // quoted identifier
+                [/#"[\w \.]+"/, 'identifier.quote'],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F]+/, 'number.hex'],
+                [/\d+([eE][\-+]?\d+)?/, 'number'],
+                // keywords
+                [
+                    /(#?[a-z]+)\b/,
+                    {
+                        cases: {
+                            '@typeKeywords': 'type',
+                            '@keywords': 'keyword',
+                            '@constants': 'constant',
+                            '@constructors': 'constructor',
+                            '@operatorKeywords': 'operators',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // built-in types
+                [
+                    /\b([A-Z][a-zA-Z0-9]+\.Type)\b/,
+                    {
+                        cases: {
+                            '@builtinTypes': 'type',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // other built-ins
+                [
+                    /\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,
+                    {
+                        cases: {
+                            '@builtinFunctions': 'keyword.function',
+                            '@builtinConstants': 'constant',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // other identifiers
+                [/\b([a-zA-Z_][\w\.]*)\b/, 'identifier'],
+                { include: '@whitespace' },
+                { include: '@comments' },
+                { include: '@strings' },
+                [/[{}()\[\]]/, '@brackets'],
+                [/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/, 'operators'],
+                [/[,;]/, 'delimiter']
+            ],
+            whitespace: [[/\s+/, 'white']],
+            comments: [
+                ['\\/\\*', 'comment', '@comment'],
+                ['\\/\\/+.*', 'comment']
+            ],
+            comment: [
+                ['\\*\\/', 'comment', '@pop'],
+                ['.', 'comment']
+            ],
+            strings: [['"', 'string', '@string']],
+            string: [
+                ['""', 'string.escape'],
+                ['"', 'string', '@pop'],
+                ['.', 'string']
+            ]
+        }
+    };
+});
+

+ 246 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/powershell/powershell.js

@@ -0,0 +1,246 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/powershell/powershell',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        // the default separators except `$-`
+        wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+        comments: {
+            lineComment: '#',
+            blockComment: ['<#', '#>']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        folding: {
+            markers: {
+                start: new RegExp('^\\s*#region\\b'),
+                end: new RegExp('^\\s*#endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        ignoreCase: true,
+        tokenPostfix: '.ps1',
+        brackets: [
+            { token: 'delimiter.curly', open: '{', close: '}' },
+            { token: 'delimiter.square', open: '[', close: ']' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' }
+        ],
+        keywords: [
+            'begin',
+            'break',
+            'catch',
+            'class',
+            'continue',
+            'data',
+            'define',
+            'do',
+            'dynamicparam',
+            'else',
+            'elseif',
+            'end',
+            'exit',
+            'filter',
+            'finally',
+            'for',
+            'foreach',
+            'from',
+            'function',
+            'if',
+            'in',
+            'param',
+            'process',
+            'return',
+            'switch',
+            'throw',
+            'trap',
+            'try',
+            'until',
+            'using',
+            'var',
+            'while',
+            'workflow',
+            'parallel',
+            'sequence',
+            'inlinescript',
+            'configuration'
+        ],
+        helpKeywords: /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,
+        // we include these common regular expressions
+        symbols: /[=><!~?&%|+\-*\/\^;\.,]+/,
+        escapes: /`(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // commands and keywords
+                [
+                    /[a-zA-Z_][\w-]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': ''
+                        }
+                    }
+                ],
+                // whitespace
+                [/[ \t\r\n]+/, ''],
+                // labels
+                [/^:\w*/, 'metatag'],
+                // variables
+                [
+                    /\$(\{((global|local|private|script|using):)?[\w]+\}|((global|local|private|script|using):)?[\w]+)/,
+                    'variable'
+                ],
+                // Comments
+                [/<#/, 'comment', '@comment'],
+                [/#.*$/, 'comment'],
+                // delimiters
+                [/[{}()\[\]]/, '@brackets'],
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
+                [/\d+?/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings:
+                [/\@"/, 'string', '@herestring."'],
+                [/\@'/, 'string', "@herestring.'"],
+                [
+                    /"/,
+                    {
+                        cases: {
+                            '@eos': 'string',
+                            '@default': { token: 'string', next: '@string."' }
+                        }
+                    }
+                ],
+                [
+                    /'/,
+                    {
+                        cases: {
+                            '@eos': 'string',
+                            '@default': { token: 'string', next: "@string.'" }
+                        }
+                    }
+                ]
+            ],
+            string: [
+                [
+                    /[^"'\$`]+/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string', next: '@popall' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [
+                    /@escapes/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string.escape', next: '@popall' },
+                            '@default': 'string.escape'
+                        }
+                    }
+                ],
+                [
+                    /`./,
+                    {
+                        cases: {
+                            '@eos': {
+                                token: 'string.escape.invalid',
+                                next: '@popall'
+                            },
+                            '@default': 'string.escape.invalid'
+                        }
+                    }
+                ],
+                [
+                    /\$[\w]+$/,
+                    {
+                        cases: {
+                            '$S2=="': { token: 'variable', next: '@popall' },
+                            '@default': { token: 'string', next: '@popall' }
+                        }
+                    }
+                ],
+                [
+                    /\$[\w]+/,
+                    {
+                        cases: {
+                            '$S2=="': 'variable',
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': {
+                                cases: {
+                                    '@eos': { token: 'string', next: '@popall' },
+                                    '@default': 'string'
+                                }
+                            }
+                        }
+                    }
+                ]
+            ],
+            herestring: [
+                [
+                    /^\s*(["'])@/,
+                    {
+                        cases: {
+                            '$1==$S2': { token: 'string', next: '@pop' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [/[^\$`]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/`./, 'string.escape.invalid'],
+                [
+                    /\$[\w]+/,
+                    {
+                        cases: {
+                            '$S2=="': 'variable',
+                            '@default': 'string'
+                        }
+                    }
+                ]
+            ],
+            comment: [
+                [/[^#\.]+/, 'comment'],
+                [/#>/, 'comment', '@pop'],
+                [/(\.)(@helpKeywords)(?!\w)/, { token: 'comment.keyword.$2' }],
+                [/[\.#]/, 'comment']
+            ]
+        }
+    };
+});
+

+ 418 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/protobuf/protobuf.js

@@ -0,0 +1,418 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+define('vs/basic-languages/protobuf/protobuf',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    var namedLiterals = ['true', 'false'];
+    exports.conf = {
+        comments: {
+            lineComment: '//',
+            blockComment: ['/*', '*/']
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')'],
+            ['<', '>']
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '<', close: '>' },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string'] }
+        ],
+        autoCloseBefore: ".,=}])>' \n\t",
+        indentationRules: {
+            increaseIndentPattern: new RegExp('^((?!\\/\\/).)*(\\{[^}"\'`]*|\\([^)"\'`]*|\\[[^\\]"\'`]*)$'),
+            decreaseIndentPattern: new RegExp('^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$')
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.proto',
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.square' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' },
+            { open: '<', close: '>', token: 'delimiter.angle' }
+        ],
+        symbols: /[=><!~?:&|+\-*/^%]+/,
+        keywords: [
+            'syntax',
+            'import',
+            'weak',
+            'public',
+            'package',
+            'option',
+            'repeated',
+            'oneof',
+            'map',
+            'reserved',
+            'to',
+            'max',
+            'enum',
+            'message',
+            'service',
+            'rpc',
+            'stream',
+            'returns',
+            'package',
+            'optional',
+            'true',
+            'false'
+        ],
+        builtinTypes: [
+            'double',
+            'float',
+            'int32',
+            'int64',
+            'uint32',
+            'uint64',
+            'sint32',
+            'sint64',
+            'fixed32',
+            'fixed64',
+            'sfixed32',
+            'sfixed64',
+            'bool',
+            'string',
+            'bytes'
+        ],
+        operators: ['=', '+', '-'],
+        namedLiterals: namedLiterals,
+        escapes: "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",
+        identifier: /[a-zA-Z]\w*/,
+        fullIdentifier: /@identifier(?:\s*\.\s*@identifier)*/,
+        optionName: /(?:@identifier|\(\s*@fullIdentifier\s*\))(?:\s*\.\s*@identifier)*/,
+        messageName: /@identifier/,
+        enumName: /@identifier/,
+        messageType: /\.?\s*(?:@identifier\s*\.\s*)*@messageName/,
+        enumType: /\.?\s*(?:@identifier\s*\.\s*)*@enumName/,
+        floatLit: /[0-9]+\s*\.\s*[0-9]*(?:@exponent)?|[0-9]+@exponent|\.[0-9]+(?:@exponent)?/,
+        exponent: /[eE]\s*[+-]?\s*[0-9]+/,
+        boolLit: /true\b|false\b/,
+        decimalLit: /[1-9][0-9]*/,
+        octalLit: /0[0-7]*/,
+        hexLit: /0[xX][0-9a-fA-F]+/,
+        type: /double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes|@messageType|@enumType/,
+        keyType: /int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string/,
+        tokenizer: {
+            root: [
+                { include: '@whitespace' },
+                [/syntax/, 'keyword'],
+                [/=/, 'operators'],
+                [/;/, 'delimiter'],
+                [
+                    /(")(proto3)(")/,
+                    ['string.quote', 'string', { token: 'string.quote', switchTo: '@topLevel.proto3' }]
+                ],
+                [
+                    /(")(proto2)(")/,
+                    ['string.quote', 'string', { token: 'string.quote', switchTo: '@topLevel.proto2' }]
+                ]
+            ],
+            topLevel: [
+                // whitespace
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/=/, 'operators'],
+                [/[;.]/, 'delimiter'],
+                [
+                    /@fullIdentifier/,
+                    {
+                        cases: {
+                            option: { token: 'keyword', next: '@option.$S2' },
+                            enum: { token: 'keyword', next: '@enumDecl.$S2' },
+                            message: { token: 'keyword', next: '@messageDecl.$S2' },
+                            service: { token: 'keyword', next: '@serviceDecl.$S2' },
+                            extend: {
+                                cases: {
+                                    '$S2==proto2': { token: 'keyword', next: '@extendDecl.$S2' }
+                                }
+                            },
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ]
+            ],
+            enumDecl: [
+                { include: '@whitespace' },
+                [/@identifier/, 'type.identifier'],
+                [/{/, { token: '@brackets', bracket: '@open', switchTo: '@enumBody.$S2' }]
+            ],
+            enumBody: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/=/, 'operators'],
+                [/;/, 'delimiter'],
+                [/option\b/, 'keyword', '@option.$S2'],
+                [/@identifier/, 'identifier'],
+                [/\[/, { token: '@brackets', bracket: '@open', next: '@options.$S2' }],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            messageDecl: [
+                { include: '@whitespace' },
+                [/@identifier/, 'type.identifier'],
+                [/{/, { token: '@brackets', bracket: '@open', switchTo: '@messageBody.$S2' }]
+            ],
+            messageBody: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/=/, 'operators'],
+                [/;/, 'delimiter'],
+                [
+                    '(map)(s*)(<)',
+                    ['keyword', 'white', { token: '@brackets', bracket: '@open', next: '@map.$S2' }]
+                ],
+                [
+                    /@identifier/,
+                    {
+                        cases: {
+                            option: { token: 'keyword', next: '@option.$S2' },
+                            enum: { token: 'keyword', next: '@enumDecl.$S2' },
+                            message: { token: 'keyword', next: '@messageDecl.$S2' },
+                            oneof: { token: 'keyword', next: '@oneofDecl.$S2' },
+                            extensions: {
+                                cases: {
+                                    '$S2==proto2': { token: 'keyword', next: '@reserved.$S2' }
+                                }
+                            },
+                            reserved: { token: 'keyword', next: '@reserved.$S2' },
+                            '(?:repeated|optional)': { token: 'keyword', next: '@field.$S2' },
+                            required: {
+                                cases: {
+                                    '$S2==proto2': { token: 'keyword', next: '@field.$S2' }
+                                }
+                            },
+                            '$S2==proto3': { token: '@rematch', next: '@field.$S2' }
+                        }
+                    }
+                ],
+                [/\[/, { token: '@brackets', bracket: '@open', next: '@options.$S2' }],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            extendDecl: [
+                { include: '@whitespace' },
+                [/@identifier/, 'type.identifier'],
+                [/{/, { token: '@brackets', bracket: '@open', switchTo: '@extendBody.$S2' }]
+            ],
+            extendBody: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/;/, 'delimiter'],
+                [/(?:repeated|optional|required)/, 'keyword', '@field.$S2'],
+                [/\[/, { token: '@brackets', bracket: '@open', next: '@options.$S2' }],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            options: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/;/, 'delimiter'],
+                [/@optionName/, 'annotation'],
+                [/[()]/, 'annotation.brackets'],
+                [/=/, 'operator'],
+                [/\]/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            option: [
+                { include: '@whitespace' },
+                [/@optionName/, 'annotation'],
+                [/[()]/, 'annotation.brackets'],
+                [/=/, 'operator', '@pop']
+            ],
+            oneofDecl: [
+                { include: '@whitespace' },
+                [/@identifier/, 'identifier'],
+                [/{/, { token: '@brackets', bracket: '@open', switchTo: '@oneofBody.$S2' }]
+            ],
+            oneofBody: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/;/, 'delimiter'],
+                [/(@identifier)(\s*)(=)/, ['identifier', 'white', 'delimiter']],
+                [
+                    /@fullIdentifier|\./,
+                    {
+                        cases: {
+                            '@builtinTypes': 'keyword',
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ],
+                [/\[/, { token: '@brackets', bracket: '@open', next: '@options.$S2' }],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            reserved: [
+                { include: '@whitespace' },
+                [/,/, 'delimiter'],
+                [/;/, 'delimiter', '@pop'],
+                { include: '@constant' },
+                [/to\b|max\b/, 'keyword']
+            ],
+            map: [
+                { include: '@whitespace' },
+                [
+                    /@fullIdentifier|\./,
+                    {
+                        cases: {
+                            '@builtinTypes': 'keyword',
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ],
+                [/,/, 'delimiter'],
+                [/>/, { token: '@brackets', bracket: '@close', switchTo: 'identifier' }]
+            ],
+            field: [
+                { include: '@whitespace' },
+                [
+                    'group',
+                    {
+                        cases: {
+                            '$S2==proto2': { token: 'keyword', switchTo: '@groupDecl.$S2' }
+                        }
+                    }
+                ],
+                [/(@identifier)(\s*)(=)/, ['identifier', 'white', { token: 'delimiter', next: '@pop' }]],
+                [
+                    /@fullIdentifier|\./,
+                    {
+                        cases: {
+                            '@builtinTypes': 'keyword',
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ]
+            ],
+            groupDecl: [
+                { include: '@whitespace' },
+                [/@identifier/, 'identifier'],
+                ['=', 'operator'],
+                [/{/, { token: '@brackets', bracket: '@open', switchTo: '@messageBody.$S2' }],
+                { include: '@constant' }
+            ],
+            type: [
+                { include: '@whitespace' },
+                [/@identifier/, 'type.identifier', '@pop'],
+                [/./, 'delimiter']
+            ],
+            identifier: [{ include: '@whitespace' }, [/@identifier/, 'identifier', '@pop']],
+            serviceDecl: [
+                { include: '@whitespace' },
+                [/@identifier/, 'identifier'],
+                [/{/, { token: '@brackets', bracket: '@open', switchTo: '@serviceBody.$S2' }]
+            ],
+            serviceBody: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/;/, 'delimiter'],
+                [/option\b/, 'keyword', '@option.$S2'],
+                [/rpc\b/, 'keyword', '@rpc.$S2'],
+                [/\[/, { token: '@brackets', bracket: '@open', next: '@options.$S2' }],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            rpc: [
+                { include: '@whitespace' },
+                [/@identifier/, 'identifier'],
+                [/\(/, { token: '@brackets', bracket: '@open', switchTo: '@request.$S2' }],
+                [/{/, { token: '@brackets', bracket: '@open', next: '@methodOptions.$S2' }],
+                [/;/, 'delimiter', '@pop']
+            ],
+            request: [
+                { include: '@whitespace' },
+                [
+                    /@messageType/,
+                    {
+                        cases: {
+                            stream: { token: 'keyword', next: '@type.$S2' },
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ],
+                [/\)/, { token: '@brackets', bracket: '@close', switchTo: '@returns.$S2' }]
+            ],
+            returns: [
+                { include: '@whitespace' },
+                [/returns\b/, 'keyword'],
+                [/\(/, { token: '@brackets', bracket: '@open', switchTo: '@response.$S2' }]
+            ],
+            response: [
+                { include: '@whitespace' },
+                [
+                    /@messageType/,
+                    {
+                        cases: {
+                            stream: { token: 'keyword', next: '@type.$S2' },
+                            '@default': 'type.identifier'
+                        }
+                    }
+                ],
+                [/\)/, { token: '@brackets', bracket: '@close', switchTo: '@rpc.$S2' }]
+            ],
+            methodOptions: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/;/, 'delimiter'],
+                ['option', 'keyword'],
+                [/@optionName/, 'annotation'],
+                [/[()]/, 'annotation.brackets'],
+                [/=/, 'operator'],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ],
+            comment: [
+                [/[^\/*]+/, 'comment'],
+                [/\/\*/, 'comment', '@push'],
+                ['\\*/', 'comment', '@pop'],
+                [/[\/*]/, 'comment']
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            stringSingle: [
+                [/[^\\']+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/\\./, 'string.escape.invalid'],
+                [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            constant: [
+                ['@boolLit', 'keyword.constant'],
+                ['@hexLit', 'number.hex'],
+                ['@octalLit', 'number.octal'],
+                ['@decimalLit', 'number'],
+                ['@floatLit', 'number.float'],
+                [/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/, 'string.invalid'],
+                [/"/, { token: 'string.quote', bracket: '@open', next: '@string' }],
+                [/'/, { token: 'string.quote', bracket: '@open', next: '@stringSingle' }],
+                [/{/, { token: '@brackets', bracket: '@open', next: '@prototext' }],
+                [/identifier/, 'identifier']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, 'white'],
+                [/\/\*/, 'comment', '@comment'],
+                [/\/\/.*$/, 'comment']
+            ],
+            prototext: [
+                { include: '@whitespace' },
+                { include: '@constant' },
+                [/@identifier/, 'identifier'],
+                [/[:;]/, 'delimiter'],
+                [/}/, { token: '@brackets', bracket: '@close', next: '@pop' }]
+            ]
+        }
+    };
+});
+

+ 409 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/pug/pug.js

@@ -0,0 +1,409 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/pug/pug',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '"', close: '"', notIn: ['string', 'comment'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] },
+            { open: '{', close: '}', notIn: ['string', 'comment'] },
+            { open: '[', close: ']', notIn: ['string', 'comment'] },
+            { open: '(', close: ')', notIn: ['string', 'comment'] }
+        ],
+        folding: {
+            offSide: true
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.pug',
+        ignoreCase: true,
+        brackets: [
+            { token: 'delimiter.curly', open: '{', close: '}' },
+            { token: 'delimiter.array', open: '[', close: ']' },
+            { token: 'delimiter.parenthesis', open: '(', close: ')' }
+        ],
+        keywords: [
+            'append',
+            'block',
+            'case',
+            'default',
+            'doctype',
+            'each',
+            'else',
+            'extends',
+            'for',
+            'if',
+            'in',
+            'include',
+            'mixin',
+            'typeof',
+            'unless',
+            'var',
+            'when'
+        ],
+        tags: [
+            'a',
+            'abbr',
+            'acronym',
+            'address',
+            'area',
+            'article',
+            'aside',
+            'audio',
+            'b',
+            'base',
+            'basefont',
+            'bdi',
+            'bdo',
+            'blockquote',
+            'body',
+            'br',
+            'button',
+            'canvas',
+            'caption',
+            'center',
+            'cite',
+            'code',
+            'col',
+            'colgroup',
+            'command',
+            'datalist',
+            'dd',
+            'del',
+            'details',
+            'dfn',
+            'div',
+            'dl',
+            'dt',
+            'em',
+            'embed',
+            'fieldset',
+            'figcaption',
+            'figure',
+            'font',
+            'footer',
+            'form',
+            'frame',
+            'frameset',
+            'h1',
+            'h2',
+            'h3',
+            'h4',
+            'h5',
+            'h6',
+            'head',
+            'header',
+            'hgroup',
+            'hr',
+            'html',
+            'i',
+            'iframe',
+            'img',
+            'input',
+            'ins',
+            'keygen',
+            'kbd',
+            'label',
+            'li',
+            'link',
+            'map',
+            'mark',
+            'menu',
+            'meta',
+            'meter',
+            'nav',
+            'noframes',
+            'noscript',
+            'object',
+            'ol',
+            'optgroup',
+            'option',
+            'output',
+            'p',
+            'param',
+            'pre',
+            'progress',
+            'q',
+            'rp',
+            'rt',
+            'ruby',
+            's',
+            'samp',
+            'script',
+            'section',
+            'select',
+            'small',
+            'source',
+            'span',
+            'strike',
+            'strong',
+            'style',
+            'sub',
+            'summary',
+            'sup',
+            'table',
+            'tbody',
+            'td',
+            'textarea',
+            'tfoot',
+            'th',
+            'thead',
+            'time',
+            'title',
+            'tr',
+            'tracks',
+            'tt',
+            'u',
+            'ul',
+            'video',
+            'wbr'
+        ],
+        // we include these common regular expressions
+        symbols: /[\+\-\*\%\&\|\!\=\/\.\,\:]+/,
+        escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
+        tokenizer: {
+            root: [
+                // Tag or a keyword at start
+                [
+                    /^(\s*)([a-zA-Z_-][\w-]*)/,
+                    {
+                        cases: {
+                            '$2@tags': {
+                                cases: {
+                                    '@eos': ['', 'tag'],
+                                    '@default': ['', { token: 'tag', next: '@tag.$1' }]
+                                }
+                            },
+                            '$2@keywords': ['', { token: 'keyword.$2' }],
+                            '@default': ['', '']
+                        }
+                    }
+                ],
+                // id
+                [
+                    /^(\s*)(#[a-zA-Z_-][\w-]*)/,
+                    {
+                        cases: {
+                            '@eos': ['', 'tag.id'],
+                            '@default': ['', { token: 'tag.id', next: '@tag.$1' }]
+                        }
+                    }
+                ],
+                // class
+                [
+                    /^(\s*)(\.[a-zA-Z_-][\w-]*)/,
+                    {
+                        cases: {
+                            '@eos': ['', 'tag.class'],
+                            '@default': ['', { token: 'tag.class', next: '@tag.$1' }]
+                        }
+                    }
+                ],
+                // plain text with pipe
+                [/^(\s*)(\|.*)$/, ''],
+                { include: '@whitespace' },
+                // keywords
+                [
+                    /[a-zA-Z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@keywords': { token: 'keyword.$0' },
+                            '@default': ''
+                        }
+                    }
+                ],
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/@symbols/, 'delimiter'],
+                // numbers
+                [/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/\d+/, 'number'],
+                // strings:
+                [/"/, 'string', '@string."'],
+                [/'/, 'string', "@string.'"]
+            ],
+            tag: [
+                [/(\.)(\s*$)/, [{ token: 'delimiter', next: '@blockText.$S2.' }, '']],
+                [/\s+/, { token: '', next: '@simpleText' }],
+                // id
+                [
+                    /#[a-zA-Z_-][\w-]*/,
+                    {
+                        cases: {
+                            '@eos': { token: 'tag.id', next: '@pop' },
+                            '@default': 'tag.id'
+                        }
+                    }
+                ],
+                // class
+                [
+                    /\.[a-zA-Z_-][\w-]*/,
+                    {
+                        cases: {
+                            '@eos': { token: 'tag.class', next: '@pop' },
+                            '@default': 'tag.class'
+                        }
+                    }
+                ],
+                // attributes
+                [/\(/, { token: 'delimiter.parenthesis', next: '@attributeList' }]
+            ],
+            simpleText: [
+                [/[^#]+$/, { token: '', next: '@popall' }],
+                [/[^#]+/, { token: '' }],
+                // interpolation
+                [
+                    /(#{)([^}]*)(})/,
+                    {
+                        cases: {
+                            '@eos': [
+                                'interpolation.delimiter',
+                                'interpolation',
+                                {
+                                    token: 'interpolation.delimiter',
+                                    next: '@popall'
+                                }
+                            ],
+                            '@default': ['interpolation.delimiter', 'interpolation', 'interpolation.delimiter']
+                        }
+                    }
+                ],
+                [/#$/, { token: '', next: '@popall' }],
+                [/#/, '']
+            ],
+            attributeList: [
+                [/\s+/, ''],
+                [
+                    /(\w+)(\s*=\s*)("|')/,
+                    ['attribute.name', 'delimiter', { token: 'attribute.value', next: '@value.$3' }]
+                ],
+                [/\w+/, 'attribute.name'],
+                [
+                    /,/,
+                    {
+                        cases: {
+                            '@eos': {
+                                token: 'attribute.delimiter',
+                                next: '@popall'
+                            },
+                            '@default': 'attribute.delimiter'
+                        }
+                    }
+                ],
+                [/\)$/, { token: 'delimiter.parenthesis', next: '@popall' }],
+                [/\)/, { token: 'delimiter.parenthesis', next: '@pop' }]
+            ],
+            whitespace: [
+                [/^(\s*)(\/\/.*)$/, { token: 'comment', next: '@blockText.$1.comment' }],
+                [/[ \t\r\n]+/, ''],
+                [/<!--/, { token: 'comment', next: '@comment' }]
+            ],
+            blockText: [
+                [
+                    /^\s+.*$/,
+                    {
+                        cases: {
+                            '($S2\\s+.*$)': { token: '$S3' },
+                            '@default': { token: '@rematch', next: '@popall' }
+                        }
+                    }
+                ],
+                [/./, { token: '@rematch', next: '@popall' }]
+            ],
+            comment: [
+                [/[^<\-]+/, 'comment.content'],
+                [/-->/, { token: 'comment', next: '@pop' }],
+                [/<!--/, 'comment.content.invalid'],
+                [/[<\-]/, 'comment.content']
+            ],
+            string: [
+                [
+                    /[^\\"'#]+/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string', next: '@popall' },
+                            '@default': 'string'
+                        }
+                    }
+                ],
+                [
+                    /@escapes/,
+                    {
+                        cases: {
+                            '@eos': { token: 'string.escape', next: '@popall' },
+                            '@default': 'string.escape'
+                        }
+                    }
+                ],
+                [
+                    /\\./,
+                    {
+                        cases: {
+                            '@eos': {
+                                token: 'string.escape.invalid',
+                                next: '@popall'
+                            },
+                            '@default': 'string.escape.invalid'
+                        }
+                    }
+                ],
+                // interpolation
+                [/(#{)([^}]*)(})/, ['interpolation.delimiter', 'interpolation', 'interpolation.delimiter']],
+                [/#/, 'string'],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'string', next: '@pop' },
+                            '@default': { token: 'string' }
+                        }
+                    }
+                ]
+            ],
+            // Almost identical to above, except for escapes and the output token
+            value: [
+                [
+                    /[^\\"']+/,
+                    {
+                        cases: {
+                            '@eos': { token: 'attribute.value', next: '@popall' },
+                            '@default': 'attribute.value'
+                        }
+                    }
+                ],
+                [
+                    /\\./,
+                    {
+                        cases: {
+                            '@eos': { token: 'attribute.value', next: '@popall' },
+                            '@default': 'attribute.value'
+                        }
+                    }
+                ],
+                [
+                    /["']/,
+                    {
+                        cases: {
+                            '$#==$S2': { token: 'attribute.value', next: '@pop' },
+                            '@default': { token: 'attribute.value' }
+                        }
+                    }
+                ]
+            ]
+        }
+    };
+});
+

+ 256 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/python/python.js

@@ -0,0 +1,256 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/python/python',["require", "exports", "../fillers/monaco-editor-core"], function (require, exports, monaco_editor_core_1) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '#',
+            blockComment: ["'''", "'''"]
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"', notIn: ['string'] },
+            { open: "'", close: "'", notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' },
+            { open: "'", close: "'" }
+        ],
+        onEnterRules: [
+            {
+                beforeText: new RegExp('^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$'),
+                action: { indentAction: monaco_editor_core_1.languages.IndentAction.Indent }
+            }
+        ],
+        folding: {
+            offSide: true,
+            markers: {
+                start: new RegExp('^\\s*#region\\b'),
+                end: new RegExp('^\\s*#endregion\\b')
+            }
+        }
+    };
+    exports.language = {
+        defaultToken: '',
+        tokenPostfix: '.python',
+        keywords: [
+            // This section is the result of running
+            // `for k in keyword.kwlist: print('  "' + k + '",')` in a Python REPL,
+            // though note that the output from Python 3 is not a strict superset of the
+            // output from Python 2.
+            'False',
+            'None',
+            'True',
+            'and',
+            'as',
+            'assert',
+            'async',
+            'await',
+            'break',
+            'class',
+            'continue',
+            'def',
+            'del',
+            'elif',
+            'else',
+            'except',
+            'exec',
+            'finally',
+            'for',
+            'from',
+            'global',
+            'if',
+            'import',
+            'in',
+            'is',
+            'lambda',
+            'nonlocal',
+            'not',
+            'or',
+            'pass',
+            'print',
+            'raise',
+            'return',
+            'try',
+            'while',
+            'with',
+            'yield',
+            'int',
+            'float',
+            'long',
+            'complex',
+            'hex',
+            'abs',
+            'all',
+            'any',
+            'apply',
+            'basestring',
+            'bin',
+            'bool',
+            'buffer',
+            'bytearray',
+            'callable',
+            'chr',
+            'classmethod',
+            'cmp',
+            'coerce',
+            'compile',
+            'complex',
+            'delattr',
+            'dict',
+            'dir',
+            'divmod',
+            'enumerate',
+            'eval',
+            'execfile',
+            'file',
+            'filter',
+            'format',
+            'frozenset',
+            'getattr',
+            'globals',
+            'hasattr',
+            'hash',
+            'help',
+            'id',
+            'input',
+            'intern',
+            'isinstance',
+            'issubclass',
+            'iter',
+            'len',
+            'locals',
+            'list',
+            'map',
+            'max',
+            'memoryview',
+            'min',
+            'next',
+            'object',
+            'oct',
+            'open',
+            'ord',
+            'pow',
+            'print',
+            'property',
+            'reversed',
+            'range',
+            'raw_input',
+            'reduce',
+            'reload',
+            'repr',
+            'reversed',
+            'round',
+            'self',
+            'set',
+            'setattr',
+            'slice',
+            'sorted',
+            'staticmethod',
+            'str',
+            'sum',
+            'super',
+            'tuple',
+            'type',
+            'unichr',
+            'unicode',
+            'vars',
+            'xrange',
+            'zip',
+            '__dict__',
+            '__methods__',
+            '__members__',
+            '__class__',
+            '__bases__',
+            '__name__',
+            '__mro__',
+            '__subclasses__',
+            '__init__',
+            '__import__'
+        ],
+        brackets: [
+            { open: '{', close: '}', token: 'delimiter.curly' },
+            { open: '[', close: ']', token: 'delimiter.bracket' },
+            { open: '(', close: ')', token: 'delimiter.parenthesis' }
+        ],
+        tokenizer: {
+            root: [
+                { include: '@whitespace' },
+                { include: '@numbers' },
+                { include: '@strings' },
+                [/[,:;]/, 'delimiter'],
+                [/[{}\[\]()]/, '@brackets'],
+                [/@[a-zA-Z_]\w*/, 'tag'],
+                [
+                    /[a-zA-Z_]\w*/,
+                    {
+                        cases: {
+                            '@keywords': 'keyword',
+                            '@default': 'identifier'
+                        }
+                    }
+                ]
+            ],
+            // Deal with white space, including single and multi-line comments
+            whitespace: [
+                [/\s+/, 'white'],
+                [/(^#.*$)/, 'comment'],
+                [/'''/, 'string', '@endDocString'],
+                [/"""/, 'string', '@endDblDocString']
+            ],
+            endDocString: [
+                [/[^']+/, 'string'],
+                [/\\'/, 'string'],
+                [/'''/, 'string', '@popall'],
+                [/'/, 'string']
+            ],
+            endDblDocString: [
+                [/[^"]+/, 'string'],
+                [/\\"/, 'string'],
+                [/"""/, 'string', '@popall'],
+                [/"/, 'string']
+            ],
+            // Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
+            numbers: [
+                [/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, 'number.hex'],
+                [/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, 'number']
+            ],
+            // Recognize strings, including those broken across lines with \ (but not without)
+            strings: [
+                [/'$/, 'string.escape', '@popall'],
+                [/'/, 'string.escape', '@stringBody'],
+                [/"$/, 'string.escape', '@popall'],
+                [/"/, 'string.escape', '@dblStringBody']
+            ],
+            stringBody: [
+                [/[^\\']+$/, 'string', '@popall'],
+                [/[^\\']+/, 'string'],
+                [/\\./, 'string'],
+                [/'/, 'string.escape', '@popall'],
+                [/\\$/, 'string']
+            ],
+            dblStringBody: [
+                [/[^\\"]+$/, 'string', '@popall'],
+                [/[^\\"]+/, 'string'],
+                [/\\./, 'string'],
+                [/"/, 'string.escape', '@popall'],
+                [/\\$/, 'string']
+            ]
+        }
+    };
+});
+

+ 291 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/qsharp/qsharp.js

@@ -0,0 +1,291 @@
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+define('vs/basic-languages/qsharp/qsharp',["require", "exports"], function (require, exports) {
+    "use strict";
+    Object.defineProperty(exports, "__esModule", { value: true });
+    exports.language = exports.conf = void 0;
+    exports.conf = {
+        comments: {
+            lineComment: '//'
+        },
+        brackets: [
+            ['{', '}'],
+            ['[', ']'],
+            ['(', ')']
+        ],
+        autoClosingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"', notIn: ['string', 'comment'] }
+        ],
+        surroundingPairs: [
+            { open: '{', close: '}' },
+            { open: '[', close: ']' },
+            { open: '(', close: ')' },
+            { open: '"', close: '"' }
+        ]
+    };
+    exports.language = {
+        // Set defaultToken to invalid to see what you do not tokenize yet
+        keywords: [
+            'namespace',
+            'open',
+            'as',
+            'operation',
+            'function',
+            'body',
+            'adjoint',
+            'newtype',
+            'controlled',
+            'if',
+            'elif',
+            'else',
+            'repeat',
+            'until',
+            'fixup',
+            'for',
+            'in',
+            'while',
+            'return',
+            'fail',
+            'within',
+            'apply',
+            'Adjoint',
+            'Controlled',
+            'Adj',
+            'Ctl',
+            'is',
+            'self',
+            'auto',
+            'distribute',
+            'invert',
+            'intrinsic',
+            'let',
+            'set',
+            'w/',
+            'new',
+            'not',
+            'and',
+            'or',
+            'use',
+            'borrow',
+            'using',
+            'borrowing',
+            'mutable'
+        ],
+        typeKeywords: [
+            'Unit',
+            'Int',
+            'BigInt',
+            'Double',
+            'Bool',
+            'String',
+            'Qubit',
+            'Result',
+            'Pauli',
+            'Range'
+        ],
+        invalidKeywords: [
+            'abstract',
+            'base',
+            'bool',
+            'break',
+            'byte',
+            'case',
+            'catch',
+            'char',
+            'checked',
+            'class',
+            'const',
+            'continue',
+            'decimal',
+            'default',
+            'delegate',
+            'do',
+            'double',
+            'enum',
+            'event',
+            'explicit',
+            'extern',
+            'finally',
+            'fixed',
+            'float',
+            'foreach',
+            'goto',
+            'implicit',
+            'int',
+            'interface',
+            'lock',
+            'long',
+            'null',
+            'object',
+            'operator',
+            'out',
+            'override',
+            'params',
+            'private',
+            'protected',
+            'public',
+            'readonly',
+            'ref',
+            'sbyte',
+            'sealed',
+            'short',
+            'sizeof',
+            'stackalloc',
+            'static',
+            'string',
+            'struct',
+            'switch',
+            'this',
+            'throw',
+            'try',
+            'typeof',
+            'unit',
+            'ulong',
+            'unchecked',
+            'unsafe',
+            'ushort',
+            'virtual',
+            'void',
+            'volatile'
+        ],
+        constants: ['true', 'false', 'PauliI', 'PauliX', 'PauliY', 'PauliZ', 'One', 'Zero'],
+        builtin: [
+            'X',
+            'Y',
+            'Z',
+            'H',
+            'HY',
+            'S',
+            'T',
+            'SWAP',
+            'CNOT',
+            'CCNOT',
+            'MultiX',
+            'R',
+            'RFrac',
+            'Rx',
+            'Ry',
+            'Rz',
+            'R1',
+            'R1Frac',
+            'Exp',
+            'ExpFrac',
+            'Measure',
+            'M',
+            'MultiM',
+            'Message',
+            'Length',
+            'Assert',
+            'AssertProb',
+            'AssertEqual'
+        ],
+        operators: [
+            'and=',
+            '<-',
+            '->',
+            '*',
+            '*=',
+            '@',
+            '!',
+            '^',
+            '^=',
+            ':',
+            '::',
+            '..',
+            '==',
+            '...',
+            '=',
+            '=>',
+            '>',
+            '>=',
+            '<',
+            '<=',
+            '-',
+            '-=',
+            '!=',
+            'or=',
+            '%',
+            '%=',
+            '|',
+            '+',
+            '+=',
+            '?',
+            '/',
+            '/=',
+            '&&&',
+            '&&&=',
+            '^^^',
+            '^^^=',
+            '>>>',
+            '>>>=',
+            '<<<',
+            '<<<=',
+            '|||',
+            '|||=',
+            '~~~',
+            '_',
+            'w/',
+            'w/='
+        ],
+        namespaceFollows: ['namespace', 'open'],
+        symbols: /[=><!~?:&|+\-*\/\^%@._]+/,
+        escapes: /\\[\s\S]/,
+        // The main tokenizer for our languages
+        tokenizer: {
+            root: [
+                // identifiers and keywords
+                [
+                    /[a-zA-Z_$][\w$]*/,
+                    {
+                        cases: {
+                            '@namespaceFollows': {
+                                token: 'keyword.$0',
+                                next: '@namespace'
+                            },
+                            '@typeKeywords': 'type',
+                            '@keywords': 'keyword',
+                            '@constants': 'constant',
+                            '@builtin': 'keyword',
+                            '@invalidKeywords': 'invalid',
+                            '@default': 'identifier'
+                        }
+                    }
+                ],
+                // whitespace
+                { include: '@whitespace' },
+                // delimiters and operators
+                [/[{}()\[\]]/, '@brackets'],
+                [/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
+                // numbers
+                [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
+                [/\d+/, 'number'],
+                // delimiter: after number because of .\d floats
+                [/[;,.]/, 'delimiter'],
+                // strings
+                //[/"([^"\\]|\\.)*$/, 'string.invalid' ],  // non-teminated string
+                [/"/, { token: 'string.quote', bracket: '@open', next: '@string' }]
+            ],
+            string: [
+                [/[^\\"]+/, 'string'],
+                [/@escapes/, 'string.escape'],
+                [/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
+            ],
+            namespace: [
+                { include: '@whitespace' },
+                [/[A-Za-z]\w*/, 'namespace'],
+                [/[\.=]/, 'delimiter'],
+                ['', '', '@pop']
+            ],
+            whitespace: [
+                [/[ \t\r\n]+/, 'white'],
+                [/(\/\/).*/, 'comment']
+            ]
+        }
+    };
+});
+

+ 0 - 0
22409240张博明/homework2/monaco/public/monaco-editor/dev/vs/basic-languages/r/r.js


Some files were not shown because too many files changed in this diff