Esempio n. 1
0
 /**
  * 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));
 }
Esempio n. 2
0
 /**
  * Funciton VisitGroupingExpr --> '(' <expr> ')'
  * Param : grouping expression to evaluate
  * Return : the evaluated expression
  */
 public Value VisitGroupingExpr(Expr.Grouping expr)
 {
     return(Evaluate(expr.Expression));
 }
Esempio n. 3
0
 /**
  * Function VisitGroupingExpr
  * Param : grouping expression to visit
  * Return : string with the expression inside parenthesis
  */
 public String VisitGroupingExpr(Expr.Grouping expr)
 {
     return("(" + Print(expr.Expression) + ")");
 }