Giter Site home page Giter Site logo

abdi0987 / arnoldc.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattdsteele/arnoldc.js

0.0 2.0 0.0 161 KB

A compiler which takes an .arnoldc file and output a javascript file

Home Page: http://steele.blue/arnoldc-to-js/

JavaScript 100.00%

arnoldc.js's Introduction

arnoldc.js

arnoldc.js is a compiler from ArnoldC language to Javascript, with support for source maps.

You can read about the original project here : https://github.com/lhartikk/ArnoldC

How to use it

Install: npm install arnoldc.js --global

Run: arnoldc.js {{file.arnoldc}}

It will produce two files:

  • Compiled javascript: file.arnoldc.js
  • Source Map javascript: file.arnoldc.js.map

The source map contents is inlined into the map using sourcesContent, so you don't need to host your .arnoldc files.

How does it works ?

It uses Jison to parse the file and to produce a simple AST of the code.

Then, it uses functions defined in the file Transpiler.js and ast.js to produce the corresponding Javascript code.

Source maps provided by Mozilla's source-maps library.

Not supported yet

  • Non void methods
  • Return statement
  • Assign variable from method call
  • Read integer

It's coming soon !

arnoldc.js's People

Contributors

mattdsteele avatar thomascrevoisier avatar siegfriedehret avatar

Watchers

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.