summaryrefslogtreecommitdiff
path: root/cmd2/parsing.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-25 17:34:16 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-09-25 17:34:16 -0400
commit10704a06b2da6a29ffd04fae15164a2d0ea83269 (patch)
tree228a62ff032a179f686595cc2ae39eaadd63ffad /cmd2/parsing.py
parent0945a2752b0ba9202a385a5b9f5b3e3b3f0e3dc6 (diff)
downloadcmd2-git-10704a06b2da6a29ffd04fae15164a2d0ea83269.tar.gz
Finished macro commands. Still needs testing.
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r--cmd2/parsing.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py
index 7a2af64b..498834cf 100644
--- a/cmd2/parsing.py
+++ b/cmd2/parsing.py
@@ -25,7 +25,7 @@ digit_pattern = re.compile(r'\d+')
@attr.s(frozen=True)
-class MacroArgInfo:
+class MacroArg:
"""
Information used to replace or unescape arguments in a macro value when the macro is resolved
Normal argument syntax : {5}
@@ -51,11 +51,11 @@ class Macro:
# The string the macro resolves to
value = attr.ib(validator=attr.validators.instance_of(str), type=str)
- # The minimum number of args the user has to pass to this macro
- min_arg_count = attr.ib(validator=attr.validators.instance_of(int), type=int)
+ # The required number of args the user has to pass to this macro
+ required_arg_count = attr.ib(validator=attr.validators.instance_of(int), type=int)
# Used to fill in argument placeholders in the macro
- arg_info_list = attr.ib(factory=list, validator=attr.validators.instance_of(list), type=List[MacroArgInfo])
+ arg_list = attr.ib(factory=list, validator=attr.validators.instance_of(list), type=List[MacroArg])
@attr.s(frozen=True)