├── .gitattributes ├── LICENSE ├── README.md ├── framework ├── bin │ ├── Blazor2.dll │ ├── Blazor2.pdb │ ├── Microsoft.AspNetCore.Blazor.Browser.dll │ ├── Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll │ ├── Microsoft.AspNetCore.Blazor.dll │ ├── Microsoft.Extensions.DependencyInjection.Abstractions.dll │ ├── Microsoft.Extensions.DependencyInjection.dll │ ├── Microsoft.JSInterop.dll │ ├── Mono.WebAssembly.Interop.dll │ ├── System.Collections.Immutable.dll │ ├── System.Core.dll │ ├── System.Net.Http.dll │ ├── System.dll │ └── mscorlib.dll ├── blazor.boot.json ├── blazor.server.js ├── blazor.webassembly.js └── wasm │ ├── mono.js │ └── mono.wasm ├── gif └── both.gif ├── index.html ├── src ├── ace.js ├── basic-languages │ └── cpp │ │ └── cpp.js ├── editor.main.css ├── editor.main.js ├── editor.main.nls.js ├── ha.js ├── loader.js ├── main.css ├── main.js ├── mode-c_cpp.js └── theme-sqlserver.js └── support.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 vasyop 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## What is it? 2 | 3 | 1. A simple stack-based virtual machine that runs C in the browser. 4 | 5 | 2. An interactive tutorial that covers C, how the VM works, and how the language is compiled, everything from the ground up. 6 | 7 | ## Why? 8 | 9 | This project demystifies compilers without getting lost in unnecessary details. 10 | MiniC visually explores how a compiler can break down the C language into simple instructions and how those are executed by a virtual CPU. 11 | 12 | ![alt text](/gif/both.gif) 13 | 14 | ## Can I see it? 15 | 16 | 1. [Sandbox](https://vasyop.github.io/miniC-hosting) 17 | 18 | 2. Tutorial (for people with 0 programming experience or willing to learn C) : 19 | * [Part 1](https://vasyop.github.io/miniC-hosting/?0) - Introduction 20 | * [Part 2](https://vasyop.github.io/miniC-hosting/?1) - Expressions (part 1) 21 | * [Part 3](https://vasyop.github.io/miniC-hosting/?2) - Expressions (part 2) 22 | * [Part 4](https://vasyop.github.io/miniC-hosting/?3) - Variables and program structure 23 | 24 | ## Subscribe 25 | 26 | Get [notified](https://github.us20.list-manage.com/subscribe/post?u=2790571880963241ec5dd7d11&id=0e2d1b34de) when new tutorials are released. 27 | 28 | ## Feedback 29 | 30 | Join the discussion on our [subreddit](https://www.reddit.com/r/minic/). 31 | 32 | ## Support 33 | Consider [supporting](https://github.com/vasyop/miniC-hosting/blob/master/support.md) the project. 34 | 35 | ## Documentation 36 | 37 | ### Virtual Instruction Set 38 | 39 | Note: BEFORE each instrunction, IP increases by 1 40 | 41 | PUSH 42 | * increases SP by 1 and sets the value at SP to the argument ("Pushes the argument onto the stack") 43 | 44 | LEA: 45 | * similar to PUSH 46 | * instead of pushing just the argument, it pushes BP + argument ("Loads the Effective Address") 47 | * used to push the address of a local variable on the stack ("LEA 2" is used to push the address of the second local variable on the stack) 48 | 49 | DRF: 50 | * replaces the address on the top of the stack with the value at that address ("Dereferences the address") 51 | * e.g. to push the value of a local variable, we use LEA follwed by DRF 52 | 53 | POP 54 | * decreases SP by 1 ("pops a value off the stacK") 55 | * used if the value on the top of the stack is not needed, to prevent the stack from growing indefinitely 56 | * e.g. after calling a function without indending to use its returned value 57 | 58 | JMP 59 | * sets IP to the argument ("jump to the address gives as argument") 60 | * used to compile control structures such as "if" and "while" 61 | 62 | JZ: 63 | * pops a value off the stack, and if that value is 0, it jumps to the argument ("jump if zero") 64 | * used to compile constrol structures such as "if" and "while" 65 | 66 | FSTART: 67 | * a sequence of simpler instructions performed before each function ("Function START"); 68 | * pushes the value of BP effectively saving it before setting BP 69 | * sets BP to SP 70 | * increase SP by the value of the argument, effectively making room for local variables 71 | * effectively sets up the stack so that BP so that BP points to the old BP, BP + 1 to the first local variable, BP + 2 to the second, etc. 72 | * before the function returns, BP will be restored to its old value 73 | 74 | RET: 75 | * a sequence of simpler instructions performed before each function RETurns 76 | * remembers the value on the top of the stack. this is the function return value. 77 | * sets SP to BP, effectively popping all the local variables and the returned value 78 | * sets BP to the value on the top of the stack, effectively restoring BP to its value before FSTART 79 | * performs a POP 80 | * sets IP to the value on the top of the stack, effectively setting IP to point to the next instrunction after the CALL that created this function 81 | * performs a POP 82 | * decreases SP by the argument, effectively popping all the arguments pushed before the function was called 83 | * replaces the value on the top of the stack (which is the address of the current function) with the function return value remembered earlier 84 | all the previous POPs ensure that SP is now set to its original value before calling the function + 1. The top of the stack is the returned value of the function 85 | 86 | CALL: 87 | a sequence of simpler instructions performed to CALL a function. it assumes that the address of the function followed by all the arguments have already been pushed 88 | * Pushes IP (which was already increased by 1), effectively pushing the address of the next instruction. This value will be used by the RET instrunction to set IP to the address of next instrunction after CALL 89 | * sets ip to SP - 1 - argument, with is the address of the FSTART instrunction of the function being called 90 | 91 | ALLOC: 92 | * generated by the new operator 93 | * a sequence of simpler instructions performed to ALLOCate memory dynammically 94 | * remembers the value on the top of the stack, which is the requsted amount of memory 95 | * saves the value of HP 96 | * increases HP by the requsted amount of memory 97 | * pushes the previously saved value of HP onto the stack 98 | 99 | ASSIGN: 100 | * used to chnage the value at some address to the value on the top of the stack (ASSiGNment), e.g. "a = 2;" 101 | * remembers VAL, the value on the top of the stack 102 | * sets the value at address SP - 1 to VAL 103 | * performs a POP 104 | * sets the value on the top of the stack to VAL. This leaves the door open to multiple variable assignment (such as "a = b = 3;") 105 | 106 | PLUSEQ: 107 | * just like ASSIGN, but performs addition instead of replacing the value (e.g. a += 2;) 108 | 109 | MINUSEQ: 110 | * just like ASSIGN, but performs subtraction instead of replacing the value (e.g. a -= 2;) 111 | 112 | TIMESEQ: 113 | * just like ASSIGN, but performs multiplication instead of replacing the value (e.g. a *= 2;) 114 | 115 | DIVEQ: 116 | * just like ASSIGN, but performs division instead of replacing the value (e.g. a /= 2;) 117 | 118 | MODEQ: 119 | * just like ASSIGN, but performs the moduls operation instead of replacing the value (e.g. a %= 2;) 120 | 121 | 122 | 123 | TIMES: 124 | * POPs the two values on the top of the stack, multiplies them, and pushes the result (e.g. 6 * 3) 125 | 126 | DIV: 127 | * POPs the two values on the top of the stack, divides them, and pushes the result (e.g. 6 / 3) 128 | 129 | MOD: 130 | * POPs the two values on the top of the stack, performs the modulus operation on them, and pushes the result (e.g. 6 % 3) 131 | 132 | PLUS: 133 | * POPs the two values on the top of the stack, adds them, and pushes the result (e.g. 6 + 3) 134 | 135 | MINUS: 136 | * POPs the two values on the top of the stack, substracts them, and pushes the result (e.g. 6 - 3) 137 | 138 | NOT: 139 | * ... 140 | * is used to compile "!*expression*" 141 | 142 | OPP: 143 | * ... 144 | * is used to compile "-" in "-*expression*" ("OPPosite") 145 | 146 | EQ, NE, LT, GT, LTE, GTE, AND, OR: 147 | * ... 148 | * are used to compile ==, !=, <, >, <=, >=, &&, || (e.g. "a < 3 || b == 5") 149 | 150 | 151 | 152 | ### Missing language features 153 | 154 | * only bool, int, char and pointers as data types and they all have the same size in memory 155 | 156 | * no malloc, but operator new is working (like in C++), 157 | 158 | * no static arrays and structs (dynamic arrays and pointer to structs work fine). 159 | 160 | * no arrays of structs (arrays of pointers to structs works fine). 161 | 162 | * no for and switch statements 163 | 164 | * no preprocessor directives 165 | 166 | * no bitwise operators 167 | 168 | * no ++, --, ternary operators 169 | 170 | * no union and no enum 171 | 172 | * no global variables 173 | 174 | * no function pointers 175 | 176 | * no free / delete operator 177 | 178 | * no function overloading 179 | -------------------------------------------------------------------------------- /framework/bin/Blazor2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Blazor2.dll -------------------------------------------------------------------------------- /framework/bin/Blazor2.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Blazor2.pdb -------------------------------------------------------------------------------- /framework/bin/Microsoft.AspNetCore.Blazor.Browser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Microsoft.AspNetCore.Blazor.Browser.dll -------------------------------------------------------------------------------- /framework/bin/Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll -------------------------------------------------------------------------------- /framework/bin/Microsoft.AspNetCore.Blazor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Microsoft.AspNetCore.Blazor.dll -------------------------------------------------------------------------------- /framework/bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll -------------------------------------------------------------------------------- /framework/bin/Microsoft.Extensions.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Microsoft.Extensions.DependencyInjection.dll -------------------------------------------------------------------------------- /framework/bin/Microsoft.JSInterop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Microsoft.JSInterop.dll -------------------------------------------------------------------------------- /framework/bin/Mono.WebAssembly.Interop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/Mono.WebAssembly.Interop.dll -------------------------------------------------------------------------------- /framework/bin/System.Collections.Immutable.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/System.Collections.Immutable.dll -------------------------------------------------------------------------------- /framework/bin/System.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/System.Core.dll -------------------------------------------------------------------------------- /framework/bin/System.Net.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/System.Net.Http.dll -------------------------------------------------------------------------------- /framework/bin/System.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/System.dll -------------------------------------------------------------------------------- /framework/bin/mscorlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vasyop/miniC-hosting/b3e1092a8a7a09e4eef768f0a51c78ae5b3443fa/framework/bin/mscorlib.dll -------------------------------------------------------------------------------- /framework/blazor.boot.json: -------------------------------------------------------------------------------- 1 | {"main":"Blazor2.dll","entryPoint":"Blazor2.Program::Main","assemblyReferences":["Microsoft.AspNetCore.Blazor.Browser.dll","Microsoft.AspNetCore.Blazor.dll","Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll","Microsoft.Extensions.DependencyInjection.Abstractions.dll","Microsoft.Extensions.DependencyInjection.dll","Microsoft.JSInterop.dll","Mono.WebAssembly.Interop.dll","mscorlib.dll","System.Collections.Immutable.dll","System.Core.dll","System.dll","System.Net.Http.dll","Blazor2.pdb"],"cssReferences":[],"jsReferences":[],"linkerEnabled":true} -------------------------------------------------------------------------------- /framework/blazor.webassembly.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=56)}([,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(22),o={};t.attachRootComponentToElement=function(e,t,n){var a=document.querySelector(t);if(!a)throw new Error("Could not find any element matching selector '"+t+"'.");var i=o[e];i||(i=o[e]=new r.BrowserRenderer(e)),function(e){for(var t;t=e.firstChild;)e.removeChild(t)}(a),i.attachRootComponentToElement(n,a)},t.renderBatch=function(e,t){var n=o[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,a=t.updatedComponents(),i=r.values(a),u=r.count(a),l=t.referenceFrames(),s=r.values(l),c=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0))throw new Error("Not implemented: inserting non-empty logical container");if(i(a))throw new Error("Not implemented: moving existing logical children");var l=u(t);if(n0)throw new Error("New logical elements must start empty");return e[r]=[],e},t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return a(n,e,t),n},t.insertLogicalChild=a,t.removeLogicalChild=function e(t,n){var r=u(t).splice(n,1)[0];if(r instanceof Comment)for(var o=u(r);o.length>0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=i,t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===function(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}(e).namespaceURI}},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]-1?a.substring(0,u):"",s=u>-1?a.substring(u+1):a,c=t.monoPlatform.findMethod(e,l,s,i);t.monoPlatform.callMethod(c,null,r)},callMethod:function(e,n,r){if(r.length>4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),u=Module.stackAlloc(4),l=0;l0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1] 2 | 3 | 4 | 5 | 6 | MiniC 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/basic-languages/cpp/cpp.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.5.1(d085b3bad82f8b59df390ce976adef0c83a9289e) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/cpp/cpp",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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")}}},t.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:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\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"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],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"]],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"}]]]}}}); -------------------------------------------------------------------------------- /src/editor.main.nls.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Version: 0.14.6(6c8f02b41db9ae5c4d15df767d47755e5c73b9d5) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt 6 | *-----------------------------------------------------------*/ 7 | define("vs/editor/editor.main.nls",{"vs/base/browser/ui/actionbar/actionbar":["{0} ({1})"],"vs/base/browser/ui/aria/aria":["{0} (occurred again)","{0} (occurred {1} times)"],"vs/base/browser/ui/findinput/findInput":["input"],"vs/base/browser/ui/findinput/findInputCheckboxes":["Match Case","Match Whole Word","Use Regular Expression"],"vs/base/browser/ui/inputbox/inputBox":["Error: {0}","Warning: {0}","Info: {0}"],"vs/base/browser/ui/list/listWidget":["{0}. Use the navigation keys to navigate."],"vs/base/browser/ui/menu/menu":["{0} ({1})"],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","Alt","Command","Control","Shift","Alt","Windows","Control","Shift","Alt","Super"],"vs/base/common/severity":["Error","Warning","Info"],"vs/base/parts/quickopen/browser/quickOpenModel":["{0}, picker","picker"],"vs/base/parts/quickopen/browser/quickOpenWidget":["Quick picker. Type to narrow down results.","Quick Picker","{0} Results"], 8 | "vs/editor/browser/controller/coreCommands":["&&Select All","&&Undo","&&Redo"],"vs/editor/browser/widget/codeEditorWidget":["The number of cursors has been limited to {0}."],"vs/editor/browser/widget/diffEditorWidget":["Cannot compare files because one file is too large."],"vs/editor/browser/widget/diffReview":["Close","no lines","1 line","{0} lines","Difference {0} of {1}: original {2}, {3}, modified {4}, {5}","blank","original {0}, modified {1}: {2}","+ modified {0}: {1}","- original {0}: {1}","Go to Next Difference","Go to Previous Difference"], 9 | "vs/editor/common/config/commonEditorConfig":["Editor","Controls the font family.","Controls the font weight.","Controls the font size in pixels.","Controls the line height. Use 0 to compute the line height from the font size.","Controls the letter spacing in pixels.","Line numbers are not rendered.","Line numbers are rendered as absolute number.","Line numbers are rendered as distance in lines to cursor position.","Line numbers are rendered every 10 lines.","Controls the display of line numbers.","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.","Characters that will be used as word separators when doing word related navigations or operations.","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.","Expected 'number'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.","Expected 'boolean'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.","Controls whether selections should have rounded corners.","Controls whether the editor will scroll beyond the last line.","Controls the number of extra characters beyond which the editor will scroll horizontally.","Controls whether the editor will scroll using an animation.","Controls whether the minimap is shown.","Controls the side where to render the minimap.","Controls whether the minimap slider is automatically hidden.","Render the actual characters on a line as opposed to color blocks.","Limit the width of the minimap to render at most a certain number of columns.","Controls whether the hover is shown.","Time delay in milliseconds after which to the hover is shown.","Controls whether the hover should remain visible when mouse is moved over it.","Controls whether the search string in the Find Widget is seeded from the editor selection.","Controls whether the find operation is carried on selected text or the entire file in the editor.","Controls whether the Find Widget should read or modify the shared find clipboard on macOS.","Lines will never wrap.","Lines will wrap at the viewport width.","Lines will wrap at `#editor.wordWrapColumn#`.","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.","Controls how lines should wrap.","Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.","No indentation. Wrapped lines begin at column 1.","Wrapped lines get the same indentation as the parent.","Wrapped lines get +1 indentation toward the parent.","Wrapped lines get +2 indentation toward the parent.","Controls the indentation of wrapped lines.","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.","Maps to `Control` on Windows and Linux and to `Command` on macOS.","Maps to `Alt` on Windows and Linux and to `Option` on macOS.","The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).","Merge multiple cursors when they are overlapping.","Enable quick suggestions inside strings.","Enable quick suggestions inside comments.","Enable quick suggestions outside of strings and comments.","Controls whether suggestions should automatically show up while typing.","Controls the delay in milliseconds after which quick suggestions will show up.","Enables a pop-up that shows parameter documentation and type information as you type.","Controls whether the editor should automatically close brackets after the user adds an opening bracket.","Controls whether the editor should automatically format the line after typing.","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.","Controls whether the editor should automatically adjust the indentation when users type, paste or move lines. Extensions with indentation rules of the language must be available.","Controls whether suggestions should automatically show up when typing trigger characters.","Only accept a suggestion with `Enter` when it makes a textual change.","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.","Show snippet suggestions on top of other suggestions.","Show snippet suggestions below other suggestions.","Show snippets suggestions with other suggestions.","Do not show snippet suggestions.","Controls whether snippets are shown with other suggestions and how they are sorted.","Controls whether copying without a selection copies the current line.","Controls whether completions should be computed based on words in the document.","Always select the first suggestion.","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.","Controls how suggestions are pre-selected when showing the suggest list.","Font size for the suggest widget.","Line height for the suggest widget.","Controls whether filtering and sorting suggestions accounts for small typos.","Control whether an active snippet prevents quick suggestions.","Controls whether the editor should highlight matches similar to the selection","Controls whether the editor should highlight semantic symbol occurrences.","Controls the number of decorations that can show up at the same position in the overview ruler.","Controls whether a border should be drawn around the overview ruler.","Control the cursor animation style.","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.","Controls the cursor style.","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.","Enables/Disables font ligatures.","Controls whether the cursor should be hidden in the overview ruler.","Render whitespace characters except for single spaces between words.","Controls how the editor should render whitespace characters.","Controls whether the editor should render control characters.","Controls whether the editor should render indent guides.","Controls whether the editor should highlight the active indent guide.","Highlights both the gutter and the current line.","Controls how the editor should render the current line highlight.","Controls whether the editor shows CodeLens","Controls whether the editor has code folding enabled","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.","Controls whether the fold controls on the gutter are automatically hidden.","Highlight matching brackets when one of them is selected.","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.","Inserting and deleting whitespace follows tab stops.","Remove trailing auto inserted whitespace.","Keep peek editors open even when double clicking their content or when hitting `Escape`.","Controls whether the editor should allow moving selections via drag and drop.","The editor will use platform APIs to detect when a Screen Reader is attached.","The editor will be permanently optimized for usage with a Screen Reader.","The editor will never be optimized for usage with a Screen Reader.","Controls whether the editor should run in a mode where it is optimized for screen readers.","Controls fading out of unused code.","Controls whether the editor should detect links and make them clickable.","Controls whether the editor should render the inline color decorators and color picker.","Enables the code action lightbulb in the editor.","Controls whether organize imports action should be run on file save.","Code action kinds to be run on save.","Timeout in milliseconds after which the code actions that are run on save are cancelled.","Controls whether the Linux primary clipboard should be supported.","Controls whether the diff editor shows the diff side by side or inline.","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.","Special handling for large files to disable certain memory intensive features.","Controls whether the diff editor shows +/- indicators for added/removed changes."], 10 | "vs/editor/common/config/editorOptions":["The editor is not accessible at this time. Press Alt+F1 for options.","Editor content"],"vs/editor/common/controller/cursor":["Unexpected exception while executing command."],"vs/editor/common/modes/modesRegistry":["Plain Text"],"vs/editor/common/services/modelServiceImpl":["[{0}]\n{1}","[{0}] {1}"], 11 | "vs/editor/common/view/editorColorRegistry":["Background color for the highlight of line at the cursor position.","Background color for the border around the line at the cursor position.","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque to not hide underlying decorations.","Background color of the border around highlighted ranges.","Color of the editor cursor.","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.","Color of whitespace characters in the editor.","Color of the editor indentation guides.","Color of the active editor indentation guides.","Color of editor line numbers.","Color of editor active line number","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.","Color of editor active line number","Color of the editor rulers.","Foreground color of editor code lenses","Background color behind matching brackets","Color for matching brackets boxes","Color of the overview ruler border.","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.","Foreground color of error squigglies in the editor.","Border color of error squigglies in the editor.","Foreground color of warning squigglies in the editor.","Border color of warning squigglies in the editor.","Foreground color of info squigglies in the editor.","Border color of info squigglies in the editor.","Foreground color of hint squigglies in the editor.","Border color of hint squigglies in the editor.","Border of unnecessary code in the editor.","Opacity of unnecessary code in the editor.","Overview ruler marker color for errors.","Overview ruler marker color for warnings.","Overview ruler marker color for infos."], 12 | "vs/editor/contrib/bracketMatching/bracketMatching":["Overview ruler marker color for matching brackets.","Go to Bracket","Select to Bracket"],"vs/editor/contrib/caretOperations/caretOperations":["Move Caret Left","Move Caret Right"],"vs/editor/contrib/caretOperations/transpose":["Transpose Letters"],"vs/editor/contrib/clipboard/clipboard":["Cut","Cu&&t","Copy","&&Copy","Paste","&&Paste","Copy With Syntax Highlighting"],"vs/editor/contrib/codeAction/codeActionCommands":["Show Fixes ({0})","Show Fixes","Quick Fix...","No code actions available","No code actions available","Refactor...","No refactorings available","Source Action...","No source actions available","Organize Imports","No organize imports action available"],"vs/editor/contrib/comment/comment":["Toggle Line Comment","&&Toggle Line Comment","Add Line Comment","Remove Line Comment","Toggle Block Comment","Toggle &&Block Comment"],"vs/editor/contrib/contextmenu/contextmenu":["Show Editor Context Menu"], 13 | "vs/editor/contrib/cursorUndo/cursorUndo":["Soft Undo"],"vs/editor/contrib/find/findController":["Find","&&Find","Find With Selection","Find Next","Find Previous","Find Next Selection","Find Previous Selection","Replace","&&Replace"],"vs/editor/contrib/find/findWidget":["Find","Find","Previous match","Next match","Find in selection","Close","Replace","Replace","Replace","Replace All","Toggle Replace mode","Only the first {0} results are highlighted, but all find operations work on the entire text.","{0} of {1}","No Results"],"vs/editor/contrib/folding/folding":["Unfold","Unfold Recursively","Fold","Fold Recursively","Fold All Block Comments","Fold All Regions","Unfold All Regions","Fold All","Unfold All","Fold Level {0}"],"vs/editor/contrib/fontZoom/fontZoom":["Editor Font Zoom In","Editor Font Zoom Out","Editor Font Zoom Reset"], 14 | "vs/editor/contrib/format/formatActions":["Made 1 formatting edit on line {0}","Made {0} formatting edits on line {1}","Made 1 formatting edit between lines {0} and {1}","Made {0} formatting edits between lines {1} and {2}","There is no formatter for '{0}'-files installed.","Format Document","There is no document formatter for '{0}'-files installed.","Format Selection","There is no selection formatter for '{0}'-files installed."],"vs/editor/contrib/goToDefinition/goToDefinitionCommands":["No definition found for '{0}'","No definition found"," – {0} definitions","Go to Definition","Open Definition to the Side","Peek Definition","No implementation found for '{0}'","No implementation found"," – {0} implementations","Go to Implementation","Peek Implementation","No type definition found for '{0}'","No type definition found"," – {0} type definitions","Go to Type Definition","Peek Type Definition"],"vs/editor/contrib/goToDefinition/goToDefinitionMouse":["Click to show {0} definitions."], 15 | "vs/editor/contrib/gotoError/gotoError":["Go to Next Problem (Error, Warning, Info)","Go to Previous Problem (Error, Warning, Info)","Go to Next Problem in Files (Error, Warning, Info)","Go to Previous Problem in Files (Error, Warning, Info)"],"vs/editor/contrib/gotoError/gotoErrorWidget":["({0}/{1})","Editor marker navigation widget error color.","Editor marker navigation widget warning color.","Editor marker navigation widget info color.","Editor marker navigation widget background."],"vs/editor/contrib/hover/hover":["Show Hover"],"vs/editor/contrib/hover/modesContentHover":["Loading..."],"vs/editor/contrib/inPlaceReplace/inPlaceReplace":["Replace with Previous Value","Replace with Next Value"], 16 | "vs/editor/contrib/linesOperations/linesOperations":["Copy Line Up","&&Copy Line Up","Copy Line Down","Co&&py Line Down","Move Line Up","Mo&&ve Line Up","Move Line Down","Move &&Line Down","Sort Lines Ascending","Sort Lines Descending","Trim Trailing Whitespace","Delete Line","Indent Line","Outdent Line","Insert Line Above","Insert Line Below","Delete All Left","Delete All Right","Join Lines","Transpose characters around the cursor","Transform to Uppercase","Transform to Lowercase"],"vs/editor/contrib/links/links":["Cmd + click to follow link","Ctrl + click to follow link","Cmd + click to execute command","Ctrl + click to execute command","Option + click to follow link","Alt + click to follow link","Option + click to execute command","Alt + click to execute command","Failed to open this link because it is not well-formed: {0}","Failed to open this link because its target is missing.","Open Link"],"vs/editor/contrib/message/messageController":["Cannot edit in read-only editor"], 17 | "vs/editor/contrib/multicursor/multicursor":["Add Cursor Above","&&Add Cursor Above","Add Cursor Below","A&&dd Cursor Below","Add Cursors to Line Ends","Add C&&ursors to Line Ends","Add Selection To Next Find Match","Add &&Next Occurrence","Add Selection To Previous Find Match","Add P&&revious Occurrence","Move Last Selection To Next Find Match","Move Last Selection To Previous Find Match","Select All Occurrences of Find Match","Select All &&Occurrences","Change All Occurrences"],"vs/editor/contrib/parameterHints/parameterHints":["Trigger Parameter Hints"],"vs/editor/contrib/parameterHints/parameterHintsWidget":["{0}, hint"],"vs/editor/contrib/referenceSearch/peekViewWidget":["Close"],"vs/editor/contrib/referenceSearch/referenceSearch":[" – {0} references","Find All References"],"vs/editor/contrib/referenceSearch/referencesController":["Loading..."], 18 | "vs/editor/contrib/referenceSearch/referencesModel":["symbol in {0} on line {1} at column {2}","1 symbol in {0}, full path {1}","{0} symbols in {1}, full path {2}","No results found","Found 1 symbol in {0}","Found {0} symbols in {1}","Found {0} symbols in {1} files"], 19 | "vs/editor/contrib/referenceSearch/referencesWidget":["Failed to resolve file.","{0} references","{0} reference","no preview available","References","No results","References","Background color of the peek view title area.","Color of the peek view title.","Color of the peek view title info.","Color of the peek view borders and arrow.","Background color of the peek view result list.","Foreground color for line nodes in the peek view result list.","Foreground color for file nodes in the peek view result list.","Background color of the selected entry in the peek view result list.","Foreground color of the selected entry in the peek view result list.","Background color of the peek view editor.","Background color of the gutter in the peek view editor.","Match highlight color in the peek view result list.","Match highlight color in the peek view editor.","Match highlight border in the peek view editor."], 20 | "vs/editor/contrib/rename/rename":["No result.","Successfully renamed '{0}' to '{1}'. Summary: {2}","Rename failed to execute.","Rename Symbol"],"vs/editor/contrib/rename/renameInputField":["Rename input. Type new name and press Enter to commit."],"vs/editor/contrib/smartSelect/smartSelect":["Expand Select","&&Expand Selection","Shrink Select","&&Shrink Selection"],"vs/editor/contrib/snippet/snippetVariables":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat","January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"vs/editor/contrib/suggest/suggestController":["Accepting '{0}' did insert the following text: {1}","Trigger Suggest"], 21 | "vs/editor/contrib/suggest/suggestWidget":["Background color of the suggest widget.","Border color of the suggest widget.","Foreground color of the suggest widget.","Background color of the selected entry in the suggest widget.","Color of the match highlights in the suggest widget.","Read More...{0}","{0}, suggestion, has details","{0}, suggestion","Read less...{0}","Loading...","No suggestions.","{0}, accepted","{0}, suggestion, has details","{0}, suggestion"],"vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode":["Toggle Tab Key Moves Focus"], 22 | "vs/editor/contrib/wordHighlighter/wordHighlighter":["Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations.","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations.","Border color of a symbol during read-access, like reading a variable.","Border color of a symbol during write-access, like writing to a variable.","Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations.","Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations.","Go to Next Symbol Highlight","Go to Previous Symbol Highlight"], 23 | "vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp":["No selection","Line {0}, Column {1} ({2} selected)","Line {0}, Column {1}","{0} selections ({1} characters selected)","{0} selections","Now changing the setting `accessibilitySupport` to 'on'.","Now opening the Editor Accessibility documentation page."," in a read-only pane of a diff editor."," in a pane of a diff editor."," in a read-only code editor"," in a code editor","To configure the editor to be optimized for usage with a Screen Reader press Command+E now.","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.","The editor is configured to be optimized for usage with a Screen Reader.","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.","Press Command+H now to open a browser window with more information related to editor accessibility.","Press Control+H now to open a browser window with more information related to editor accessibility.","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.","Show Accessibility Help"], 24 | "vs/editor/standalone/browser/inspectTokens/inspectTokens":["Developer: Inspect Tokens"],"vs/editor/standalone/browser/quickOpen/gotoLine":["Go to line {0} and character {1}","Go to line {0}","Type a line number between 1 and {0} to navigate to","Type a character between 1 and {0} to navigate to","Go to line {0}","Type a line number, followed by an optional colon and a character number to navigate to","Go to Line..."],"vs/editor/standalone/browser/quickOpen/quickCommand":["{0}, commands","Type the name of an action you want to execute","Command Palette"],"vs/editor/standalone/browser/quickOpen/quickOutline":["{0}, symbols","Type the name of an identifier you wish to navigate to","Go to Symbol...","symbols ({0})","modules ({0})","classes ({0})","interfaces ({0})","methods ({0})","functions ({0})","properties ({0})","variables ({0})","variables ({0})","constructors ({0})","calls ({0})"],"vs/editor/standalone/browser/simpleServices":["Made {0} edits in {1} files"], 25 | "vs/editor/standalone/browser/standaloneCodeEditor":["Editor content","Press Ctrl+F1 for Accessibility Options.","Press Alt+F1 for Accessibility Options."],"vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast":["Toggle High Contrast Theme"],"vs/platform/configuration/common/configurationRegistry":["Default Configuration Overrides","Configure editor settings to be overridden for {0} language.","Configure editor settings to be overridden for a language.","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.","Cannot register '{0}'. This property is already registered."],"vs/platform/keybinding/common/abstractKeybindingService":["({0}) was pressed. Waiting for second key of chord...","The key combination ({0}, {1}) is not a command."], 26 | "vs/platform/list/browser/listService":["Workbench","Maps to `Control` on Windows and Linux and to `Command` on macOS.","Maps to `Alt` on Windows and Linux and to `Option` on macOS.","The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.","Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ","Controls whether trees support horizontal scrolling in the workbench."],"vs/platform/markers/common/markers":["Error","Warning","Info"], 27 | "vs/platform/theme/common/colorRegistry":["Colors used in the workbench.","Overall foreground color. This color is only used if not overridden by a component.","Overall foreground color for error messages. This color is only used if not overridden by a component.","Overall border color for focused elements. This color is only used if not overridden by a component.","An extra border around elements to separate them from others for greater contrast.","An extra border around active elements to separate them from others for greater contrast.","Foreground color for links in text.","Background color for code blocks in text.","Shadow color of widgets such as find/replace inside the editor.","Input box background.","Input box foreground.","Input box border.","Border color of activated options in input fields.","Input validation background color for information severity.","Input validation border color for information severity.","Input validation background color for warning severity.","Input validation border color for warning severity.","Input validation background color for error severity.","Input validation border color for error severity.","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree background when hovering over items using the mouse.","List/Tree foreground when hovering over items using the mouse.","List/Tree drag and drop background when moving items around using the mouse.","List/Tree foreground color of the match highlights when searching inside the list/tree.","Quick picker color for grouping labels.","Quick picker color for grouping borders.","Badge background color. Badges are small information labels, e.g. for search results count.","Badge foreground color. Badges are small information labels, e.g. for search results count.","Scrollbar shadow to indicate that the view is scrolled.","Scrollbar slider background color.","Scrollbar slider background color when hovering.","Scrollbar slider background color when clicked on.","Background color of the progress bar that can show for long running operations.","Editor background color.","Editor default foreground color.","Background color of editor widgets, such as find/replace.","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.","Color of the editor selection.","Color of the selected text for high contrast.","Color of the selection in an inactive editor. The color must not be opaque to not hide underlying decorations.","Color for regions with the same content as the selection. The color must not be opaque to not hide underlying decorations.","Border color for regions with the same content as the selection.","Color of the current search match.","Color of the other search matches. The color must not be opaque to not hide underlying decorations.","Color of the range limiting the search. The color must not be opaque to not hide underlying decorations.","Border color of the current search match.","Border color of the other search matches.","Border color of the range limiting the search. The color must not be opaque to not hide underlying decorations.","Highlight below the word for which a hover is shown. The color must not be opaque to not hide underlying decorations.","Background color of the editor hover.","Border color of the editor hover.","Color of active links.","Background color for text that got inserted. The color must not be opaque to not hide underlying decorations.","Background color for text that got removed. The color must not be opaque to not hide underlying decorations.","Outline color for the text that got inserted.","Outline color for text that got removed.","Border color between the two text editors.","Overview ruler marker color for find matches. The color must not be opaque to not hide underlying decorations.","Overview ruler marker color for selection highlights. The color must not be opaque to not hide underlying decorations."] 28 | }); 29 | //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.js.map -------------------------------------------------------------------------------- /src/ha.js: -------------------------------------------------------------------------------- 1 | function h(name, attributes) { 2 | var rest = [] 3 | var children = [] 4 | var length = arguments.length 5 | 6 | while (length-- > 2) rest.push(arguments[length]) 7 | 8 | while (rest.length) { 9 | var node = rest.pop() 10 | if (node && node.pop) { 11 | for (length = node.length; length--;) { 12 | rest.push(node[length]) 13 | } 14 | } else if (node != null && node !== true && node !== false) { 15 | children.push(node) 16 | } 17 | } 18 | 19 | return typeof name === "function" 20 | ? name(attributes || {}, children) 21 | : { 22 | nodeName: name, 23 | attributes: attributes || {}, 24 | children: children, 25 | key: attributes && attributes.key 26 | } 27 | } 28 | 29 | function app(state, actions, view, container) { 30 | var map = [].map 31 | var rootElement = (container && container.children[0]) || null 32 | var oldNode = rootElement && recycleElement(rootElement) 33 | var lifecycle = [] 34 | var skipRender 35 | var isRecycling = true 36 | var globalState = clone(state) 37 | var wiredActions = wireStateToActions([], globalState, clone(actions)) 38 | 39 | scheduleRender() 40 | 41 | return wiredActions 42 | 43 | function recycleElement(element) { 44 | return { 45 | nodeName: element.nodeName.toLowerCase(), 46 | attributes: {}, 47 | children: map.call(element.childNodes, function (element) { 48 | return element.nodeType === 3 // Node.TEXT_NODE 49 | ? element.nodeValue 50 | : recycleElement(element) 51 | }) 52 | } 53 | } 54 | 55 | function resolveNode(node) { 56 | return typeof node === "function" 57 | ? resolveNode(node(globalState, wiredActions)) 58 | : node != null 59 | ? node 60 | : "" 61 | } 62 | 63 | function render() { 64 | skipRender = !skipRender 65 | 66 | var node = resolveNode(view) 67 | 68 | if (container && !skipRender) { 69 | rootElement = patch(container, rootElement, oldNode, (oldNode = node)) 70 | } 71 | 72 | isRecycling = false 73 | 74 | while (lifecycle.length) lifecycle.pop()() 75 | } 76 | 77 | function scheduleRender() { 78 | if (!skipRender) { 79 | skipRender = true 80 | setTimeout(render) 81 | } 82 | } 83 | 84 | function clone(target, source) { 85 | var out = {} 86 | 87 | for (var i in target) out[i] = target[i] 88 | for (var i in source) out[i] = source[i] 89 | 90 | return out 91 | } 92 | 93 | function setPartialState(path, value, source) { 94 | var target = {} 95 | if (path.length) { 96 | target[path[0]] = 97 | path.length > 1 98 | ? setPartialState(path.slice(1), value, source[path[0]]) 99 | : value 100 | return clone(source, target) 101 | } 102 | return value 103 | } 104 | 105 | function getPartialState(path, source) { 106 | var i = 0 107 | while (i < path.length) { 108 | source = source[path[i++]] 109 | } 110 | return source 111 | } 112 | 113 | function wireStateToActions(path, state, actions) { 114 | for (var key in actions) { 115 | typeof actions[key] === "function" 116 | ? (function (key, action) { 117 | actions[key] = function (data) { 118 | var result = action(data) 119 | 120 | if (typeof result === "function") { 121 | result = result(getPartialState(path, globalState), actions) 122 | } 123 | 124 | if ( 125 | result && 126 | result !== (state = getPartialState(path, globalState)) && 127 | !result.then // !isPromise 128 | ) { 129 | scheduleRender( 130 | (globalState = setPartialState( 131 | path, 132 | clone(state, result), 133 | globalState 134 | )) 135 | ) 136 | } 137 | 138 | return result 139 | } 140 | })(key, actions[key]) 141 | : wireStateToActions( 142 | path.concat(key), 143 | (state[key] = clone(state[key])), 144 | (actions[key] = clone(actions[key])) 145 | ) 146 | } 147 | 148 | return actions 149 | } 150 | 151 | function getKey(node) { 152 | return node ? node.key : null 153 | } 154 | 155 | function eventListener(event) { 156 | return event.currentTarget.events[event.type](event) 157 | } 158 | 159 | function updateAttribute(element, name, value, oldValue, isSvg) { 160 | if (name === "key") { 161 | } else if (name === "style") { 162 | if (typeof value === "string") { 163 | element.style.cssText = value 164 | } else { 165 | if (typeof oldValue === "string") oldValue = element.style.cssText = "" 166 | for (var i in clone(oldValue, value)) { 167 | var style = value == null || value[i] == null ? "" : value[i] 168 | if (i[0] === "-") { 169 | element.style.setProperty(i, style) 170 | } else { 171 | element.style[i] = style 172 | } 173 | } 174 | } 175 | } else { 176 | if (name[0] === "o" && name[1] === "n") { 177 | name = name.slice(2) 178 | 179 | if (element.events) { 180 | if (!oldValue) oldValue = element.events[name] 181 | } else { 182 | element.events = {} 183 | } 184 | 185 | element.events[name] = value 186 | 187 | if (value) { 188 | if (!oldValue) { 189 | element.addEventListener(name, eventListener) 190 | } 191 | } else { 192 | element.removeEventListener(name, eventListener) 193 | } 194 | } else if ( 195 | name in element && 196 | name !== "list" && 197 | name !== "type" && 198 | name !== "draggable" && 199 | name !== "spellcheck" && 200 | name !== "translate" && 201 | !isSvg 202 | ) { 203 | element[name] = value == null ? "" : value 204 | } else if (value != null && value !== false) { 205 | element.setAttribute(name, value) 206 | } 207 | 208 | if (value == null || value === false) { 209 | element.removeAttribute(name) 210 | } 211 | } 212 | } 213 | 214 | function createElement(node, isSvg) { 215 | var element = 216 | typeof node === "string" || typeof node === "number" 217 | ? document.createTextNode(node) 218 | : (isSvg = isSvg || node.nodeName === "svg") 219 | ? document.createElementNS( 220 | "http://www.w3.org/2000/svg", 221 | node.nodeName 222 | ) 223 | : document.createElement(node.nodeName) 224 | 225 | var attributes = node.attributes 226 | if (attributes) { 227 | if (attributes.oncreate) { 228 | lifecycle.push(function () { 229 | attributes.oncreate(element) 230 | }) 231 | } 232 | 233 | for (var i = 0; i < node.children.length; i++) { 234 | element.appendChild( 235 | createElement( 236 | (node.children[i] = resolveNode(node.children[i])), 237 | isSvg 238 | ) 239 | ) 240 | } 241 | 242 | for (var name in attributes) { 243 | updateAttribute(element, name, attributes[name], null, isSvg) 244 | } 245 | } 246 | 247 | return element 248 | } 249 | 250 | function updateElement(element, oldAttributes, attributes, isSvg) { 251 | for (var name in clone(oldAttributes, attributes)) { 252 | if ( 253 | attributes[name] !== 254 | (name === "value" || name === "checked" 255 | ? element[name] 256 | : oldAttributes[name]) 257 | ) { 258 | updateAttribute( 259 | element, 260 | name, 261 | attributes[name], 262 | oldAttributes[name], 263 | isSvg 264 | ) 265 | } 266 | } 267 | 268 | var cb = isRecycling ? attributes.oncreate : attributes.onupdate 269 | if (cb) { 270 | lifecycle.push(function () { 271 | cb(element, oldAttributes) 272 | }) 273 | } 274 | } 275 | 276 | function removeChildren(element, node) { 277 | var attributes = node.attributes 278 | if (attributes) { 279 | for (var i = 0; i < node.children.length; i++) { 280 | removeChildren(element.childNodes[i], node.children[i]) 281 | } 282 | 283 | if (attributes.ondestroy) { 284 | attributes.ondestroy(element) 285 | } 286 | } 287 | return element 288 | } 289 | 290 | function removeElement(parent, element, node) { 291 | function done() { 292 | parent.removeChild(removeChildren(element, node)) 293 | } 294 | 295 | var cb = node.attributes && node.attributes.onremove 296 | if (cb) { 297 | cb(element, done) 298 | } else { 299 | done() 300 | } 301 | } 302 | 303 | function patch(parent, element, oldNode, node, isSvg) { 304 | if (node === oldNode) { 305 | } else if (oldNode == null || oldNode.nodeName !== node.nodeName) { 306 | var newElement = createElement(node, isSvg) 307 | parent.insertBefore(newElement, element) 308 | 309 | if (oldNode != null) { 310 | removeElement(parent, element, oldNode) 311 | } 312 | 313 | element = newElement 314 | } else if (oldNode.nodeName == null) { 315 | element.nodeValue = node 316 | } else { 317 | updateElement( 318 | element, 319 | oldNode.attributes, 320 | node.attributes, 321 | (isSvg = isSvg || node.nodeName === "svg") 322 | ) 323 | 324 | var oldKeyed = {} 325 | var newKeyed = {} 326 | var oldElements = [] 327 | var oldChildren = oldNode.children 328 | var children = node.children 329 | 330 | for (var i = 0; i < oldChildren.length; i++) { 331 | oldElements[i] = element.childNodes[i] 332 | 333 | var oldKey = getKey(oldChildren[i]) 334 | if (oldKey != null) { 335 | oldKeyed[oldKey] = [oldElements[i], oldChildren[i]] 336 | } 337 | } 338 | 339 | var i = 0 340 | var k = 0 341 | 342 | while (k < children.length) { 343 | var oldKey = getKey(oldChildren[i]) 344 | var newKey = getKey((children[k] = resolveNode(children[k]))) 345 | 346 | if (newKeyed[oldKey]) { 347 | i++ 348 | continue 349 | } 350 | 351 | if (newKey != null && newKey === getKey(oldChildren[i + 1])) { 352 | if (oldKey == null) { 353 | removeElement(element, oldElements[i], oldChildren[i]) 354 | } 355 | i++ 356 | continue 357 | } 358 | 359 | if (newKey == null || isRecycling) { 360 | if (oldKey == null) { 361 | patch(element, oldElements[i], oldChildren[i], children[k], isSvg) 362 | k++ 363 | } 364 | i++ 365 | } else { 366 | var keyedNode = oldKeyed[newKey] || [] 367 | 368 | if (oldKey === newKey) { 369 | patch(element, keyedNode[0], keyedNode[1], children[k], isSvg) 370 | i++ 371 | } else if (keyedNode[0]) { 372 | patch( 373 | element, 374 | element.insertBefore(keyedNode[0], oldElements[i]), 375 | keyedNode[1], 376 | children[k], 377 | isSvg 378 | ) 379 | } else { 380 | patch(element, oldElements[i], null, children[k], isSvg) 381 | } 382 | 383 | newKeyed[newKey] = children[k] 384 | k++ 385 | } 386 | } 387 | 388 | while (i < oldChildren.length) { 389 | if (getKey(oldChildren[i]) == null) { 390 | removeElement(element, oldElements[i], oldChildren[i]) 391 | } 392 | i++ 393 | } 394 | 395 | for (var i in oldKeyed) { 396 | if (!newKeyed[i]) { 397 | removeElement(element, oldKeyed[i][0], oldKeyed[i][1]) 398 | } 399 | } 400 | } 401 | return element 402 | } 403 | } -------------------------------------------------------------------------------- /src/loader.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Version: 0.14.6(6c8f02b41db9ae5c4d15df767d47755e5c73b9d5) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt 6 | *-----------------------------------------------------------*/ 7 | "use strict";var _amdLoaderGlobal=this;!function(e){e.global=_amdLoaderGlobal;var t=function(){function t(){this._detected=!1,this._isWindows=!1,this._isNode=!1,this._isElectronRenderer=!1,this._isWebWorker=!1}return Object.defineProperty(t.prototype,"isWindows",{get:function(){return this._detect(),this._isWindows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNode",{get:function(){return this._detect(),this._isNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isElectronRenderer",{get:function(){return this._detect(),this._isElectronRenderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWebWorker",{get:function(){return this._detect(),this._isWebWorker},enumerable:!0,configurable:!0}),t.prototype._detect=function(){this._detected||(this._detected=!0,this._isWindows=t._isWindows(),this._isNode="undefined"!=typeof module&&!!module.exports, 8 | this._isElectronRenderer="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type,this._isWebWorker="function"==typeof e.global.importScripts)},t._isWindows=function(){return!!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Windows")>=0)||"undefined"!=typeof process&&"win32"===process.platform},t}();e.Environment=t}(AMDLoader||(AMDLoader={}));!function(e){var t=function(){return function(e,t,r){this.type=e,this.detail=t,this.timestamp=r}}();e.LoaderEvent=t;var r=function(){function r(e){this._events=[new t(1,"",e)]}return r.prototype.record=function(r,n){this._events.push(new t(r,n,e.Utilities.getHighPerformanceTimestamp()))},r.prototype.getEvents=function(){return this._events},r}();e.LoaderEventRecorder=r;var n=function(){function e(){}return e.prototype.record=function(e,t){},e.prototype.getEvents=function(){return[]},e.INSTANCE=new e,e}();e.NullLoaderEventRecorder=n}(AMDLoader||(AMDLoader={}));!function(e){ 9 | var t=function(){function t(){}return t.fileUriToFilePath=function(e,t){if(t=decodeURI(t),e){if(/^file:\/\/\//.test(t))return t.substr(8);if(/^file:\/\//.test(t))return t.substr(5)}else if(/^file:\/\//.test(t))return t.substr(7);return t},t.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},t.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},t.containsQueryString=function(e){return/^[^\#]*\?/gi.test(e)},t.isAbsolutePath=function(e){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)},t.forEachProperty=function(e,t){if(e){var r=void 0;for(r in e)e.hasOwnProperty(r)&&t(r,e[r])}},t.isEmpty=function(e){var r=!0;return t.forEachProperty(e,function(){r=!1}),r},t.recursiveClone=function(e){if(!e||"object"!=typeof e)return e;var r=Array.isArray(e)?[]:{};return t.forEachProperty(e,function(e,n){r[e]=n&&"object"==typeof n?t.recursiveClone(n):n}),r},t.generateAnonymousModule=function(){return"===anonymous"+t.NEXT_ANONYMOUS_ID+++"==="}, 10 | t.isAnonymousModule=function(e){return t.startsWith(e,"===anonymous")},t.getHighPerformanceTimestamp=function(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=e.global.performance&&"function"==typeof e.global.performance.now),this.HAS_PERFORMANCE_NOW?e.global.performance.now():Date.now()},t.NEXT_ANONYMOUS_ID=1,t.PERFORMANCE_NOW_PROBED=!1,t.HAS_PERFORMANCE_NOW=!1,t}();e.Utilities=t}(AMDLoader||(AMDLoader={}));!function(e){var t=function(){function t(){}return t.validateConfigurationOptions=function(t){function r(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),e.detail&&e.detail.stack&&console.error(e.detail.stack),console.error("Here are the modules that depend on it:"),void console.error(e.neededBy)):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void(e.detail&&e.detail.stack&&console.error(e.detail.stack))):void 0} 11 | return"string"!=typeof(t=t||{}).baseUrl&&(t.baseUrl=""),"boolean"!=typeof t.isBuild&&(t.isBuild=!1),"object"!=typeof t.paths&&(t.paths={}),"object"!=typeof t.config&&(t.config={}),void 0===t.catchError&&(t.catchError=!1),"string"!=typeof t.urlArgs&&(t.urlArgs=""),"function"!=typeof t.onError&&(t.onError=r),"object"==typeof t.ignoreDuplicateModules&&Array.isArray(t.ignoreDuplicateModules)||(t.ignoreDuplicateModules=[]),t.baseUrl.length>0&&(e.Utilities.endsWith(t.baseUrl,"/")||(t.baseUrl+="/")),Array.isArray(t.nodeModules)||(t.nodeModules=[]),("number"!=typeof t.nodeCachedDataWriteDelay||t.nodeCachedDataWriteDelay<0)&&(t.nodeCachedDataWriteDelay=7e3),"function"!=typeof t.onNodeCachedData&&(t.onNodeCachedData=function(e,t){e&&("cachedDataRejected"===e.errorCode?console.warn("Rejected cached data from file: "+e.path):"unlink"===e.errorCode||"writeFile"===e.errorCode?(console.error("Problems writing cached data file: "+e.path),console.error(e.detail)):console.error(e))}),t}, 12 | t.mergeConfigurationOptions=function(r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o=e.Utilities.recursiveClone(n||{});return e.Utilities.forEachProperty(r,function(t,r){"ignoreDuplicateModules"===t&&void 0!==o.ignoreDuplicateModules?o.ignoreDuplicateModules=o.ignoreDuplicateModules.concat(r):"paths"===t&&void 0!==o.paths?e.Utilities.forEachProperty(r,function(e,t){return o.paths[e]=t}):"config"===t&&void 0!==o.config?e.Utilities.forEachProperty(r,function(e,t){return o.config[e]=t}):o[t]=e.Utilities.recursiveClone(r)}),t.validateConfigurationOptions(o)},t}();e.ConfigurationOptionsUtil=t;var r=function(){function r(e,r){if(this._env=e,this.options=t.mergeConfigurationOptions(r),this._createIgnoreDuplicateModulesMap(),this._createNodeModulesMap(),this._createSortedPathsRules(),""===this.options.baseUrl){if(this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){ 13 | var n=this.options.nodeRequire.main.filename,o=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"));this.options.baseUrl=n.substring(0,o+1)}if(this.options.nodeMain&&this._env.isNode){var n=this.options.nodeMain,o=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"));this.options.baseUrl=n.substring(0,o+1)}}}return r.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var e=0;e=0){var n=t.resolveModule(e.substr(0,r)),s=t.resolveModule(e.substr(r+1)),d=this._moduleIdProvider.getModuleId(n+"!"+s),a=this._moduleIdProvider.getModuleId(n);return new i(d,a,s)}return new o(this._moduleIdProvider.getModuleId(t.resolveModule(e)))},s.prototype._normalizeDependencies=function(e,t){for(var r=[],n=0,o=0,i=e.length;o0;){var a=d.shift(),u=this._modules2[a];u&&(s=u.onDependencyError(r)||s);var l=this._inverseDependencies2[a];if(l)for(var o=0,i=l.length;o0;){var d=s.shift().dependencies;if(d)for(var o=0,i=d.length;o=n.length)t._onLoadError(e,r);else{var s=n[o],d=t.getRecorder();if(t._config.isBuild()&&"empty:"===s)return t._buildInfoPath[e]=s,t.defineModule(t._moduleIdProvider.getStrModuleId(e),[],null,null,null),void t._onLoad(e);d.record(10,s),t._scriptLoader.load(t,s,function(){t._config.isBuild()&&(t._buildInfoPath[e]=s),d.record(11,s),t._onLoad(e)},function(e){d.record(12,s),i(e)})}};i(null)}},s.prototype._loadPluginDependency=function(e,r){var n=this 31 | ;if(!this._modules2[r.id]&&!this._knownModules2[r.id]){this._knownModules2[r.id]=!0;var o=function(e){n.defineModule(n._moduleIdProvider.getStrModuleId(r.id),[],e,null,null)};o.error=function(e){n._config.onError(n._createLoadError(r.id,e))},e.load(r.pluginParam,this._createRequire(t.ROOT),o,this._config.getOptionsLiteral())}},s.prototype._resolve=function(e){for(var t=this,r=e.dependencies,n=0,s=r.length;n \n")),e.unresolvedDependenciesCount-- 32 | }else if(this._inverseDependencies2[d.id]=this._inverseDependencies2[d.id]||[],this._inverseDependencies2[d.id].push(e.id),d instanceof i){var l=this._modules2[d.pluginId];if(l&&l.isComplete()){this._loadPluginDependency(l.exports,d);continue}var c=this._inversePluginDependencies2.get(d.pluginId);c||(c=[],this._inversePluginDependencies2.set(d.pluginId,c)),c.push(d),this._loadModule(d.pluginId)}else this._loadModule(d.id)}else e.unresolvedDependenciesCount--;else e.unresolvedDependenciesCount--;else e.exportsPassedIn=!0,e.unresolvedDependenciesCount--}0===e.unresolvedDependenciesCount&&this._onModuleComplete(e)},s.prototype._onModuleComplete=function(e){var t=this,r=this.getRecorder();if(!e.isComplete()){for(var n=e.dependencies,i=[],s=0,d=n.length;s>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/ 167 | }, { 168 | token : "punctuation.operator", 169 | regex : "\\?|\\:|\\,|\\;|\\." 170 | }, { 171 | token : "paren.lparen", 172 | regex : "[[({]" 173 | }, { 174 | token : "paren.rparen", 175 | regex : "[\\])}]" 176 | }, { 177 | token : "text", 178 | regex : "\\s+" 179 | } 180 | ], 181 | "comment" : [ 182 | { 183 | token : "comment", // closing comment 184 | regex : "\\*\\/", 185 | next : "start" 186 | }, { 187 | defaultToken : "comment" 188 | } 189 | ], 190 | "singleLineComment" : [ 191 | { 192 | token : "comment", 193 | regex : /\\$/, 194 | next : "singleLineComment" 195 | }, { 196 | token : "comment", 197 | regex : /$/, 198 | next : "start" 199 | }, { 200 | defaultToken: "comment" 201 | } 202 | ], 203 | "directive" : [ 204 | { 205 | token : "constant.other.multiline", 206 | regex : /\\/ 207 | }, 208 | { 209 | token : "constant.other.multiline", 210 | regex : /.*\\/ 211 | }, 212 | { 213 | token : "constant.other", 214 | regex : "\\s*<.+?>", 215 | next : "start" 216 | }, 217 | { 218 | token : "constant.other", // single line 219 | regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', 220 | next : "start" 221 | }, 222 | { 223 | token : "constant.other", // single line 224 | regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", 225 | next : "start" 226 | }, 227 | { 228 | token : "constant.other", 229 | regex : /[^\\\/]+/, 230 | next : "start" 231 | } 232 | ] 233 | }; 234 | 235 | this.embedRules(DocCommentHighlightRules, "doc-", 236 | [ DocCommentHighlightRules.getEndRule("start") ]); 237 | this.normalizeRules(); 238 | }; 239 | 240 | oop.inherits(c_cppHighlightRules, TextHighlightRules); 241 | 242 | exports.c_cppHighlightRules = c_cppHighlightRules; 243 | }); 244 | 245 | ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { 246 | "use strict"; 247 | 248 | var Range = require("../range").Range; 249 | 250 | var MatchingBraceOutdent = function() {}; 251 | 252 | (function() { 253 | 254 | this.checkOutdent = function(line, input) { 255 | if (! /^\s+$/.test(line)) 256 | return false; 257 | 258 | return /^\s*\}/.test(input); 259 | }; 260 | 261 | this.autoOutdent = function(doc, row) { 262 | var line = doc.getLine(row); 263 | var match = line.match(/^(\s*\})/); 264 | 265 | if (!match) return 0; 266 | 267 | var column = match[1].length; 268 | var openBracePos = doc.findMatchingBracket({row: row, column: column}); 269 | 270 | if (!openBracePos || openBracePos.row == row) return 0; 271 | 272 | var indent = this.$getIndent(doc.getLine(openBracePos.row)); 273 | doc.replace(new Range(row, 0, row, column-1), indent); 274 | }; 275 | 276 | this.$getIndent = function(line) { 277 | return line.match(/^\s*/)[0]; 278 | }; 279 | 280 | }).call(MatchingBraceOutdent.prototype); 281 | 282 | exports.MatchingBraceOutdent = MatchingBraceOutdent; 283 | }); 284 | 285 | ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { 286 | "use strict"; 287 | 288 | var oop = require("../../lib/oop"); 289 | var Range = require("../../range").Range; 290 | var BaseFoldMode = require("./fold_mode").FoldMode; 291 | 292 | var FoldMode = exports.FoldMode = function(commentRegex) { 293 | if (commentRegex) { 294 | this.foldingStartMarker = new RegExp( 295 | this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) 296 | ); 297 | this.foldingStopMarker = new RegExp( 298 | this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) 299 | ); 300 | } 301 | }; 302 | oop.inherits(FoldMode, BaseFoldMode); 303 | 304 | (function() { 305 | 306 | this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; 307 | this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; 308 | this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; 309 | this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; 310 | this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; 311 | this._getFoldWidgetBase = this.getFoldWidget; 312 | this.getFoldWidget = function(session, foldStyle, row) { 313 | var line = session.getLine(row); 314 | 315 | if (this.singleLineBlockCommentRe.test(line)) { 316 | if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) 317 | return ""; 318 | } 319 | 320 | var fw = this._getFoldWidgetBase(session, foldStyle, row); 321 | 322 | if (!fw && this.startRegionRe.test(line)) 323 | return "start"; // lineCommentRegionStart 324 | 325 | return fw; 326 | }; 327 | 328 | this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { 329 | var line = session.getLine(row); 330 | 331 | if (this.startRegionRe.test(line)) 332 | return this.getCommentRegionBlock(session, line, row); 333 | 334 | var match = line.match(this.foldingStartMarker); 335 | if (match) { 336 | var i = match.index; 337 | 338 | if (match[1]) 339 | return this.openingBracketBlock(session, match[1], row, i); 340 | 341 | var range = session.getCommentFoldRange(row, i + match[0].length, 1); 342 | 343 | if (range && !range.isMultiLine()) { 344 | if (forceMultiline) { 345 | range = this.getSectionRange(session, row); 346 | } else if (foldStyle != "all") 347 | range = null; 348 | } 349 | 350 | return range; 351 | } 352 | 353 | if (foldStyle === "markbegin") 354 | return; 355 | 356 | var match = line.match(this.foldingStopMarker); 357 | if (match) { 358 | var i = match.index + match[0].length; 359 | 360 | if (match[1]) 361 | return this.closingBracketBlock(session, match[1], row, i); 362 | 363 | return session.getCommentFoldRange(row, i, -1); 364 | } 365 | }; 366 | 367 | this.getSectionRange = function(session, row) { 368 | var line = session.getLine(row); 369 | var startIndent = line.search(/\S/); 370 | var startRow = row; 371 | var startColumn = line.length; 372 | row = row + 1; 373 | var endRow = row; 374 | var maxRow = session.getLength(); 375 | while (++row < maxRow) { 376 | line = session.getLine(row); 377 | var indent = line.search(/\S/); 378 | if (indent === -1) 379 | continue; 380 | if (startIndent > indent) 381 | break; 382 | var subRange = this.getFoldWidgetRange(session, "all", row); 383 | 384 | if (subRange) { 385 | if (subRange.start.row <= startRow) { 386 | break; 387 | } else if (subRange.isMultiLine()) { 388 | row = subRange.end.row; 389 | } else if (startIndent == indent) { 390 | break; 391 | } 392 | } 393 | endRow = row; 394 | } 395 | 396 | return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); 397 | }; 398 | this.getCommentRegionBlock = function(session, line, row) { 399 | var startColumn = line.search(/\s*$/); 400 | var maxRow = session.getLength(); 401 | var startRow = row; 402 | 403 | var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; 404 | var depth = 1; 405 | while (++row < maxRow) { 406 | line = session.getLine(row); 407 | var m = re.exec(line); 408 | if (!m) continue; 409 | if (m[1]) depth--; 410 | else depth++; 411 | 412 | if (!depth) break; 413 | } 414 | 415 | var endRow = row; 416 | if (endRow > startRow) { 417 | return new Range(startRow, startColumn, endRow, line.length); 418 | } 419 | }; 420 | 421 | }).call(FoldMode.prototype); 422 | 423 | }); 424 | 425 | ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { 426 | "use strict"; 427 | 428 | var oop = require("../lib/oop"); 429 | var TextMode = require("./text").Mode; 430 | var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; 431 | var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; 432 | var Range = require("../range").Range; 433 | var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; 434 | var CStyleFoldMode = require("./folding/cstyle").FoldMode; 435 | 436 | var Mode = function() { 437 | this.HighlightRules = c_cppHighlightRules; 438 | 439 | this.$outdent = new MatchingBraceOutdent(); 440 | this.$behaviour = new CstyleBehaviour(); 441 | 442 | this.foldingRules = new CStyleFoldMode(); 443 | }; 444 | oop.inherits(Mode, TextMode); 445 | 446 | (function() { 447 | 448 | this.lineCommentStart = "//"; 449 | this.blockComment = {start: "/*", end: "*/"}; 450 | 451 | this.getNextLineIndent = function(state, line, tab) { 452 | var indent = this.$getIndent(line); 453 | 454 | var tokenizedLine = this.getTokenizer().getLineTokens(line, state); 455 | var tokens = tokenizedLine.tokens; 456 | var endState = tokenizedLine.state; 457 | 458 | if (tokens.length && tokens[tokens.length-1].type == "comment") { 459 | return indent; 460 | } 461 | 462 | if (state == "start") { 463 | var match = line.match(/^.*[\{\(\[]\s*$/); 464 | if (match) { 465 | indent += tab; 466 | } 467 | } else if (state == "doc-start") { 468 | if (endState == "start") { 469 | return ""; 470 | } 471 | var match = line.match(/^\s*(\/?)\*/); 472 | if (match) { 473 | if (match[1]) { 474 | indent += " "; 475 | } 476 | indent += "* "; 477 | } 478 | } 479 | 480 | return indent; 481 | }; 482 | 483 | this.checkOutdent = function(state, line, input) { 484 | return this.$outdent.checkOutdent(line, input); 485 | }; 486 | 487 | this.autoOutdent = function(state, doc, row) { 488 | this.$outdent.autoOutdent(doc, row); 489 | }; 490 | 491 | this.$id = "ace/mode/c_cpp"; 492 | }).call(Mode.prototype); 493 | 494 | exports.Mode = Mode; 495 | }); (function() { 496 | ace.require(["ace/mode/c_cpp"], function(m) { 497 | if (typeof module == "object" && typeof exports == "object" && module) { 498 | module.exports = m; 499 | } 500 | }); 501 | })(); 502 | -------------------------------------------------------------------------------- /src/theme-sqlserver.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-sqlserver"; 5 | exports.cssText = ".ace-sqlserver .ace_gutter {\ 6 | background: #ebebeb;\ 7 | color: #333;\ 8 | overflow: hidden;\ 9 | }\ 10 | .ace-sqlserver .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #e8e8e8;\ 13 | }\ 14 | .ace-sqlserver {\ 15 | background-color: #FFFFFF;\ 16 | color: black;\ 17 | }\ 18 | .ace-sqlserver .ace_identifier {\ 19 | color: black;\ 20 | }\ 21 | .ace-sqlserver .ace_keyword {\ 22 | color: #0000FF;\ 23 | }\ 24 | .ace-sqlserver .ace_numeric {\ 25 | color: black;\ 26 | }\ 27 | .ace-sqlserver .ace_storage {\ 28 | color: #11B7BE;\ 29 | }\ 30 | .ace-sqlserver .ace_keyword.ace_operator,\ 31 | .ace-sqlserver .ace_lparen,\ 32 | .ace-sqlserver .ace_rparen,\ 33 | .ace-sqlserver .ace_punctuation {\ 34 | color: #808080;\ 35 | }\ 36 | .ace-sqlserver .ace_set.ace_statement {\ 37 | color: #0000FF;\ 38 | text-decoration: underline;\ 39 | }\ 40 | .ace-sqlserver .ace_cursor {\ 41 | color: black;\ 42 | }\ 43 | .ace-sqlserver .ace_invisible {\ 44 | color: rgb(191, 191, 191);\ 45 | }\ 46 | .ace-sqlserver .ace_constant.ace_buildin {\ 47 | color: rgb(88, 72, 246);\ 48 | }\ 49 | .ace-sqlserver .ace_constant.ace_language {\ 50 | color: #979797;\ 51 | }\ 52 | .ace-sqlserver .ace_constant.ace_library {\ 53 | color: rgb(6, 150, 14);\ 54 | }\ 55 | .ace-sqlserver .ace_invalid {\ 56 | background-color: rgb(153, 0, 0);\ 57 | color: white;\ 58 | }\ 59 | .ace-sqlserver .ace_support.ace_function {\ 60 | color: #FF00FF;\ 61 | }\ 62 | .ace-sqlserver .ace_support.ace_constant {\ 63 | color: rgb(6, 150, 14);\ 64 | }\ 65 | .ace-sqlserver .ace_class {\ 66 | color: #008080;\ 67 | }\ 68 | .ace-sqlserver .ace_support.ace_other {\ 69 | color: #6D79DE;\ 70 | }\ 71 | .ace-sqlserver .ace_variable.ace_parameter {\ 72 | font-style: italic;\ 73 | color: #FD971F;\ 74 | }\ 75 | .ace-sqlserver .ace_comment {\ 76 | color: #008000;\ 77 | }\ 78 | .ace-sqlserver .ace_constant.ace_numeric {\ 79 | color: black;\ 80 | }\ 81 | .ace-sqlserver .ace_variable {\ 82 | color: rgb(49, 132, 149);\ 83 | }\ 84 | .ace-sqlserver .ace_xml-pe {\ 85 | color: rgb(104, 104, 91);\ 86 | }\ 87 | .ace-sqlserver .ace_support.ace_storedprocedure {\ 88 | color: #800000;\ 89 | }\ 90 | .ace-sqlserver .ace_heading {\ 91 | color: rgb(12, 7, 255);\ 92 | }\ 93 | .ace-sqlserver .ace_list {\ 94 | color: rgb(185, 6, 144);\ 95 | }\ 96 | .ace-sqlserver .ace_marker-layer .ace_selection {\ 97 | background: rgb(217, 244, 244);\ 98 | }\ 99 | .ace-sqlserver .ace_marker-layer .ace_step {\ 100 | background: rgb(252, 255, 0);\ 101 | }\ 102 | .ace-sqlserver .ace_marker-layer .ace_stack {\ 103 | background: rgb(164, 229, 101);\ 104 | }\ 105 | .ace-sqlserver .ace_marker-layer .ace_bracket {\ 106 | margin: -1px 0 0 -1px;\ 107 | border: 1px solid rgb(192, 192, 192);\ 108 | }\ 109 | .ace-sqlserver .ace_marker-layer .ace_active-line {\ 110 | background: rgba(0, 0, 0, 0.07);\ 111 | }\ 112 | .ace-sqlserver .ace_gutter-active-line {\ 113 | background-color: #dcdcdc;\ 114 | }\ 115 | .ace-sqlserver .ace_marker-layer .ace_selected-word {\ 116 | background: rgb(250, 250, 255);\ 117 | border: 1px solid rgb(200, 200, 250);\ 118 | }\ 119 | .ace-sqlserver .ace_meta.ace_tag {\ 120 | color: #0000FF;\ 121 | }\ 122 | .ace-sqlserver .ace_string.ace_regex {\ 123 | color: #FF0000;\ 124 | }\ 125 | .ace-sqlserver .ace_string {\ 126 | color: #FF0000;\ 127 | }\ 128 | .ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\ 129 | color: #994409;\ 130 | }\ 131 | .ace-sqlserver .ace_indent-guide {\ 132 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 133 | }\ 134 | "; 135 | 136 | var dom = require("../lib/dom"); 137 | dom.importCssString(exports.cssText, exports.cssClass); 138 | }); (function() { 139 | ace.require(["ace/theme/sqlserver"], function(m) { 140 | if (typeof module == "object" && typeof exports == "object" && module) { 141 | module.exports = m; 142 | } 143 | }); 144 | })(); 145 | -------------------------------------------------------------------------------- /support.md: -------------------------------------------------------------------------------- 1 | # [Support](https://www.patreon.com/vasyop) this project. 2 | 3 | *Your adventure is...being crafted*. 4 | 5 | Hi everyone ! Thank you for your very positive feedback [here](https://www.reddit.com/r/javascript/comments/aoskao/learn_c_and_its_lower_level_interactively_in_your/), [here](https://www.reddit.com/r/learnprogramming/comments/aosk8b/learn_c_and_its_lower_levels_interactively_in/) and [here](https://news.ycombinator.com/item?id=19126544)! 6 | 7 | I'm already working full-time and studying on weekends there isn't much time left for this project, just early mornings and late nights for now. 8 | 9 | My goal is to free up at least one or two days per week to work on this project, but that can only happen with your **[support](https://www.patreon.com/vasyop)**. 10 | --------------------------------------------------------------------------------