Giter Site home page Giter Site logo

cpp2ts.js's Introduction

C++ to TypeScript (rough approximation)

This is a Node.js library for converting C++ code to TypeScript, to a rough approximation. It is not meant to be a runnable port of a C++ library to TypeScript, that isn't really straightforward or necessarily possible. Instead, imagine you are trying to port a C++ library to TypeScript. You need to copy the details of a function implementation, changing syntax here and there from C++ to TypeScript. But that is really error prone, you can make lots of mistakes. This library translates the common stuff from C++ to TypeScript, so you can then fine-tune it by hand, cutting out the tedious work of changing the high-level syntax.

So this library is like an aid to your process of porting code from C++ to TypeScript, not a perfect translator. It just saves you some time and avoids some tediousness.

Development

This is not yet a fully complete project. You can test it out on a snippet of C++, and if you get an error, it might look like this:

Error: Unhandled node type 'import_from_statement' in context 'module'

If so, just go and add an import_from_statement handler (in the switch statement) in the module handler. It's pretty basic, check out the source code!

cpp2ts.js's People

Contributors

termhare avatar

Stargazers

 avatar IAbuElRuzz avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.