Zontroy Syntax
Last updated
Last updated
In Zontroy language keywords starts with zg prefix. It allows Zontroy to distinguish code written in Java, Python, Go etc. and Zontroy Language.
For example, zg-entity is a predefined object of an entity corresponding to a table in database. Another example is zg-for that can execute a block of code a number of times.
Brackets have to be written triple times in Zontroy. It is because while implementing a code file Zontroy code is written into the code of another programming language. It helps Zontroy to distinguish code written in Java, Python, Go etc. and Zontroy Language.
Parentheses ((( ))): Used to group expressions.
Curly braces {{{ }}}: Used to group statements together. They are used to define a code block and are used in control statements (if, for, etc) and classes, methods and other constructs.
Square brackets [[[ ]]]: Used to operate on pre-defined objects.
Operators and marks have to be written triple times or more in Zontroy. It is because while implementing a code file Zontroy code is written into the code of another programming language.
When we implement a for loop we will write triple left parantheses, triple right parantheses, triple left braces and triple right braces.
Equality =====: Used to compare right side and left side expression. It is used as five equal signs.
Good to know: Zontroy IDE has its own hightlighter for Zontroy Language so code written in Zontroy is easy to read and maintain.