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