예제 #1
0
 object Stmt.IVisitor <object> .visitExpressionStmt(Stmt.Expression stmt)
 {
     Resolve(stmt.expression);
     return(null);
 }
예제 #2
0
 // Hacky fix: since we can't implement IVisitor<void>, we have to implement
 // IVisitor<object> and return null instead. LMAO Java requires you to return null
 // anyways so it doesn't even matter.
 // Statements don't produce a value so the return value of the visitStmt functions
 // is always null.
 public object visitExpressionStmt(Stmt.Expression stmt)
 {
     Evaluate(stmt.expression);
     return(null);
 }