An option count works like a OptionBool except it counts the number of
occurrences of the flag.
Signed-off-by: Jean Privat <jean@pryen.org>
redef meth read_param(it) do value = true
end
+class OptionCount
+special Option
+ redef type VALUE: Int
+
+ init(help: String, names: String...) do init_opt(help, 0, names)
+
+ redef meth read_param(it) do value += 1
+end
+
# Option with one mandatory parameter
class OptionParameter
special Option