mezum/emcc-loader

Generate Typescript Type Definition File (.d.ts) from clang AST.

mezum opened this issue · 0 comments

mezum commented

I found a method of obtaining clang AST from emcc/em++.

emcc -Xclang -ast-dump -fsyntax-only -fno-color-diagnostics "${asbPath}.c"

I interest myself in the following AST nodes:

  • FunctionDecl
  • LinkageSpecDecl
  • TypedefDecl
  • TypeAliasDecl

Maybe, they will tell about (extern "C") function name and its arguments type...