Based off of the Writing an Interpreter in Go book, by Thorsten Ball.
Examples:
Variable declaration
let x = 1;
let b = true;
let b = false;Boolean expressions
let x = 1 == 1; // true
let x = 1 >= 2; // true
let x = 1 <= 2; // true
let x = 2 != 1; // falseArithmetic expressions
let x = 1 + 1; // 2
let x = (-12) + 2; // -10
let x = 4 * 2 + 1; // 9
let x = 16 / 2 - 1; // 7
let x = (2 * 2) + 3; // 7Conditional if expressions
let x = 12;
if x > 10 {
x = x + 1;
} else {
x = x - 1;
}
let x = if true {
1
} else {
0
}