title: How would I extend the JavaScript language to support a new operator?
body: <p>The answer to the question <em><a href="https://stackoverflow.com/q/20728460/1420197">Is it possible to create custom operators in JavaScript?</a></em> is <strong><em>not yet</em></strong>, but <a href="https://stackoverflow.com/a/20728490/1420197">@Benjamin suggested</a> that it would be possible to add a new operator using <em>third party tools</em>:</p>
  
  <blockquote>
    <p>It is possible to use third party tools like sweet.js to add custom operators though that'd require an extra compilation step.</p>
  </blockquote>
  
  <p>I will take the same example, like in the previous question:</p>
  
  <h2><em>(ℝ, ∘), x ∘ y = x + 2y</em></h2>
  
  <p>For any two real numbers <em>x</em> and <em>y</em>: <strong>x ∘ y</strong> is <strong>x + 2y</strong> that is also a real number. How can I add this operator in my extended JavaScript language?</p>
  
  <p>After the following code will be run:</p>
  
  <pre><code>var x = 2
    , y = 3
    , z = x ∘ y;
  
  console.log(z);
  </code></pre>
  
  <p>The output will contain</p>
  
  <pre><code>8
  </code></pre>
  
  <p>(because <code>8</code> is <code>2 + 2 * 3</code>)</p>
  
  <hr>
  
  <p>How would I extend the JavaScript language to support a new operator?</p>