aboutsummaryrefslogtreecommitdiff
path: root/examples/cppx_cppfront/default.cpp2
blob: 99fc51b6c356d492021fadbd181c89fb205346e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <string>

name: () -> std::string = {
    s: std::string = "world";
    decorate(s);
    return s;
}

decorate: (inout s: std::string) = {
    s = "[" + s + "]";
}

auto main() -> int {
    // name();
    std::cout << "Hello " << name() << "\n";
}