3 ms·
I'm doing that but it's more a CoffeScript than a Typescript (no semicolons and no commas). An example: fn add(x1 x2) { return <x1+x2> }
by mabynogy 10y ago
I'm doing that but it's more a CoffeScript than a Typescript (no semicolons and no commas).
An example:
fn add(x1 x2)
{
return <x1+x2>
}
fn <main>(count:int arguments:<const char** const>):int
{
(<printf> "%d\n" (add 2 3))
return 0
}
Is converted to:
auto add(const auto x1,const auto x2)
{
return x1+x2;
}
int main(const int count, const char** const arguments)
{
printf("%d\n",add(2,3));
return 0;
}
Everything inside the <angle brackets> is left as is in the C++ output.
I use S-expressions for function calls.