FabMo-Engine icon indicating copy to clipboard operation
FabMo-Engine copied to clipboard

Enhance parser to expose select functional operators for math that pass thru to javascript Math.{function}

Open RobMackie opened this issue 2 years ago • 0 comments

SB3 OpenSBP supports ceiling and a few other mathematical operators that can be trivially implemented by creating an entry in the pegjs file that passes through to an underlying javascript function.

For example we can implement CEIL(x) by passing through to Math.ceil(x) or COS(y) which is resolved by a direct call of Math.cos(y)

The easiest and must useful solution is simply to enumerate all of the single argument functions of the Math javascript library. we can worry about other functions later if we care about that eventually.

RobMackie avatar Mar 29 '23 20:03 RobMackie