示例#1
0
 public object visitThisExpr(Expr.This expr)
 {
     if (currentClass == ClassType.NONE)
     {
         Lox.error(expr.Keyword,
                   "Cannot use `this` outside of class");
         return(null);
     }
     resolveLocal(expr, expr.Keyword);
     return(null);
 }
 public string visitThisExpr(Expr.This expr)
 {
     throw new NotImplementedException();
 }
 public object visitThisExpr(Expr.This expr)
 {
     return(lookUpVariable(expr.Keyword, expr));
 }