-
-
Notifications
You must be signed in to change notification settings - Fork 0
Easy Syntax Guide.
- I'm Not Really Sure If Easy Code Is Easy. But You Can Decide. Easy Code Is Based On Python So Every Easy Code You're Writing Is Getting Genrated Into a Python Code. You Can See
examplesFolder Or Follow The Documentation Below.
- Let's Start With The Most Basic Thing Here. In Easy You Can Store Local Variables Using
DEFINEKey, When The Parser Adds That Variable Into The Dicc. You Will Be Able To Call It From Anywhere Outside Of This Of Code UsingADDKey. See The Example Below For More Information
DEFINE githubHandler=<'"DEMON1A"'>
STORE handler
ADD githubHandler;NEWLINE
CALL print,handler
- After Translating The Code With EasyShell, The Output Code Will Be Something Like This:
handler = "DEMON1A"
print(handler)-
I Usually Use This Method To Add a Pure Python Code Into My Easy Code To Work With It Until I Implement a Key For The Thing I Need In Python
-
You Can Define Multi Variables On a Line Using
,Between Everyone. For Example:STORE test,something,hi. You Can Use This For Functions That Returns More Than One Variable -
In Case, You Want To Define Python Variable You Can Use
VARKey. It's Used To Define Python Variables On The Code. The Last Argument Is Always The Value Of The First Ones That's The Variables Names. Here's Some Code Example:
VAR test,"fine"
CALL print,test
- Translate The Code With EasyShell And You Will Get That Code:
test = "fine"
print(test)- For Multiple Variables Assigment You Can Use Multiple Arguments. If You Used
VAR test,variable,"hello"Then The Python Code Will Betest, variable = "hello"
- You Can Define Your Own Function With
FUNCTIONKey On The Code. That Will Create a Python Function For You But You Will Need To Use.at The End Of Every Syntax You Code. The Dot at The End Of The Code Adds a TAB Into The Next Line Of Code. So When You Define a Function You Should Use.At The End Of It. See The Example Below
FUNCTION Main.
CALL print,"Hello^World!"
NEWLINE
CALL Main
- After Translating The Code It Will Be Something Like This:
def Main():
print("Hello World!")
Main()- No Python Code Can Work Without Imports. To Import a Python Library You Need To Use
IMPORTKey. For Example, If You UsedIMPORT os,timeAfter Tranlating The Code It Will Beimport os,timeLOL.
-
To Call a Function In Easy, You Should Use
CALLKey. That Allows You To Call a Python Function With Arguments By Sperating The Values With,. For Example:CALL print,"Hello^World!" -
To Store Python Variables You Can Use
STOREKey. That Will Set The Variable Name. And The Next Line Of Code Will Be It's Value.
- It's Just a Basic Keys On Easy To Add NewLines And Tabs On The Code. So When You Want To Add a NewLine On Your Code You Just Need To Add
NEWLINEAnd When You're Coding On a Function And You Hate Using Dots. Then UseTABKey. I Know It's Not Pretty To HaveNEWLINEandTABOn a Single Line. So I Allowed Using;On The Code. So You Can Just Do Whatever Code You Want Then Add;TABOr;NEWLINETo Add a NewLine/Tab at The End
- In Easy, If Condition Only Takes 3 Arugments. The First Condtion And The State And The Second Condition. So If You Added More Than Three Arguments You Will Get an Error. Here's an IF Condition Example:
IF "hello",==,"hello".
CALL print,"The Program Says Hello"
ELSE print("The Program Didn't Say Hello"),print("The Program Isn't Mean.")