Syntax Overview
This is a cheatsheet for Roto’s syntax. Refer to the Language Reference for the full explanation of these concepts.
Name |
Example |
See |
|---|---|---|
Comment |
|
|
Unit |
|
|
Never type |
|
|
Boolean |
|
|
Integer |
|
|
Float |
|
|
IP address |
|
|
AS number |
|
|
String |
|
|
Format string |
|
|
Optional values |
|
|
Anonymous record |
|
|
Named record |
|
|
List |
|
|
Unary operator |
|
|
Binary operator |
|
|
Assignment |
|
|
Field access |
|
|
Function call |
|
|
Method call |
|
|
Static method call |
|
|
Let binding |
|
|
Function declaration |
|
|
Filter-map declaration |
|
|
Record declaration |
|
|
Variant type declaration |
|
|
If-else |
|
|
Pattern matching |
|
|
While loop |
|
|
For loop |
|
|
Return |
|
|
Verdict |
|
|
Import items from module |
|