enkimute / ganja.js

:triangular_ruler: Javascript Geometric Algebra Generator for Javascript, c++, c#, rust, python. (with operator overloading and algebraic literals) -
MIT License
1.52k stars 107 forks source link

Handle RegEx's like `{a: /a/, b: /b/}` #137

Open kungfooman opened 2 years ago

kungfooman commented 2 years ago

This allows code like:

Algebra(2,0,1,()=>{
  console.log({
    a: /a/,
    b: /b/
  });
});

Without, the generated inline code is invalid:

image