X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomrogue%2Fparser.py;h=a1b56b571b650431d297badf3f0e4573da731359;hb=70b12aa9c1fe6933cfc7e19775b67673d2e93768;hp=6a6aaaaa59087c2f5a240efbff92ec4025bbc752;hpb=ff01e1b466c1df7c938d1281ca34718e555bcf67;p=plomrogue2 diff --git a/plomrogue/parser.py b/plomrogue/parser.py index 6a6aaaa..a1b56b5 100644 --- a/plomrogue/parser.py +++ b/plomrogue/parser.py @@ -106,6 +106,10 @@ class Parser: if not arg.isdigit(): raise ArgError('Argument must be non-negative integer.') args += [int(arg)] + elif tmpl == 'int:pos': + if not arg.isdigit() or int(arg) < 1: + raise ArgError('Argument must be positive integer.') + args += [int(arg)] elif tmpl == 'char': try: ord(arg)