Skip to content

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

@mezum

Description

@mezum

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions