Syntax of SRON
A scope of a SRON's code starts with a function and it is started with an open curly brace '{' and ended with a close curly brace '}'. Almost all instructions inside a function are written in the below format:
attribute : statementAttribute defines the types of statement and is used to tell the compiler that this statement is written with XYZ intention. There are many attributes provides in SRON:
1) name : this attribute is used to declare a function name.
{
name : function_name
}2) args : this attribute is used to declare a function arguments.
{
name : fnc
args : (Int a, String b)
}
{
name : Main
args : (List arglist)
}3) console : this attribute is used to print values on the terminal/command line.
4) type : this attribute is used to set the return type of the function
5) return : this attribute is used to return a value from a function
6) for : this attribute is used to declare a for-loop.
7) range : this attribute is used to declare the range of for-loop.
8) while : this attribute is used to declare a while loop.
9) condition : this attribute is used to check if the given condition is true or false. This attribute is used with 'while', 'if' and 'elif' attributes.
10) if : this attribute is used to declare a if statement.
11) elif : this attribute is used to declare an elif statement.
12) else : this attribute is used to declare a else statement.
13) foreach : this attribute is used to iterate linearly over String or List.
14) rotate : this attribute is used to rotate value or swap value.
Last updated