Example #1
0
        public Void VisitThisExpr(Expr.This expr)
        {
            if (currentClass == ClassType.NONE)
            {
                ElizScriptCompiler.Error(expr.keyword,
                                         "Cannot use 'this' outside of a class.");
                return(null);
            }

            ResolveLocal(expr, expr.keyword);
            return(null);
        }
Example #2
0
 public object VisitThisExpr(Expr.This expr)
 {
     return(LookUpVariable(expr.keyword, expr));
 }