mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-28 05:37:46 -05:00
Fixes for cppfront (#4076)
* Rename cppx_cppfront to cpp2_cppfront * Add some blurb about the compiler * Some syntax highlighting * Better output highlighting * Some form of line tracking and filtering
This commit is contained in:
17
examples/cpp2_cppfront/default.cpp2
Normal file
17
examples/cpp2_cppfront/default.cpp2
Normal file
@@ -0,0 +1,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";
|
||||
}
|
||||
Reference in New Issue
Block a user