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

Literals and variable binding parsing #3

Closed cvauclair closed 3 years ago

cvauclair commented 3 years ago

The Mesh Engine should be able to parse any expressions consisting of basic types literals and variable bindings to them.

Basic types literals: Type Literal
unit ()
int whole number (e.g.: 21, -124978)
float decimal number (e.g.: 0.9123, -123.752)
bool true or false
string sequance of ascii characters delimited by double quotes (e.g.: "asdf")

Variable bindings:

let u = ();       // unit
let i = 2;        // int
let f = 2.0;      // float
let b = true;     // bool
let s = "Hello";  // string