Any tutorial for embedding Clang as script interpreter into C++ Code?

后端 未结 5 1156
不思量自难忘°
不思量自难忘° 2020-12-08 08:37

I have no experience with llvm or clang, yet. From what I read clang is said to be easily embeddable Wikipedia-Clang, however, I did not find any tutorials about how to achi

5条回答
  •  醉梦人生
    2020-12-08 08:59

    I don't know of any tutorial, but there is an example C interpreter in the Clang source that might be helpful. You can find it here: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/

    You probably won't have much of a choice of syntax for your scripting language if you go this route. Clang only parses C, C++, and Objective C. If you want any variations, you may have your work cut out for you.

提交回复
热议问题