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); }
public Void Visit(Expr.This expr) { if (currentClass == ClassType.None) { Lox.Error(expr.Keyword, "Cannot use 'this' outside of a class."); } else { ResolveLocal(expr, expr.Keyword); } return(Void.Instance); }
public object VisitThisExpr(Expr.This expr) { return(LookUpVariable(expr.Keyword, expr)); }
object Expr.IVisitor <object> .VisitThisExpr(Expr.This expr) { return(LookUpVariable(expr.keyword, expr)); }
public string VisitThisExpr(Expr.This expr) { throw new NotImplementedException(); }
object Expr.IVisitor <object> .VisitThisExpr(Expr.This expr) { ResolveLocal(expr, expr.keyword); return(null); }