be5invis / PatEL

The Patrisika Example Language
MIT License
44 stars 1 forks source link

Possibly add Double asterisk operator `**`, for exponentiation, from ECMAScript 2016 (ES7) #3

Open jmcwilliams403 opened 1 month ago

jmcwilliams403 commented 1 month ago

The source code of Iosevka uses Math.pow in a lot of places. This could potentially clean up this expression wherever it shows up. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation

be5invis commented 1 month ago

You can always use define-operator, like

define-operator "**" 150 "right" : syntax-rules
    `(@l ** @r) `[Math.pow @l @r]