diff --git a/interp.py b/interp.py index 9d0500e..c899b2c 100644 --- a/interp.py +++ b/interp.py @@ -36,6 +36,15 @@ raise InterpreterError("Invalid argument type %s, expected Text" % (appendix.__class__.__name__)) return Text(self.value() + " " + appendix.value()) + def verb_Equals(self, args): + args_count = len(args) + if args_count != 1: + raise InterpreterError("Invalid argument count %i, expected 1" % (args_count)) + compare = args[0] + if compare.__class__ != Text: + raise InterpreterError("Invalid argument type %s, expected Text" % (appendix.__class__.__name__)) + return Bool(self.value() == compare.value()) + class Module_System: def verb_Print(self, args): args_count = len(args)