Keywords
Keywords in EasyBite are reserved words that have predefined meaning and are essential to the language syntax. These cannot be used as names for variables, functions, classes, or other user-defined identifiers.
Categorized List
Declarations & Assignment
declare
,set
Input & Output
show
,showline
,input
Modules & Imports
import
,as
Control Flow
if
,then
,else
,else if
,end if
,choose
,when
,otherwise
,end choose
,try
,capture
,stop
,exit
,skip
,error
,raise
Loops
for
,from
,to
,step
,by
,end for
,foreach
,end foreach
,while
,repeat
,times
,end repeat
,iterate
,in
,over
,end iterate
,generate
Functions & Callbacks
function
,return
,end function
,callback
Classes & OOP
class
,inherit
,end class
,method
,end method
,new
,init
,end init
,this
,parent
Asynchrony
async
,await
Operators & Modifiers
inc
,dec
,remind
,is
,is in
,is not
,and
,or
,not
Literals & Types
null
,true
,false
,bytearray
Access Modifiers
public
,secret
Keyword Reference Table
Keyword | Category | Functionality |
---|---|---|
declare | Declaration | Declares a new variable without assigning a value |
set | Assignment | Assigns a value to a declared variable |
show | Output | Displays a value or expression on screen |
showline | Output | Prints a blank line for spacing |
input | Input | Reads input from the user |
import | Modules | Loads an external file/module |
as | Alias | Renames an import or assigns alias to types or modules |
if | Conditional | Starts a conditional block |
then | Conditional | Begins the body of an if statement |
else | Conditional | Begins the alternative block of an if statement |
else if | Conditional | Specifies a new condition when previous if is false |
end if | Conditional | Ends an if-else block |
choose | Conditional | Switch-style statement for multiple conditions |
when | Conditional | Defines a specific case in a choose block |
otherwise | Conditional | Defines a fallback case in a choose block |
end choose | Conditional | Ends a choose block |
try | Exception Handling | Starts a block to try code that may raise an error |
capture | Exception Handling | Catches an error from a try block |
stop | Flow Control | Stops execution of current loop or flow |
exit | Flow Control | Exits the current context (function or loop) |
skip | Flow Control | Skips current iteration in loop |
error | Exception Control | Defines or throws an error manually |
raise | Exception Control | Triggers an error or custom condition |
for | Loop | Begins a for loop |
from | Loop Control | Specifies the start of a for loop |
to | Loop Control | Specifies the end of a for loop |
step | Loop Control | Specifies increment for a loop |
by | Loop Control | Defines increment in generate loop |
end for | Loop | Ends a for loop |
foreach | Loop | Begins a foreach loop over a collection |
end foreach | Loop | Ends a foreach loop |
while | Loop | Begins a while loop |
repeat | Loop | Starts a repeat loop |
times | Loop Control | Specifies how many times to repeat |
end repeat | Loop | Ends a repeat loop |
iterate | Loop | Starts a general-purpose iteration block |
in | Loop Control | Specifies collection in iterate loop |
over | Loop Control | Used in iterate loop to traverse items |
end iterate | Loop | Ends an iterate loop |
generate | Loop | Begins a customized loop with step and range |
function | Function | Declares a function |
return | Function | Returns a value from a function |
end function | Function | Ends a function block |
callback | Function | Declares a function pointer or event |
class | Object-Oriented | Starts a class definition |
inherit | Object-Oriented | Enables inheritance in class definition |
end class | Object-Oriented | Ends a class definition |
method | Object-Oriented | Declares a method inside a class |
end method | Object-Oriented | Ends a method definition |
init | Object-Oriented | Constructor method inside a class |
end init | Object-Oriented | Ends constructor block |
this | Object-Oriented | Refers to current class instance |
parent | Object-Oriented | Refers to superclass or parent method |
new | Object-Oriented | Instantiates a new object |
async | Asynchrony | Declares an asynchronous function |
await | Asynchrony | Waits for an asynchronous result |
inc | Arithmetic | Increments a value by 1 |
dec | Arithmetic | Decrements a value by 1 |
remind | Arithmetic | Performs a modulo operation |
is | Comparison | Used to test value equality |
is in | Comparison | Tests membership of a value in a collection |
is not | Comparison | Tests inequality or non-membership |
and | Logical Operator | Logical AND |
or | Logical Operator | Logical OR |
not | Logical Operator | Logical NOT |
null | Literal | Represents an empty or undefined value |
true | Boolean | Represents boolean true |
false | Boolean | Represents boolean false |
bytearray | Type | Represents a byte array or binary buffer |
public | Access Modifier | Marks a class or method as publicly accessible |
secret | Access Modifier | Marks a class or method as private or restricted |