statement method

Stmt statement()

Implementation

Stmt statement() {
  if (match([TokenType.FOR])) return forStatement();
  if (match([TokenType.IF])) return ifStatement();
  if (match([TokenType.PRINT])) return printStatement();
  if (match([TokenType.RETURN])) return returnStatement();
  if (match([TokenType.WHILE])) return whileStatement();
  if (match([TokenType.LEFT_BRACE])) return Block(block());
  return expressionStatement();
}