Skip to content

mattdsteele/arnoldc.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Also available as:

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 !

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 74.7%
  • Yacc 25.3%