public MyVoid VisitThisExpr(Expr.This expr)
        {
            if (currentClass == ClassType.None)
            {
                Lox.Error(expr.keyword, "Cannot use 'this' outside of a class.");
                return(null);
            }

            resolveLocal(expr, expr.keyword);
            return(null);
        }
Esempio n. 2
0
 public string VisitThisExpr(Expr.This expr)
 {
     return("visit this expression");
 }
Esempio n. 3
0
 public object VisitThisExpr(Expr.This expr)
 {
     return(LookUpVariable(expr.keyword, expr));
 }