remove Regex argument/option
out of scope
This commit is contained in:
@@ -49,7 +49,6 @@ sealed class Argument<T : Any>(
|
|||||||
fun boolean() = argument(BooleanParser)
|
fun boolean() = argument(BooleanParser)
|
||||||
|
|
||||||
inline fun <reified T : Enum<T>> enum() = argument(enumParser<T>())
|
inline fun <reified T : Enum<T>> enum() = argument(enumParser<T>())
|
||||||
fun regex() = argument(RegexParser)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ sealed class Option<T : Any>(
|
|||||||
fun boolean(vararg names: String) = option(BooleanParser, true, *names)
|
fun boolean(vararg names: String) = option(BooleanParser, true, *names)
|
||||||
|
|
||||||
inline fun <reified T : Enum<T>> enum(vararg names: String) = option(enumParser<T>(), *names)
|
inline fun <reified T : Enum<T>> enum(vararg names: String) = option(enumParser<T>(), *names)
|
||||||
fun regex(vararg names: String) = option(RegexParser, *names)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package com.infendro.cli.parser
|
|
||||||
|
|
||||||
object RegexParser : Parser<Regex> {
|
|
||||||
override fun parse(text: String) = Regex(text)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user