_____
    ,-:` \;',`'-,
  .'-;_,;  ':-;_,'.
 /;   '/    ,  _`.-\
| '`. (`     /` ` \`|
|:.  `\`-.   \_   / |
|     (   `,  .`\ ;'|
 \     | .'     `-'/
  `.   ;/        .'
jgs `'-._____.
  

using revo on the web

it compiles to wasm!

this website ships a ~1mb revo.wasm binary which runs the whole language entirely locally
i did this by giving you text editors backed by codemirror 6

click the run button to evaluate

embedding

to embed a repl on your own page, include these assets:

<script src="/engine/revo.js" type="module"></script>
<script src="/repl/repl.js" type="module"></script>
<link rel="stylesheet" href="/repl/repl.css">

…then wrap any code in a repl container

<div class="repl">
  <div class="repl-editor-wrap">
    <div class="repl-editor"></div>
    <button class="repl-run" hidden>run</button>
  </div>
  <script type="text/plain" class="repl-source">print("hello from the browser!")</script>
  <pre class="repl-output" hidden></pre>
</div>

the repl.js script hydrates all .repl elements on page load
, it creates a codemirror editor for each, wires the run button to the wasm evaluator, and displays the result

syntax highlighting

the repl editors are highlighted by a revoLang stream parser defined in repl/cm-shared.js