This PolyCompiler is inspired by https://github.com/evanzhoudev/polycompiler written in Node JS.
This project is written in Python, and ultimately, the polyglot method used here is double comment parasite polyglot,
unlike the original, which used a combination of various methods.
1) Install Python 3.13.2 -> Python3
2) Download Script
polycompile in.py in.js out.poly
This Project will take in a Python (.py)
and Javascript (.js)
file and output a .poly
file which can be run in both languages using
node {file name}.poly
and
python3 {file name}.poly
respectively.
- Python 3
PyolyCompiler uses a parasite method both ways to let syntactically correct files in both languages run in both. The script used for the parasite is
1 // 1; """
/*"""
#*/ {jscontent in one line} /*
{pycontent in multiple lines}
#*/
Syntax Highlighting
1 // 1; """
/*"""
#*/ console.log("Hello JS"); if (1 == 1) { console.log('1 == 1'); } /*
print("Hello Python")
a = input('Hello: ')
if (1 == 1):
print(f'1 == 1 and a == {a}')
#*/
1 // 1; """
/*"""
#*/ console.log("Hello JS"); if (1 == 1) { console.log('1 == 1'); } /*
print("Hello Python")
a = input('Hello: ')
if (1 == 1):
print(f'1 == 1 and a == {a}')
#*/
© Copyright @nnnGi (_nnn_) 2025 - 2025