示例#1
0
 public object visit_This_Expr(GExpr.This expr)
 {
     if (currentClass == ClassType.NONE)
     {
         Program.error(expr.keyword, "Cannot use 'this' outside of a class.");
     }
     resolveLocal(expr, expr.keyword);
     return(null);
 }
示例#2
0
 public object visit_This_Expr(GExpr.This expr)
 {
     return(lookUpVariable(expr.keyword, expr));
 }