Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python to Javascript Source code Transpiler

So, I have been trying to explore really deep on Compilers, Linters and Programming languages in general, And this project was a fun one to build. A transpiler takes existing source code's abstract syntax tree, and converts it into a target programming language. In this case I have made use of the Python's Abstract Syntax Tree and parse it down to Javascript source code, by using the lexial or grammar rules of Javascript language. An important point to be noted is If your transpiling python sources that have certain dependencies, it may not necessary transpile appropriate Target Javascript source. As shown in the picture, The orignal AST is converted into a Target AST, However in my case the approach is much simpler, we are just generating Javascript source code using the python's AST.

Data Structure Singly Linked lists is utilized to check for Variable declarations and scoping

Tests

test no. 1

test no. 2

test no. 3

test no. 4

About

Utilizing the Abstract syntax tree (AST) of python to convert python source file into javascript code

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages