/** * Function VisitGroupingExpr * Param : grouping expression to check * Return : the type of the expression inside brackets */ public VALTYPE VisitGroupingExpr(Expr.Grouping expr) { return(GetType(expr.Expression)); }
/** * Funciton VisitGroupingExpr --> '(' <expr> ')' * Param : grouping expression to evaluate * Return : the evaluated expression */ public Value VisitGroupingExpr(Expr.Grouping expr) { return(Evaluate(expr.Expression)); }
/** * Function VisitGroupingExpr * Param : grouping expression to visit * Return : string with the expression inside parenthesis */ public String VisitGroupingExpr(Expr.Grouping expr) { return("(" + Print(expr.Expression) + ")"); }