Skip to content

Commit 21160d7

Browse files
Started compiling code
1 parent f45397a commit 21160d7

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/VisualScript.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
def process_code(file):
1414
keys = {
1515

16-
"algorithom":"range",
1716
"log":"print",
1817
"ask": "input",
1918
"define":"def",
@@ -22,7 +21,10 @@ def process_code(file):
2221
"else if":"elif",
2322
"//":"#",
2423
"get":"import",
25-
"size":"len"
24+
"size":"len",
25+
"f":"format",
26+
"x=":"!="
27+
2628

2729

2830
}
@@ -78,11 +80,15 @@ def artColor(color):
7880
def artKey(function, key):
7981
tur.turtle.onkey(function, key)
8082
return
81-
def artSpecial(feature):
83+
def artStatic(feature):
8284
if feature == "stamp":
8385
tur.turtle.stamp()
8486
elif feature == "dot":
8587
tur.turtle.dot()
88+
def runCode():
89+
while True:
90+
pass
91+
8692

8793

8894

@@ -108,9 +114,15 @@ def artSpecial(feature):
108114
if feature_name in globals():
109115
feature_func()
110116

117+
118+
print("VisualScipt\n Enter a filename or exit to exit")
111119
if __name__ == "__main__":
112-
try:
113-
process_code("C:/Users/isano/OneDrive/Documents/GitHub/VisualScript/src/example.vs")
114-
except Exception as e:
115-
print(f"An error occurred: {e}")
120+
while True:
121+
filename = input(">>> ")
122+
if filename.lower() == 'exit':
123+
break
124+
try:
125+
process_code(filename)
126+
except Exception as e:
127+
print(f"An error occurred: {e}")
116128

0 commit comments

Comments
 (0)