object Stmt.IVisitor <object> .visitExpressionStmt(Stmt.Expression stmt) { Resolve(stmt.expression); return(null); }
// 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); }