public object VisitThisExpr(Expr.This expr) { if (_currentClass == ClassType.None) { Lox.Error(expr.keyword, "Can't use 'this' keyword outside of a class"); } ResolveLocal(expr, expr.keyword, true); return(null); }
public LoxVoid VisitThisExpr(Expr.This expr) { if (_currentClass == ClassType.None) { Lox.Error(expr.Keyword, "Cannot use 'this' outside of class"); } ResolveLocal(expr, expr.Keyword); return(null); }
public Unit VisitThisExpr(Expr.This expr) { if (this.CurrentClass == ClassType.NONE) { CSLox.Error(expr.Keyword, "Can't use 'this' outside of a class."); return(new Unit()); } ResolveLocal(expr, expr.Keyword); return(new Unit()); }
public object visitThisExpr(Expr.This expr) { if (currentClass == ClassType.NONE) { Interpreter.error(expr.keyword, "Cannot use 'this' outside of a class."); return(null); } resolveLocal(expr, expr.keyword); return(null); }
/// <summary> /// Resolve this /// </summary> /// <param name="expr">The expression</param> /// <returns></returns> public object Visit(Expr.This expr) { // Make sure we are in a class if (_current_class == ClassType.NONE) { _error_handler.Error(expr.Keyword, "Cannot use 'this' outside of a class."); } ResolveLocal(expr, expr.Keyword); return(null); }
public object VisitThisExpr(Expr.This expr) { if (currentClass == ClassType.NONE) { throw new InterpretingException(expr.Keyword, "Can't use 'this' outside of a class."); return(null); } ResolveLocal(expr, expr.Keyword); return(null); }
public object visitThisExpr(Expr.This thisExpr) { captureToken(thisExpr.keyword); if (currentClass == null) { error("Cannot use 'this' outside of a class."); return(null); } getNamedVariable(thisExpr.keyword); return(null); }
public object VisitThisExpr(Expr.This expr) { return(LookUpVariable(expr.Keyword, expr)); }
public string visitThisExpr(Expr.This expr) { throw new NotImplementedException(); }
public Token visitThisExpr(Expr.This _this) { return(_this.keyword); }
public string VisitThisExpr(Expr.This expr) { return(expr.Keyword.Lexeme); }
public string VisitThisExpr(Expr.This expr) { return(Parenthesize("this")); }
public object visitThisExpr(Expr.This expr) { return(lookUpVariable(expr.keyword, expr)); }