├── .github └── PULL_REQUEST_TEMPLATE ├── .gitignore ├── .gitignore.travis ├── .nojekyll ├── .travis.yml ├── .vscode ├── launch.json └── settings.json ├── CNAME ├── LICENSE ├── README.md ├── config.json ├── embed.html ├── favicon.ico ├── fonts ├── octicons.css ├── octicons │ ├── OSSREADME.json │ ├── README.md │ ├── octicons-animations.css │ ├── octicons-local.ttf │ ├── octicons.css │ ├── octicons.eot │ ├── octicons.less │ ├── octicons.scss │ ├── octicons.svg │ ├── octicons.ttf │ ├── octicons.woff │ └── sprockets-octicons.scss ├── roboto.css ├── roboto.ttf ├── seti-extra.css ├── seti-extra.woff ├── seti.css ├── seti.woff ├── zilla.css └── zilla.ttf ├── img ├── logo.png ├── wa.png └── web-assembly-icon-white-64px.png ├── index.html ├── lib ├── base64js.min.js ├── binaryen.js ├── capstone.x86.min.js ├── clang-format.js ├── clang-format.wasm ├── fiddle.d.ts ├── ga.js ├── lib.es6.d.ts ├── libwabt.js ├── monaco-editor │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── ThirdPartyNotices.txt │ ├── dev │ │ ├── bundleInfo.json │ │ ├── nls.metadata.json │ │ └── vs │ │ │ ├── base │ │ │ └── worker │ │ │ │ ├── workerMain.js │ │ │ │ └── workerMain.js.map │ │ │ ├── basic-languages │ │ │ └── src │ │ │ │ ├── bat.js │ │ │ │ ├── coffee.js │ │ │ │ ├── cpp.js │ │ │ │ ├── csharp.js │ │ │ │ ├── css.js │ │ │ │ ├── dockerfile.js │ │ │ │ ├── fsharp.js │ │ │ │ ├── go.js │ │ │ │ ├── handlebars.js │ │ │ │ ├── html.js │ │ │ │ ├── ini.js │ │ │ │ ├── java.js │ │ │ │ ├── less.js │ │ │ │ ├── lua.js │ │ │ │ ├── markdown.js │ │ │ │ ├── msdax.js │ │ │ │ ├── objective-c.js │ │ │ │ ├── php.js │ │ │ │ ├── postiats.js │ │ │ │ ├── powershell.js │ │ │ │ ├── pug.js │ │ │ │ ├── python.js │ │ │ │ ├── r.js │ │ │ │ ├── razor.js │ │ │ │ ├── ruby.js │ │ │ │ ├── sb.js │ │ │ │ ├── scss.js │ │ │ │ ├── solidity.js │ │ │ │ ├── sql.js │ │ │ │ ├── swift.js │ │ │ │ ├── vb.js │ │ │ │ ├── xml.js │ │ │ │ └── yaml.js │ │ │ ├── editor │ │ │ ├── contrib │ │ │ │ └── suggest │ │ │ │ │ └── media │ │ │ │ │ ├── String_16x.svg │ │ │ │ │ └── String_inverse_16x.svg │ │ │ ├── editor.main.css │ │ │ ├── editor.main.js │ │ │ ├── editor.main.js.map │ │ │ ├── editor.main.nls.js │ │ │ └── standalone │ │ │ │ └── browser │ │ │ │ └── quickOpen │ │ │ │ └── symbol-sprite.svg │ │ │ ├── language │ │ │ ├── css │ │ │ │ ├── cssMode.js │ │ │ │ └── cssWorker.js │ │ │ ├── html │ │ │ │ ├── htmlMode.js │ │ │ │ └── htmlWorker.js │ │ │ ├── json │ │ │ │ ├── jsonMode.js │ │ │ │ └── jsonWorker.js │ │ │ └── typescript │ │ │ │ ├── lib │ │ │ │ └── typescriptServices.js │ │ │ │ └── src │ │ │ │ ├── mode.js │ │ │ │ └── worker.js │ │ │ ├── loader.js │ │ │ └── loader.js.map │ ├── min-maps │ │ └── vs │ │ │ ├── base │ │ │ └── worker │ │ │ │ └── workerMain.js.map │ │ │ ├── editor │ │ │ ├── editor.main.js.map │ │ │ └── editor.main.nls.js.map │ │ │ └── loader.js.map │ ├── min │ │ └── vs │ │ │ ├── base │ │ │ └── worker │ │ │ │ └── workerMain.js │ │ │ ├── basic-languages │ │ │ └── src │ │ │ │ ├── bat.js │ │ │ │ ├── coffee.js │ │ │ │ ├── cpp.js │ │ │ │ ├── csharp.js │ │ │ │ ├── css.js │ │ │ │ ├── dockerfile.js │ │ │ │ ├── fsharp.js │ │ │ │ ├── go.js │ │ │ │ ├── handlebars.js │ │ │ │ ├── html.js │ │ │ │ ├── ini.js │ │ │ │ ├── java.js │ │ │ │ ├── less.js │ │ │ │ ├── lua.js │ │ │ │ ├── markdown.js │ │ │ │ ├── msdax.js │ │ │ │ ├── objective-c.js │ │ │ │ ├── php.js │ │ │ │ ├── postiats.js │ │ │ │ ├── powershell.js │ │ │ │ ├── pug.js │ │ │ │ ├── python.js │ │ │ │ ├── r.js │ │ │ │ ├── razor.js │ │ │ │ ├── ruby.js │ │ │ │ ├── sb.js │ │ │ │ ├── scss.js │ │ │ │ ├── solidity.js │ │ │ │ ├── sql.js │ │ │ │ ├── swift.js │ │ │ │ ├── vb.js │ │ │ │ ├── xml.js │ │ │ │ └── yaml.js │ │ │ ├── editor │ │ │ ├── contrib │ │ │ │ └── suggest │ │ │ │ │ └── media │ │ │ │ │ ├── String_16x.svg │ │ │ │ │ └── String_inverse_16x.svg │ │ │ ├── editor.main.css │ │ │ ├── editor.main.js │ │ │ ├── editor.main.nls.js │ │ │ └── standalone │ │ │ │ └── browser │ │ │ │ └── quickOpen │ │ │ │ └── symbol-sprite.svg │ │ │ ├── language │ │ │ ├── css │ │ │ │ ├── cssMode.js │ │ │ │ └── cssWorker.js │ │ │ ├── html │ │ │ │ ├── htmlMode.js │ │ │ │ └── htmlWorker.js │ │ │ ├── json │ │ │ │ ├── jsonMode.js │ │ │ │ └── jsonWorker.js │ │ │ └── typescript │ │ │ │ ├── lib │ │ │ │ └── typescriptServices.js │ │ │ │ └── src │ │ │ │ ├── mode.js │ │ │ │ └── worker.js │ │ │ └── loader.js │ ├── monaco.d.ts │ └── package.json └── showdown.min.js ├── notes └── notes.md ├── package-lock.json ├── package.json ├── src ├── actions │ └── AppActions.ts ├── components │ ├── App.tsx │ ├── Binary.tsx │ ├── BrowserNotSupported.tsx │ ├── ControlCenter.tsx │ ├── DirectoryTree.tsx │ ├── EditFileDialog.tsx │ ├── Header.tsx │ ├── Markdown.tsx │ ├── NewDirectoryDialog.tsx │ ├── NewFileDialog.tsx │ ├── NewProjectDialog.tsx │ ├── Problems.tsx │ ├── Sandbox.tsx │ ├── ShareDialog.tsx │ ├── Split.tsx │ ├── StatusBar.tsx │ ├── Toasts.tsx │ ├── Toolbar.tsx │ ├── UploadFileDialog.tsx │ ├── Widgets.tsx │ ├── Workspace.tsx │ ├── WorkspaceEntry.tsx │ ├── editor │ │ ├── Editor.tsx │ │ ├── Tabs.tsx │ │ ├── View.tsx │ │ ├── ViewTabs.tsx │ │ └── index.ts │ └── shared │ │ ├── Button.tsx │ │ └── Icons.tsx ├── config.ts ├── dispatcher.ts ├── errors.ts ├── gulpy.ts ├── index.tsx ├── languages │ ├── cton.ts │ ├── log.ts │ ├── rust.ts │ ├── wat.ts │ └── x86.ts ├── model.ts ├── monaco-extra.ts ├── monaco-utils.ts ├── service.ts ├── stores │ └── AppStore.ts ├── util.ts └── utils │ ├── download.ts │ ├── fetchTemplates.ts │ ├── ga.ts │ ├── group.ts │ ├── registerLanguages.ts │ └── zlib.ts ├── style ├── global.css ├── markdown.css ├── ref.css ├── split-pane.css └── theme.css ├── svg ├── close.svg ├── default_file.svg ├── default_folder.svg ├── default_folder_opened.svg ├── error-dark.svg ├── error.svg ├── favicon.psd ├── info-dark.svg ├── info.svg ├── wa-pp-black.svg ├── wa-pp-white.svg ├── wa-pp.svg ├── wa.svg ├── warning-dark.svg ├── warning.svg ├── web-assembly-logo-black.svg ├── web-assembly-logo-white.svg └── web-assembly-logo.svg ├── templates ├── empty_c │ ├── README.md │ ├── build.ts │ ├── package.json │ └── src │ │ ├── main.c │ │ ├── main.html │ │ └── main.js ├── empty_rust │ ├── README.md │ ├── build.ts │ ├── package.json │ └── src │ │ ├── main.html │ │ ├── main.js │ │ └── main.rs ├── empty_ts │ ├── README.md │ ├── assembly │ │ ├── main.ts │ │ └── tsconfig.json │ ├── gulpfile.js │ ├── package.json │ ├── setup.js │ └── src │ │ ├── main.html │ │ └── main.js ├── empty_wat │ ├── README.md │ ├── build.ts │ ├── package.json │ └── src │ │ ├── main.html │ │ ├── main.js │ │ └── main.wat ├── hello_world_c │ ├── README.md │ ├── build.ts │ ├── package.json │ └── src │ │ ├── main.c │ │ ├── main.html │ │ └── main.js └── templates.js ├── test-preprocessor.js ├── test-setup.js ├── test-shim.js ├── tests ├── __mocks__ │ └── monaco-editor.ts ├── actions │ └── AppActions │ │ └── AppActions.spec.ts ├── components │ ├── Button │ │ └── Button.spec.tsx │ ├── ControlCenter │ │ └── ControlCenter.spec.tsx │ ├── Header │ │ └── Header.spec.tsx │ ├── NewProjectDialog │ │ ├── NewProjectDialog.spec.tsx │ │ └── templates.json │ └── icons │ │ └── icons.spec.tsx ├── unit │ └── wat.spec.ts └── utils │ └── group.spec.tsx ├── tsconfig.json ├── tsconfig.test.json ├── tslint.json ├── web-assembly-icon-white-64px.png └── webpack.config.js /.github/PULL_REQUEST_TEMPLATE: -------------------------------------------------------------------------------- 1 | Associated Issue: # 2 | 3 | Here's the contributing guide at https://github.com/wasdk/WebAssemblyStudio/wiki/Contributing 4 | 5 | ### Summary of Changes 6 | 7 | * change 1 8 | * change 2 9 | 10 | ### Test Plan 11 | 12 | Tell us a little a bit about how you tested your patch. 13 | 14 | Example test plan: 15 | 16 | - [x] Create C "hello, world" project 17 | - [x] Click Build button 18 | - [x] Click Run button, and observe the Result pannel 19 | - [x] Clicking the "x" on the Result panel closes it 20 | 21 | ### Screenshots/Videos (OPTIONAL) 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | src/components/Test*.tsx 4 | -------------------------------------------------------------------------------- /.gitignore.travis: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/.nojekyll -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - '8' 5 | # skipping - '6' 6 | branches: 7 | only: 8 | - master 9 | cache: 10 | directories: 11 | - node_modules 12 | notifications: 13 | email: 14 | on_success: never 15 | on_failure: always 16 | before_install: 17 | - npm update 18 | install: 19 | - npm install 20 | script: 21 | - npm run build 22 | - npm test 23 | - cp .gitignore.travis .gitignore 24 | deploy: 25 | provider: pages 26 | skip-cleanup: true 27 | github-token: $GITHUB_TOKEN 28 | email: travis@webassembly.studio 29 | name: "WebAssemblyStudio bot" 30 | on: 31 | branch: master 32 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "program": "${file}", 12 | "preLaunchTask": "tsc: build - tsconfig.json", 13 | "outFiles": [ 14 | "${workspaceFolder}/dist/**/*.js" 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "Binaryen", 4 | "Repo", 5 | "Resizer", 6 | "Unmount", 7 | "Wabt", 8 | "Wasm", 9 | "canonicalize", 10 | "minimap", 11 | "multiline", 12 | "octicon", 13 | "onready", 14 | "parens", 15 | "posx", 16 | "wasmparser" 17 | ], 18 | "search.exclude": { 19 | "dist/**": true, 20 | "**/node_modules": true, 21 | "**/bower_components": true 22 | }, 23 | "files.exclude": { 24 | "node_modules/**": true, 25 | "**/.git": true, 26 | "**/.svn": true, 27 | "**/.hg": true, 28 | "**/CVS": true, 29 | "**/.DS_Store": true 30 | } 31 | } -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | webassembly.studio 2 | www.webassembly.studio 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Mozilla Foundation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | WebAssembly Studio 2 | ==== 3 | [![Build Status](https://travis-ci.org/wasdk/WebAssemblyStudio.svg?branch=master)](https://travis-ci.org/wasdk/WebAssemblyStudio) 4 | 5 | This repository contains the [WebAssembly Studio](https://webassembly.studio) website source code. 6 | 7 | Running your own local copy of the website 8 | === 9 | 10 | To run a local copy, you will need to install node.js and webpack on your computer, then run the following commands: 11 | 12 | ``` 13 | npm install 14 | npm install --dev 15 | ``` 16 | 17 | To build WebAssembly Studio whenever a file changes run: 18 | 19 | ``` 20 | npm run build-watch 21 | ``` 22 | 23 | To start a dev web server run: 24 | 25 | ``` 26 | npm run dev-server 27 | ``` 28 | 29 | Before submitting a pull request run: 30 | 31 | ``` 32 | npm test 33 | ``` 34 | 35 | ### Contributing 36 | 37 | Please get familiar with the [contributing guide](https://github.com/wasdk/WebAssemblyStudio/wiki/Contributing). 38 | 39 | Any doubts or questions? You can always find us on slack at http://wasm-studio.slack.com 40 | 41 | Need a slack invite? https://wasm-studio-invite.herokuapp.com/ 42 | 43 | ### Credits 44 | 45 | This project depends on several excellent libraries and tools: 46 | 47 | * [Monaco Editor](https://github.com/Microsoft/monaco-editor) is used for rich text editing, tree views and context menus. 48 | 49 | * [WebAssembly Binary Toolkit](https://github.com/WebAssembly/wabt) is used to assemble and disassemble `.wasm` files. 50 | 51 | * [Binaryen](https://github.com/WebAssembly/binaryen/) is used to validate and optimize `.wasm` files. 52 | 53 | * [Clang Format](https://github.com/tbfleming/cib) is used to format C/C++ files. 54 | 55 | * [Cassowary.js](https://github.com/slightlyoff/cassowary.js/) is used to make split panes work. 56 | 57 | * [Showdown](https://github.com/showdownjs/showdown) is used to automatically preview `.md` files. 58 | 59 | * [Capstone.js](https://alexaltea.github.io/capstone.js/) is used to disassemble `x86` code. 60 | 61 | * LLVM, Rust, Emscripten running server side. 62 | 63 | * And of course: React, WebPack, TypeScript and TSLint. 64 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "serviceUrl": "//wasmexplorer-service.herokuapp.com/service.php", 3 | "rustc": "//rust-heroku.herokuapp.com/rustc" 4 | } 5 | -------------------------------------------------------------------------------- /embed.html: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 26 | 27 | Wasm Fiddle Embed Test 28 | 29 | 30 | 31 | 32 | Overview Before React.PureComponent was introduced, shallowCompare was commonly used to achieve the same functionality as 33 | PureRenderMixin while using ES6 classes with React. If your React component’s render function is “pure” (in other words, 34 | it renders the same result given the same props and state), you can use this helper function for a performance boost 35 | in some cases. 36 | 37 | 39 | 40 | shallowCompare returns true if the shallow comparison for props or state fails and therefore the component should update. 41 | shallowCompare returns false if the shallow comparison for props and state both pass and therefore the component does 42 | not need to update. Edit this page 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/favicon.ico -------------------------------------------------------------------------------- /fonts/octicons.css: -------------------------------------------------------------------------------- 1 | @import url(octicons/octicons.css); 2 | -------------------------------------------------------------------------------- /fonts/octicons/README.md: -------------------------------------------------------------------------------- 1 | If you intend to install Octicons locally, install `octicons-local.ttf`. It should appear as “github-octicons” in your font list. It is specially designed not to conflict with GitHub's web fonts. 2 | -------------------------------------------------------------------------------- /fonts/octicons/octicons-animations.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | @keyframes octicon-spin { 7 | 100% { 8 | transform:rotate(360deg); 9 | } 10 | } 11 | 12 | .octicon-animation-spin { 13 | animation: octicon-spin 2s linear infinite; 14 | } -------------------------------------------------------------------------------- /fonts/octicons/octicons-local.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/octicons/octicons-local.ttf -------------------------------------------------------------------------------- /fonts/octicons/octicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/octicons/octicons.eot -------------------------------------------------------------------------------- /fonts/octicons/octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/octicons/octicons.ttf -------------------------------------------------------------------------------- /fonts/octicons/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/octicons/octicons.woff -------------------------------------------------------------------------------- /fonts/roboto.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Roboto'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('Roboto'), local('Roboto-Regular'), url(roboto.ttf) format('truetype'); 6 | } 7 | -------------------------------------------------------------------------------- /fonts/roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/roboto.ttf -------------------------------------------------------------------------------- /fonts/seti-extra.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'seti-extra'; 3 | font-style: normal; 4 | font-weight: normal; 5 | src: url(seti-extra.woff) format('woff'); 6 | } 7 | -------------------------------------------------------------------------------- /fonts/seti-extra.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/seti-extra.woff -------------------------------------------------------------------------------- /fonts/seti.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'seti'; 3 | font-style: normal; 4 | font-weight: normal; 5 | src: url(seti.woff) format('woff'); 6 | } 7 | -------------------------------------------------------------------------------- /fonts/seti.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/seti.woff -------------------------------------------------------------------------------- /fonts/zilla.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Zilla Slab'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('Zilla Slab'), local('ZillaSlab-Regular'), url(zilla.ttf) format('truetype'); 6 | } 7 | -------------------------------------------------------------------------------- /fonts/zilla.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/fonts/zilla.ttf -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/img/logo.png -------------------------------------------------------------------------------- /img/wa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/img/wa.png -------------------------------------------------------------------------------- /img/web-assembly-icon-white-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/img/web-assembly-icon-white-64px.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | 26 | 27 | WebAssembly Studio 28 | 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/base64js.min.js: -------------------------------------------------------------------------------- 1 | (function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&false&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,t;return function r(e,t,n){function o(i,a){if(!t[i]){if(!e[i]){var u=typeof require=="function"&&require;if(!a&&u)return u(i,!0);if(f)return f(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(r){var t=e[i][1][r];return o(t?t:r)},c,c.exports,r,e,t,n)}return t[i].exports}var f=typeof require=="function"&&require;for(var i=0;i0){throw new Error("Invalid string. Length must be a multiple of 4")}return r[e-2]==="="?2:r[e-1]==="="?1:0}function c(r){return r.length*3/4-d(r)}function v(r){var e,t,n,i,a;var u=r.length;i=d(r);a=new f(u*3/4-i);t=i>0?u-4:u;var c=0;for(e=0;e>16&255;a[c++]=n>>8&255;a[c++]=n&255}if(i===2){n=o[r.charCodeAt(e)]<<2|o[r.charCodeAt(e+1)]>>4;a[c++]=n&255}else if(i===1){n=o[r.charCodeAt(e)]<<10|o[r.charCodeAt(e+1)]<<4|o[r.charCodeAt(e+2)]>>2;a[c++]=n>>8&255;a[c++]=n&255}return a}function l(r){return n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[r&63]}function h(r,e,t){var n;var o=[];for(var f=e;fd?d:u+a))}if(o===1){e=r[t-1];f+=n[e>>2];f+=n[e<<4&63];f+="=="}else if(o===2){e=(r[t-2]<<8)+r[t-1];f+=n[e>>10];f+=n[e>>4&63];f+=n[e<<2&63];f+="="}i.push(f);return i.join("")}},{}]},{},[])("/")}); 2 | -------------------------------------------------------------------------------- /lib/clang-format.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbebenita/WebAssemblyStudio/658ba9f703208d6d203f13eeda8db445b22e6160/lib/clang-format.wasm -------------------------------------------------------------------------------- /lib/fiddle.d.ts: -------------------------------------------------------------------------------- 1 | // Public API 2 | 3 | type PromiseMaker = () => Promise; 4 | 5 | declare class Gulpy { 6 | task(name: string, fn: PromiseMaker): void; 7 | task(name: string, dependencies: string[], fn: PromiseMaker): void; 8 | task(name: string, a: string [] | PromiseMaker, b?: PromiseMaker): void; 9 | } 10 | 11 | /** 12 | * Task Manager 13 | */ 14 | declare const gulp: Gulpy; 15 | 16 | declare enum Language { 17 | C = "c", 18 | Cpp = "cpp", 19 | Wat = "wat", 20 | Wasm = "wasm", 21 | Rust = "rust", 22 | Cretonne = "cton", 23 | x86 = "x86", 24 | Json = "json", 25 | JavaScript = "javascript", 26 | TypeScript = "typescript", 27 | Text = "text" 28 | } 29 | 30 | declare class Service { 31 | static compileFile(file: File, from: Language | string, to: Language | string, options?: string): Promise; 32 | /** 33 | * Disassembles WebAssembly binary into Wat format using Wabt. 34 | */ 35 | static disassembleWasm(buffer: ArrayBuffer): Promise; 36 | static assembleWat(wat: string): Promise; 37 | } 38 | declare const project: any; 39 | 40 | declare function logLn(message: string, kind?: "" | "info" | "warn" | "error"): void; 41 | 42 | /** Asynchronously requires the specified dependencies.. */ 43 | declare function require(deps: string[], fn: (...deps: any[]) => void): void; 44 | 45 | /** Synchronously requires the specified (already loaded) dependency. */ 46 | declare function require(name: string): any; 47 | 48 | declare namespace require { 49 | /** Configures external module paths etc. */ 50 | export function config(options: {}): void; 51 | } 52 | -------------------------------------------------------------------------------- /lib/ga.js: -------------------------------------------------------------------------------- 1 | /* Copyright 2018 Mozilla Foundation 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all 11 | * copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | if (navigator.doNotTrack != "1" && window.location.origin.indexOf("webassembly.studio") >= 0) (function() { 22 | var script = document.createElement("script"); 23 | document.head.appendChild(script); 24 | script.onload = function() { 25 | window.dataLayer = window.dataLayer || []; 26 | function gtag(){dataLayer.push(arguments);} 27 | window.gtag = gtag; 28 | gtag('js', new Date()); 29 | gtag('config', 'UA-93230088-3'); 30 | }; 31 | script.src = "https://www.googletagmanager.com/gtag/js?id=UA-93230088-3"; 32 | })(); 33 | -------------------------------------------------------------------------------- /lib/monaco-editor/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Microsoft Corporation 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. 22 | -------------------------------------------------------------------------------- /lib/monaco-editor/dev/vs/basic-languages/src/bat.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/bat",["require","exports"],function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.conf={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},s.language={defaultToken:"",ignoreCase:!0,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/,symbols:/[=>\/\?\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:"'"}]},t.language={defaultToken:"",ignoreCase:!0,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"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\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"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"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"}]]}}}); -------------------------------------------------------------------------------- /lib/monaco-editor/dev/vs/basic-languages/src/go.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/go",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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:"'"}]},n.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:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\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"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"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.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}}); -------------------------------------------------------------------------------- /lib/monaco-editor/dev/vs/basic-languages/src/ini.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/ini",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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:"'"}]},n.language={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"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"}}]]}}}); -------------------------------------------------------------------------------- /lib/monaco-editor/dev/vs/basic-languages/src/java.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/java",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={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:">"}]},t.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"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@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"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}); -------------------------------------------------------------------------------- /lib/monaco-editor/dev/vs/basic-languages/src/lua.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/src/lua",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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:"'"}]},n.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:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}]},t.language={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+)\s*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"variable.source",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{[^}]+\}/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,{token:"comment",next:"@pop"}],[//,"comment","@pop"],[//,{token:"comment",next:"@pop"}],[/