Exemple #1
0
        public object VisitThisExpr(Expr.This expr)
        {
            if (_currentClass == ClassType.NONE)
            {
                _logger.Error(expr.Keyword, "Cannot use 'this' outside of a class.");
                return(null);
            }

            ResolveLocal(expr, expr.Keyword);
            return(null);
        }
Exemple #2
0
 public object VisitThisExpr(Expr.This expr)
 {
     return(LookUpVariable(expr.Keyword, expr));
 }
Exemple #3
0
 public string VisitThisExpr(Expr.This expr)
 {
     return("this");
 }