X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=blobdiff_plain;f=plomrogue%2Fparser.py;h=69f728ee9859f3ed299f04b98177687c0ee52ce0;hb=8b3739449048aac3d7532563d0c20cb198d37a8f;hp=a043bde4615f80474aaab11b974ddb2a87a48b0b;hpb=df9a8d0a788b29913dae3eec4ef8113e2d8e9a41;p=plomrogue2 diff --git a/plomrogue/parser.py b/plomrogue/parser.py index a043bde..69f728e 100644 --- a/plomrogue/parser.py +++ b/plomrogue/parser.py @@ -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)