File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Russian/Gen Alpha Examples, Documentation
22examples /ru /* @ CalciumKing
33examples /gen_alpha /* @ CalciumKing
4- lang .csv @ CalciumKing
4+ template_dict .csv @ CalciumKing
55README.md @ CalciumKing
6- CONTRIBUTING.md @ CalciumKing
76.github /* @ CalciumKing
7+ images /* @ CalciumKing
88LICENSE @ CalciumKing
99
1010# Thai Examples, Debugger File
@@ -13,3 +13,8 @@ debug/* @petepoop
1313
1414# Compiler is co-owned
1515lang.py @ CalciumKing @ petepoop
16+
17+ # Misc. Language Examples
18+ examples /ar /* @ fredtheonlychild
19+ examples /hi /* @ CodingSkywalker
20+ examples /kr /* @ Petmaster123
File renamed without changes.
Original file line number Diff line number Diff line change 88
99This project also has the potential to translate any language supported by UTF-8 into valid python code.
1010
11+ ## Language Examples Provided
12+ - Russian
13+ - Thai
14+ - Korean
15+ - Standard Arabic
16+ - Hindi
17+ - Gen Alpha (English)
18+
1119## Installation
1220
1321You don't need to "install" anything special. Just make sure you have Python 3 (preferably 3.10 or later, for
@@ -35,7 +43,9 @@ You don't need to "install" anything special. Just make sure you have Python 3 (
3543
3644# # Examples
3745
38- 1. ` lang.csv` (Example):
46+ # ## Keyword Replacement Process
47+
48+ 1. ` dict.csv` :
3949 ` ` ` csv
4050 def,myfunc
4151 return,sendback
@@ -45,7 +55,7 @@ You don't need to "install" anything special. Just make sure you have Python 3 (
4555 ` ` `
4656
47572. Custom Code (hello.tpy):
48- ` ` ` text
58+ ` ` ` py
4959 myfunc greet(name) {
5060 say(" Hello " + name)
5161 sendback " done"
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ def replacer(match) -> str:
8787 translations : dict [str , str ] = get_translations ()
8888
8989 for py_word in translations .keys ():
90- pattern = re .escape (translations [py_word ])
91- program = re .sub (pattern , replacer , program )
90+ pattern : str = re .escape (translations [py_word ])
91+ program : str = re .sub (pattern , replacer , program )
9292
9393 return program
9494
@@ -114,15 +114,15 @@ def main() -> None:
114114 raise IOError ('Must Provide Additional Arguments' )
115115
116116 # Read code from file
117- filename = sys .argv [1 ]
117+ filename : str = sys .argv [1 ]
118118
119119 if not filename .endswith ('.tpy' ):
120120 raise FileNotFoundError ('Your Chosen File Is Not A .tpy File' )
121121
122122 with open (filename , 'r' , encoding = 'utf-8' ) as f :
123123 code = f .read ()
124124
125- python_program = translate_program (code )
125+ python_program : str = translate_program (code )
126126
127127 if len (sys .argv ) == 3 :
128128 run_program (python_program )
You can’t perform that action at this time.
0 commit comments