Beispiel #1
0
        public object 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);
        }
Beispiel #2
0
 public string visitThisExpr(Expr.This expr)
 {
     return("");
 }
Beispiel #3
0
 public object visitThisExpr(Expr.This expr)
 {
     return(lookUpVariable(expr.keyword, expr));
 }