Skip to content

Commit 848fd2a

Browse files
committed
بہتر فایل صورت
1 parent 6d4623b commit 848fd2a

7 files changed

Lines changed: 10 additions & 6 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ The mappings are as following:
4747
"کوئ": "any",
4848
"ندارد": "None",
4949
```
50-
Don't worry if you can't find a mapping, you can also use English Python!
50+
Find the whole list at ```./languages/ur/ur_native.lang.yaml```. Don't worry if you can't find a mapping, you can also use English Python!
5151

52-
For example:
52+
An example of a Hello World Program:
5353
```
54-
print ("hello world")
54+
print ("Hello world!")
5555
```
5656
would be
5757
```
58-
چھاپ ("hello world")
58+
چھاپ ("Hello world!")
5959
```
6060

6161
3. Open a Terminal in the folder of this file.

src/dirty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def run (args):
33
ur_pyfile = open(args["file"][0])
44

55
import yaml
6-
language_dict = yaml.load(open("./ur_native.lang.yaml"), Loader=yaml.SafeLoader)
6+
language_dict = yaml.load(open(args["dictionary"]), Loader=yaml.SafeLoader)
77

88
reserved = language_dict.get("reserved")
99

src/lex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def t_NUMBER(t):
161161
# }
162162

163163
import yaml
164-
language_dict = yaml.load(open("./ur_native.lang.yaml"), Loader=yaml.SafeLoader)
164+
language_dict = yaml.load(open(args["dictionary"]), Loader=yaml.SafeLoader)
165165

166166
reserved = language_dict.get("reserved")
167167

File renamed without changes.

urdu_python.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
ap.add_argument("-m", "--mode",
2121
default="lex", required = False,
2222
help = "The mode to use to translate the code.")
23+
ap.add_argument("-d", "--dictionary",
24+
default="./languages/ur/ur_native.lang.yaml", required = False,
25+
help = "The dictionary to use to translate the code.")
26+
2327

2428

2529
group = ap.add_mutually_exclusive_group(required=False)

0 commit comments

Comments
 (0)