fix(repl): don't print none return values
This commit is contained in:
@@ -96,6 +96,7 @@ class REPL:
|
|||||||
stmt: ExpressionStmt = program[0] # type: ignore
|
stmt: ExpressionStmt = program[0] # type: ignore
|
||||||
try:
|
try:
|
||||||
value = self.interpreter.evaluate(stmt.expression)
|
value = self.interpreter.evaluate(stmt.expression)
|
||||||
|
if value is not None:
|
||||||
print(self.interpreter.stringify(value))
|
print(self.interpreter.stringify(value))
|
||||||
except PebbleRuntimeError as e:
|
except PebbleRuntimeError as e:
|
||||||
Pebble.runtime_error(e)
|
Pebble.runtime_error(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user