semantic-math / math-rules

Manipulate math-ast ASTs based on algebraic rules
MIT License
4 stars 1 forks source link

Support multiple variable placeholders in patterns #30

Closed kevinbarabash closed 7 years ago

kevinbarabash commented 7 years ago

I would be nice to be able to do:

export const MULTIPLY_FRACTIONS = 
    defineRuleString('#a_0 / #b_0 * ...', '(#a_0 * ...) / (#b_0 * ...)')

Unfortunately, we make assumptions in some places that there's only one variable placeholder.

kevinbarabash commented 7 years ago

Implemented in https://github.com/semantic-math/math-rules/commit/5a08eeb8ebd1dbef329e10925b59b7d6bfd83e6b.