Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions arpit.lca
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
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))
END
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
END
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ def getFileText(name):

while True and not compileFile:
if len(sys.argv) < 2:

text = input('lazy > ').upper()
if text.strip() == "QUIT()": break

text = input('lazy >> ')
if text.strip() == "quit()": break

if text.strip() == "": continue
else:
compileFile = True
Expand Down