mappingExpr method

Expr mappingExpr(
  1. Expr callee,
  2. Token name
)

Implementation

Expr mappingExpr(Expr callee, Token name) {
  consume(TokenType.LEFT_PAREN, "Expect '(' after 'map'.");
  Expr expr = expression();
  consume(TokenType.RIGHT_PAREN, "Expect ')' after parameters.");
  return Mapping(callee, name, expr);
}