Skip to main content Link Search Menu Expand Document (external link)

Appendix

Table of contents
  1. Concepts - Data Type
    1. Data Type
  2. Concepts - Expression
    1. Expression
  3. Concepts - Operators
    1. Arithmetic Operators
    2. Bitwise Operators
    3. Relational Operators

Concepts - Data Type

Data Type

  • integer (int64)
  • double (float64)
  • string
  • bool
  • null
  • undefined
  • list
  • object

Concepts - Expression

Expression

  • exp ::= false or true
  • exp ::= Numeral
  • exp ::= LiteralString (double quoted)
  • exp ::= functiondef
  • exp ::= tableconstructor
  • exp ::= exp binop exp
  • exp ::= unop exp
  • tableconstructor: {a, b, c} or {a=”x”, b, c=1}

Concepts - Operators

Arithmetic Operators

  • +: addition
  • -: subtraction
  • *: multiplication
  • /: float division
  • %: modulo
  • ^: exponentiation
  • -: unary minus

Bitwise Operators

  • &: bitwise AND
  • |: bitwise OR
  • ~: bitwise exclusive OR
  • >>: right shift
  • «: left shift
  • ~: unary bitwise NOT

Relational Operators

  • ==: equality
  • ~=: inequality
  • <: less than
  • >: greater than
  • <=: less or equal
  • >=: greater or equal

These operators always result in false or true.


Table of contents