Basic Expressions
Literals
Section titled “Literals”42 // Number"hello" // Stringtrue // Boolean truefalse // Boolean falsenil // Nil valueVararg
Section titled “Vararg”...Arithmetic
Section titled “Arithmetic”1 + 2 // Addition3 - 4 // Subtraction5 * 6 // Multiplication7 / 8 // Division9 % 2 // Modulus2 ** 8 // ExponentiationLogical
Section titled “Logical”true && falsetrue || false!trueRelational
Section titled “Relational”a < ba > ba <= ba >= ba == ba != bBitwise
Section titled “Bitwise”a | b // ORa ^ b // XORa & b // ANDa << b // Left shifta >> b // Right shift~a // Bitwise NOTConcatenation
Section titled “Concatenation”"foo" .. "bar"-a // Negation!a // Logical not~a // Bitwise not#a // LengthParenthesized
Section titled “Parenthesized”(a + b)Unsafe Cast
Section titled “Unsafe Cast”a unsafe_cast_as Type