Skip to content

Script for generating CSpice wrapper functions based on CSpice source comments.

Notifications You must be signed in to change notification settings

gkjohnson/generate-cspice-js-wrapper-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generate-cspice-js-wrapper-functions

Script for generating CSpice wrapper functions based on CSpice source comments. Scrapes the comments and code in the cspice/src/cspice directory to extract function names, arguments, and types in order to generate js functions to wrap Emscripten CSpice.js output.

Built as a proof of concept for Timecraftjs.

How to run

Command line arguments

node src/index.js <cspice_src_dir> <output_dir>

Example

node src/index.js ../cspice/src/cspice ./output/

TODO

  • Generate wrapped js function calls based on scraped data.
  • Add comment next to ccall arguments listing parameter names
  • Include comments in code scraping.
  • Generate JSDoc comments for the functions.
  • Add tests, validate signatures.
  • Docs and comment code.
  • Make code for determining input / output arguments from comments more robust.
  • Remove the _c suffix on the functions.
  • Convert arguments map output to just an array.
  • Write out list of unconverted functions.

About

Script for generating CSpice wrapper functions based on CSpice source comments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published