madfish-solutions / sol2ligo

⌨️ 🔮 Transpiler from Solidity to PascalLIGO language
https://madfish-solutions.github.io/sol2ligo/
MIT License
70 stars 4 forks source link

Shorten some syntax constructions by using macro #162

Closed konchunas closed 4 years ago

konchunas commented 4 years ago

For example

#define get_from_map(map, index, fallback) (case map[index] of | None -> fallback | Some(x) -> x end)
#define unpack_tuple_decl(a, aType, b, bType, tuple) const t : aType * bType = tuple; var a : aType := t.0; var b : bType := t.1;
konchunas commented 4 years ago

Seems impossible since LIGO has removed C-preprocessor