Protean-Labs / mesh

The Mesh Engine that implements the Mesh Language, a computational language for web3.
Apache License 2.0
1 stars 0 forks source link

Infix and prefix operator definition parsing #6

Closed cvauclair closed 3 years ago

cvauclair commented 3 years ago

Description

The Mesh Language should support the definition of custom infix and prefix operators using a let binding with a special syntax.

Infix operators should be defined using the following syntax:

let (OP) = (a, b) => // body

Example:

let (+) = (a, b) => add(a, b)
let (%&%) = (a, b) => a

Prefix operators should be defined using the following syntax:

let (!OP) = (a) => // body

Examples:

let (!$) = (a) => price_feed(a)