From a56b1c7b42b2bdb448cc91f3675ab6731a258732 Mon Sep 17 00:00:00 2001 From: Aayush Garg <65889104+Aayush-hub@users.noreply.github.com> Date: Sat, 5 Dec 2020 18:12:59 +0530 Subject: [PATCH 1/2] Update arpit.lca --- arpit.lca | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arpit.lca b/arpit.lca index 729f27c..3f49787 100644 --- a/arpit.lca +++ b/arpit.lca @@ -1,11 +1,11 @@ -FUN concat(string1, string2) -> string1 + string2 -FUN appendCool(string) -> string + " is cool!" -FUN print_table(number) +FUN CONCAT(string1, string2) -> string1 + string2 +FUN APPENDCOOL(string) -> string + " is cool!" +FUN PRINT_TABLE(number) FOR i = 1 TO 11 THEN PRINT(i*number) END END -FUN map(element, func) +FUN MAP(element, func) VAR result = [] FOR i = 0 TO LEN(element) THEN APPEND(result, func(element/i)) @@ -13,12 +13,12 @@ FUN map(element, func) RETURN result END PRINT("-----------------------------------------") -PRINT(concat("Greeting from ","LazyCoderr's Compiler")) +PRINT(CONCAT("Greeting from ","LazyCoderr's Compiler")) PRINT("-----------------------------------------") PRINT("Table of 5") -print_table(5) +PRINT_TABLE(5) PRINT("-----------------------------------------") -VAR res = map(["Arpit", "LaxyCoderr"],appendCool) +VAR res = MAP(["Arpit", "LaxyCoderr"],APPENDCOOL) FOR i = 0 TO LEN(res) THEN PRINT(res/i) -END \ No newline at end of file +END From b46817b0d5686d307a594190fb1098608f8465e5 Mon Sep 17 00:00:00 2001 From: Aayush Garg <65889104+Aayush-hub@users.noreply.github.com> Date: Sat, 5 Dec 2020 18:14:02 +0530 Subject: [PATCH 2/2] Update main.py --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index eccc061..879add2 100644 --- a/main.py +++ b/main.py @@ -17,8 +17,8 @@ def getFileText(name): while True and not compileFile: if len(sys.argv) < 2: - text = input('lazy > ') - if text.strip() == "quit()": break + text = input('lazy > ').upper() + if text.strip() == "QUIT()": break if text.strip() == "": continue else: compileFile = True @@ -27,4 +27,4 @@ def getFileText(name): result, error = Interpreter.run('', text) if error: - print(error.as_string()) \ No newline at end of file + print(error.as_string())