summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-01-16 22:16:37 -0800
committerGravatar Tom Willemse2021-01-16 22:16:37 -0800
commit2a72de9f815deb0ea3e0c9a26ec5ea53f2f723d3 (patch)
treeafd78f785c08b24f2333566fa0099823e66a3503
parent3b9c44434e8bc395068eb8c3e319e384b66ed72e (diff)
downloadcrafting-interpreters-2a72de9f815deb0ea3e0c9a26ec5ea53f2f723d3.tar.gz
crafting-interpreters-2a72de9f815deb0ea3e0c9a26ec5ea53f2f723d3.zip
Formatting
-rw-r--r--src/com/craftinginterpreters/lox/Interpreter.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/craftinginterpreters/lox/Interpreter.java b/src/com/craftinginterpreters/lox/Interpreter.java
index 6b3e409..9d0cfb3 100644
--- a/src/com/craftinginterpreters/lox/Interpreter.java
+++ b/src/com/craftinginterpreters/lox/Interpreter.java
@@ -15,9 +15,11 @@ class Interpreter implements Expr.Visitor<Object>, Stmt.Visitor<Void> {
Object left = evaluate(expr.left);
if (expr.operator.type == TokenType.OR) {
- if (isTruthy(left)) return left;
+ if (isTruthy(left))
+ return left;
} else {
- if (!isTruthy(left)) return left;
+ if (!isTruthy(left))
+ return left;
}
return evaluate(expr.right);