website/static/js/repl.js
function configureMonaco() {
  monaco.languages.register({ id: "wast" });

  monaco.languages.setMonarchTokensProvider("wast", {
    tokenizer: {
      root: [
        [REGEXP_KEYWORD, "keyword"],
        [REGEXP_KEYWORD_ASSERTS, "keyword"],
        [REGEXP_NUMBER, "number"],
        [/\$([a-zA-Z0-9_`\+\-\*\/\\\^~=<>!\?@#$%&|:\.]+)/, "variable"],
        [REGEXP_STRING, "string"],
        [/;;.*$/, "comment"]
      ]
    }
  });

  monaco.editor.defineTheme("wastTheme", {
    base: "vs-dark",
    inherit: true,
    rules: [
      { token: "string", foreground: "4caf50" },
      { token: "number", foreground: "808080" }
    ]
  });
}
function configureMonaco() {
  monaco.languages.register({ id: "wast" });

  monaco.languages.setMonarchTokensProvider("wast", {
    tokenizer: {
      root: [
        [REGEXP_KEYWORD, "keyword"],
        [REGEXP_KEYWORD_ASSERTS, "keyword"],
        [REGEXP_NUMBER, "number"],
        [/\$([a-zA-Z0-9_`\+\-\*\/\\\^~=<>!\?@#$%&|:\.]+)/, "variable"],
        [REGEXP_STRING, "string"],
        [/;;.*$/, "comment"]
      ]
    }
  });

  monaco.editor.defineTheme("wastTheme", {
    base: "vs-dark",
    inherit: true,
    rules: [
      { token: "string", foreground: "4caf50" },
      { token: "number", foreground: "808080" }
    ]
  });
}
function configureMonaco ( ) { monaco . languages . register ( { id : "wast" } ) ; monaco . languages . setMonarchTokensProvider ( "wast" , { tokenizer : { root : [ [ REGEXP_KEYWORD , "keyword" ] , [ REGEXP_KEYWORD_ASSERTS , "keyword" ] , [ REGEXP_NUMBER , "number" ] , [ / \$([a-zA-Z0-9_`\+\-\*\/\\\^~=<>!\?@#$%&|:\.]+) / , "variable" ] , [ REGEXP_STRING , "string" ] , [ / ;;.*$ / , "comment" ] ] } } ) ; monaco . editor . defineTheme ( "wastTheme" , { base : "vs-dark" , inherit : true , rules : [ { token : "string" , foreground : "4caf50" } , { token : "number" , foreground : "808080" } ] } ) ; }
Monaco wast def
Monaco wast def