home · contact · privacy
Add music player.
[plomrogue2] / plomrogue / parser.py
index a043bde4615f80474aaab11b974ddb2a87a48b0b..69f728ee9859f3ed299f04b98177687c0ee52ce0 100644 (file)
@@ -116,6 +116,10 @@ class Parser:
                 if not arg.isdigit() or int(arg) < 1:
                     raise ArgError('Argument must be positive integer.')
                 args += [int(arg)]
+            elif tmpl == 'bool':
+                if not arg.isdigit() or int(arg) not in (0, 1):
+                    raise ArgError('Argument must be 0 or 1.')
+                args += [bool(int(arg))]
             elif tmpl == 'char':
                 try:
                     ord(arg)