Nodes:
building a gcc_tree_node for a custom prograimming language
compile and base on C++26
the modules are avilable
the language using tab-block system
every keyword start with '/'
I want to build programming language base on GCC compiler, I had search and find no information about how to use GCC source code, but all I need is know how to turning the parsed Nodes or parse them direct to C++26 AST and processe as C++ code without make a buffer.cpp, can anyone help?
here an example (just for illustration):
/get /cpp std;
/fn println(str text)
/ret /cpp
std::cout << __sk_uceanlang_funarg_name__text;
/-> $
println("Hi ") << $1 << '\n';
which read as following c++ nodes
- '/get' -> 'import'
- '/fn' -> create an auto/void function as return or not
- '/ret' -> 'return'
- '/->' -> 'main function'
- '$' after '/->' for using args